Api reference icon

Monitoring REST API

Last updated 27 June 2017

Introduction

This API enables you to see the inner workings of your clusters/replicas. It is not accessible by the standard API clients.

Quick Reference

The Monitoring API lets your interact directly with the status & usages of your Algolia clusters from anything that can send an HTTP request.

All the API access is over HTTPS, and accessed via the https://status.algolia.com domain. APPLICATION_ID variable can be found in your dashboard. API_KEY variable can be found in your credential page, under the monitoring section.

export APPLICATION_ID="your application id"
export API_KEY="your monitoring API key"

The relative path prefix /1/ indicates that we are currently using version 1 of the API.

URL

HTTP VERB

Functionality

/1/status

GET

Current status

/1/status/{servers}

GET

Current status of servers

/1/incidents

GET

List the incidents for the last 30 days

/1/incidents/{servers}

GET

List the incidents for the last 30 days for servers

/1/usage/{statistic}/period/{period}

GET

Get a usage statistic over a period of time

/1/usage/{statistic}/period/{period}/{index}

GET

Get a usage statistic over a period of time for an index

/1/inventory/servers

GET

Get the list of servers (clusters & replicas)

/1/inventory/probes

GET

Get the list of probes

/1/latency/{servers}

GET

Get the average latency from relevant probes for servers

/1/latency/{servers}/probes/relevant

GET

Get the latency from relevant probes for servers

/1/latency/{servers}/probes/others

GET

Get the latency from others probes for servers

/1/indexing/{servers}

GET

Get the indexing time for servers

/1/reachability/{servers}/probes

GET

Get the reachability for servers by probes

/1/infrastructure/{metric}/period/{period}

GET

Get an infrastructure metric over a period of time (Enterprise plan only)

Request Format

Authentication is done via HTTP headers. The X-Algolia-Application-Id header identifies which application you are accessing, and the X-Algolia-API-Key header authenticates the endpoint.

Response Format

The response format for all requests is a JSON object.

Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, whereas a 4xx status code indicates failure. When a request fails, the response body is still JSON, but always contains the field message which you can inspect to use for debugging.

Status API

Current status

  • Path: /1/status
  • HTTP Verb: GET
  • Description: This method gets the current status of all clusters/replicas.
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/status"

When the query is successful, the HTTP response is a 200 OK and returns the current status:

{
  "status": {
    "c4-fr": "operational",
    "c2-eu": "operational"
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Current status servers

  • Path: /1/status/{servers}
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the current status of the clusters/replicas passed in the URL.
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/status/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns the current status of the servers:

{
  "status": {
    "c4-fr": "operational"
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

List last incidents

  • Path: /1/incidents
  • HTTP Verb: GET
  • Description: This method gets the incidents on the last 30 days
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/incidents"

When the query is successful, the HTTP response is a 200 OK and returns the incidents:

{
  "incidents": {
    "c4-fr": [
      {
        "t": 1463410109000,
        "v": {
          "title": "Degraded performance of primary DNS provider",
          "body": "Due to the ongoing DDoS attack on our primary DNS provider you might experience fallback to secondary provider and temporary increased latency at the connection establishment. Service availability is not impacted.",
          "status": "degraded_performance"
        }
      }
    ]
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

List last incidents servers

  • Path: /1/incidents/{servers}
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the incidents on the last 30 days for the servers passed in the URL
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/incidents/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns the incidents:

{
  "incidents": {
    "c4-fr": [
      {
        "t": 1463410109000,
        "v": {
          "title": "Degraded performance of primary DNS provider",
          "body": "Due to the ongoing DDoS attack on our primary DNS provider you might experience fallback to secondary provider and temporary increased latency at the connection establishment. Service availability is not impacted.",
          "status": "degraded_performance"
        }
      }
    ]
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Usage API

Get usage

  • Path: /1/usage/{statistic}/period/{period}
  • Parameters:
    • statistic
      • search_operations: Number of search operations by type (Simple queries, Multiple queries)
      • acl_operations: Number of ACL operations by type (Get Api Key, Get Api Keys, Add Api Key, Update Api Key, Delete Api Key)
      • indexing_operations: Number of indexing operations by type (Get settings, Set settings, Copy/Move index, Clear index, Delete index, Wait task, Get log, Browse)
      • record_operations: Number of operations in records by type (Batch, Add record, Delete record, Update record, Partial Update record)
      • synonym_operations: Number of synonyms operations by type (Get Synonym, Delete Synonym, Update synonym, Query Synonym, Batch Synonym)
      • total_indexing_operations: The total number of indexing operations (= sum of the values of indexing_operations)
      • total_search_operations: The total number of search operations (= sum of the values of search_operations)
      • total_acl_operations: The total number of acl operations (= sum of the values of acl_operations)
      • total_records_operations: The total number of records operations (= sum of the values of record_operations)
      • total_operations: The total number of operations (= total_indexing_operations + total_search_operations + total_acl_operations + total_records_operations + total_synonym_operations)
      • total_synonym_operations: The total number of operations on synonyms (= sum of the values of synonym_operations)
      • records: Number of records
      • max_qps: The maximum number of query per second
      • avg_processing_time: Average processing time in milliseconds
      • data_size: Data size in bytes
      • file_size: File size in bytes
      • *: All of the above
    • period: from now
      • day: 1 day ago, 1 point per 1 hour (24 points)
      • month: 1 month ago (30 days), 1 point per day (30 points)
      • year: 1 year ago (365 days), 1 point per day (365 points)
  • HTTP Verb: GET
  • Description: This method gets a statistic over a period of time
  • Output:
    • t: Timestamp in milliseconds
    • v: value of the metric
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/usage/records/period/day"

When the query is successful, the HTTP response is a 200 OK and returns the metrics:

{
  "records": [{
    "t": 1455451200000,
    "v": 53863464
  }, {
    "t": 1455454800000,
    "v": 53897109
  }, {
    "t": 1455458400000,
    "v": 53931564
  }, {
    "t": 1455462000000,
    "v": 53972616
  }, {
    "t": 1455465600000,
    "v": 54016510
  }, {
    "t": 1455469200000,
    "v": 54064319
  }, {
    "t": 1455472800000,
    "v": 54107551
  }, {
    "t": 1455476400000,
    "v": 54151915
  }, {
    "t": 1455480000000,
    "v": 54196529
  }, {
    "t": 1455483600000,
    "v": 54233253
  }, {
    "t": 1455487200000,
    "v": 54266067
  }, {
    "t": 1455490800000,
    "v": 54293818
  }, {
    "t": 1455494400000,
    "v": 54315302
  }, {
    "t": 1455498000000,
    "v": 54334219
  }, {
    "t": 1455501600000,
    "v": 54351330
  }, {
    "t": 1455505200000,
    "v": 54367352
  }, {
    "t": 1455508800000,
    "v": 54354455
  }, {
    "t": 1455512400000,
    "v": 54065720
  }, {
    "t": 1455516000000,
    "v": 53936329
  }, {
    "t": 1455519600000,
    "v": 53954953
  }, {
    "t": 1455523200000,
    "v": 53974880
  }, {
    "t": 1455526800000,
    "v": 53994008
  }, {
    "t": 1455530400000,
    "v": 54015318
  }, {
    "t": 1455534000000,
    "v": 54025655
  }]
}

Errors:

Error Code

Reason

400

metric or period is not acceptable, see above

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Get usage index

  • Path: /1/usage/{statistic}/period/{period}/{index}
  • Parameters:
    • statistic
      • search_operations: Number of search operations by type (Simple queries, Multiple queries)
      • acl_operations: Number of ACL operations by type (Get Api Key, Get Api Keys, Add Api Key, Update Api Key, Delete Api Key)
      • indexing_operations: Number of indexing operations by type (Get settings, Set settings, Copy/Move index, Clear index, Delete index, Wait task, Get log, Browse)
      • record_operations: Number of operations in records by type (Batch, Add record, Delete record, Update record, Partial Update record)
      • total_indexing_operations: The total number of indexing operations (= sum of the values of indexing_operations)
      • total_search_operations: The total number of search operations (= sum of the values of search_operations)
      • total_acl_operations: The total number of acl operations (= sum of the values of acl_operations)
      • total_records_operations: The total number of records operations (= sum of the values of record_operations)
      • total_operations: The total number of operations (= total_indexing_operations + total_search_operations + total_acl_operations + total_records_operations)
      • records: Number of records
      • avg_processing_time: Average processing time in milliseconds
      • data_size: Data size in bytes
      • file_size: File size in bytes
      • *: All of the above
    • period: from now
      • day: 1 day (24 hours) ago
      • month: 1 month (31 days) ago
      • year: 1 year (12 months) ago
    • index: index name
  • HTTP Verb: GET
  • Description: This method gets a statistic over a period of time
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/usage/records/period/day/index/users"

When the query is successful, the HTTP response is a 200 OK and returns the metrics:

{
  "records": [{
    "t": 1455451200000,
    "v": 53863464
  }, {
    "t": 1455454800000,
    "v": 53897109
  }, {
    "t": 1455458400000,
    "v": 53931564
  }, {
    "t": 1455462000000,
    "v": 53972616
  }, {
    "t": 1455465600000,
    "v": 54016510
  }, {
    "t": 1455469200000,
    "v": 54064319
  }, {
    "t": 1455472800000,
    "v": 54107551
  }, {
    "t": 1455476400000,
    "v": 54151915
  }, {
    "t": 1455480000000,
    "v": 54196529
  }, {
    "t": 1455483600000,
    "v": 54233253
  }, {
    "t": 1455487200000,
    "v": 54266067
  }, {
    "t": 1455490800000,
    "v": 54293818
  }, {
    "t": 1455494400000,
    "v": 54315302
  }, {
    "t": 1455498000000,
    "v": 54334219
  }, {
    "t": 1455501600000,
    "v": 54351330
  }, {
    "t": 1455505200000,
    "v": 54367352
  }, {
    "t": 1455508800000,
    "v": 54354455
  }, {
    "t": 1455512400000,
    "v": 54065720
  }, {
    "t": 1455516000000,
    "v": 53936329
  }, {
    "t": 1455519600000,
    "v": 53954953
  }, {
    "t": 1455523200000,
    "v": 53974880
  }, {
    "t": 1455526800000,
    "v": 53994008
  }, {
    "t": 1455530400000,
    "v": 54015318
  }, {
    "t": 1455534000000,
    "v": 54025655
  }]
}

Errors:

Error Code

Reason

400

metric or period or index is not acceptable, see above

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Errors:

Error Code

Reason

400

metric or period is not acceptable, see above

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Monitoring API

Inventory servers

  • Path: /1/inventory/servers
  • HTTP Verb: GET
  • Description: This method gets all the clusters & replicas for this APP_ID
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/inventory/servers"

When the query is successful, the HTTP response is a 200 OK and returns the inventory: 7f3c958936c885de959cb4c55e45751e

{
  "inventory": [{
    "name": "c4-fr-1",
    "region": "eu",
    "is_replica": false,
    "cluster": "c4-fr"
  }, {
    "name": "c4-fr-2",
    "region": "eu",
    "is_replica": false,
    "cluster": "c4-fr"
  }, {
    "name": "c4-fr-3",
    "region": "eu",
    "is_replica": false,
    "cluster": "c4-fr"
  }]
}

Inventory probes

  • Path: /1/inventory/probes
  • HTTP Verb: GET
  • Description: This method gets all the probes associated with this APP_ID
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/inventory/probes"

When the query is successful, the HTTP response is a 200 OK and returns the probes:

{
  "probes": [{
    "name": "sdn-probe-frankfurt",
    "city": "Frankfurt",
    "country": "DE",
    "latitude": 50.110922,
    "longitude": 8.682127,
    "regions": ["eu", "de", "ru", "nl"]
  }, {
    "name": "sdn-probe-awswest1",
    "city": "N. California (AWS)",
    "country": "US",
    "latitude": 41.487222,
    "longitude": -120.5425,
    "regions": ["usw", "use", "ca", "usc"]
  }]
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Average latency

  • Path: /1/latency/{servers}
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the average latency from relevant probes for the servers passed in the URL
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/latency/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns average latency from releveant probes for these servers:

{
  "metrics": {
    "latency": {
      "c4-fr": [{
        "t": 1464524400000,
        "v": 28
      }, {
        "t": 1464525000000,
        "v": 29
      }, {
        "t": 1464525600000,
        "v": 29
      }]
    }
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Relevant latency

  • Path: /1/latency/{servers}/probes/relevant
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the latency from relevant probes for the servers passed in the URL
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/latency/c4-fr/probes/relevant"

When the query is successful, the HTTP response is a 200 OK and returns the latency from releveant probes for these servers:

{
  "metrics": {
    "latency_by_probes": {
      "c4-fr": {
        "sdn-probe-frankfurt": [{
          "t": 1464525000000,
          "v": 14
        }, {
          "t": 1464525600000,
          "v": 14
        }, {
          "t": 1464526200000,
          "v": 14
        }, {
          "t": 1464526800000,
          "v": 15
        }]
      }
    }
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Others latency

  • Path: /1/latency/{servers}/probes/others
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the latency from others probes for the servers passed in the URL
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/latency/c4-fr/probes/others"

When the query is successful, the HTTP response is a 200 OK and returns the latency from others probes for these servers:

{
  "metrics": {
    "latency_by_probes": {
      "c4-fr": {
        "sdn-probe-frankfurt": [{
          "t": 1464525000000,
          "v": 14
        }, {
          "t": 1464525600000,
          "v": 14
        }, {
          "t": 1464526200000,
          "v": 14
        }, {
          "t": 1464526800000,
          "v": 15
        }]
      }
    }
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Indexing time

  • Path: /1/indexing/{servers}
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the average indexing time for the servers passed in the URL
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/indexing/c4-fr"

When the query is successful, the HTTP response is a 200 OK and returns the average indexing time for the servers:

{
  "metrics": {
    "indexing": {
      "c4-fr": [{
        "t": 1464524400000,
        "v": 28
      }, {
        "t": 1464525000000,
        "v": 29
      }, {
        "t": 1464525600000,
        "v": 29
      }]
    }
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Server Reachability

  • Path: /1/reachability/{servers}/probes
  • Parameters:
    • servers: A coma separated list of the servers (ex: c4-fr,c3-eu)
  • HTTP Verb: GET
  • Description: This method gets the reachability for the servers passed in the URL
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/reachability/c4-fr/probes"

When the query is successful, the HTTP response is a 200 OK and returns the reachability for the servers passed in the URL:

{
  "c4-fr": {
    "sdn-probe-frankfurt": true,
    "sdn-probe-awswest1": true,
    "monitoring-2": true,
    "sdn-probe-rosario": true
  }
}

Errors:

Error Code

Reason

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

Infrastructure API

Infrastructure

Only available for Enterprise Customers

  • Path: /1/infrastructure/{metric}/period/{period}
  • Parameters:
    • metric
      • avg_build_time: Average build time of the indices in seconds
      • ssd_usage: SSD usage in % (0 means no utilisation)
      • ram_search_usage: RAM usage for the search in Mbytes
      • ram_indexing_usage: RAM usage for the indexing in Mbytes
      • cpu_usage: CPU usage in % (0 means no utilisation)
      • cpu_time: Time the cpu uses to compute the search in milliseconds
      • *: All of the above
    • period: from now
      • minute: 1 minute ago, 1 point per 10 seconds (10 points)
      • hour: 1 hour ago, 1 point per 1 minute (60 points)
      • day: 1 day ago, 1 point per 10 minutes (144 points)
      • week: 1 week ago, 1 point per 1 hour (168 points)
      • month: 1 month ago, 1 point per 1 day (30 points)
  • HTTP Verb: GET
  • Description: This method gets a metric over a period of time 
  • Output:
    • t: Timestamp in milliseconds
    • v: value of the metric
curl -X GET \
     -H "X-Algolia-API-Key: ${API_KEY}" \
     -H "X-Algolia-Application-Id: ${APPLICATION_ID}" \
     --compressed \
    "https://status.algolia.com/1/infrastructure/cpu_usage/period/minute"

When the query is successful, the HTTP response is a 200 OK and returns the metrics:

{
  "period": "1min",
  "metrics": {
    "cpu_usage": {
      "s4-fr": {
        "region": "fr",
        "data": [{
          "t": 1455101280,
          "v": 46
        }, {
          "t": 1455101290,
          "v": 46
        }, {
          "t": 1455101300,
          "v": 46
        }],
        "is_replica": true
      },
      "c3-use-1": {
        "region": "use",
        "data": [{
          "t": 1455101280,
          "v": 42
        }, {
          "t": 1455101290,
          "v": 42
        }, {
          "t": 1455101300,
          "v": 42
        }, {
          "t": 1455101310,
          "v": 37
        }],
        "cluster": "c3-use",
        "is_replica": false
      },
      "c3-use-2": {
        "region": "use",
        "data": [{
          "t": 1455101280,
          "v": 56
        }, {
          "t": 1455101290,
          "v": 56
        }, {
          "t": 1455101300,
          "v": 56
        }, {
          "t": 1455101310,
          "v": 56
        }, {
          "t": 1455101320,
          "v": 51
        }],
        "cluster": "c3-use",
        "is_replica": false
      },
      "c3-use-3": {
        "region": "use",
        "data": [{
          "t": 1455101280,
          "v": 51
        }, {
          "t": 1455101290,
          "v": 51
        }, {
          "t": 1455101300,
          "v": 51
        }, {
          "t": 1455101310,
          "v": 51
        }, {
          "t": 1455101320,
          "v": 64
        }],
        "cluster": "c3-use",
        "is_replica": false
      }
    }
  }
}

Errors:

Error Code

Reason

400

metric or period is not acceptable, see above

403

X-Algolia-API-Key or X-Algolia-Application-ID is invalid

© Algolia - Privacy Policy