Skip to main content
GET
/
1
/
logs
curl
curl --request GET \
  --url 'https://algolia_application_id.algolia.net/1/logs?offset=0&length=10&indexName=products&type=all' \
  --header 'accept: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'
{
  "logs": [
    {
      "timestamp": "2023-03-08T12:34:56Z",
      "method": "GET",
      "answer_code": "200",
      "query_body": "{\\n \\\"requests\\\": [\\n  {\\n   \\\"indexName\\\": \\\"best_buy\\\",\\n   \\\"params\\\": \\\"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\\\"\\n  }\\n ]\\n}\\n",
      "answer": "'n{\\n \"results\": [\\n  {\\n   \"hits\": [\\n    {\\n     \"name\": \"Amazon - Fire TV Stick\",\\n     \"description\": \"Amazon Fire TV Stick connects to your TV's HDMI port. Just grab and go to enjoy Netflix, Prime Instant Video, Hulu Plus, YouTube.com, music, and much more.\",\\n     \"brand\": \"Amazon\",\\n     \"categories\": [\\n      \"TV & Home Theater\",\\n      \"Streaming Media Players\"\\n     ],\\n     \"hierarchicalCategories\": {\\n      \"lvl0\": \"TV & Home Theater\",\\n      \"lvl1\": \"TV & Home Theater > Streaming Media Players\"\\n     },\\n     \"type\": \"Streaming media player\",\\n     \"price\": 39.99,\\n     \"price_range\": \"1 }\\n   ]\\n  }\\n ]\\n}'\n",
      "url": "/1/indexes",
      "ip": "93.184.216.34",
      "query_headers": "User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\\nHost: example.com\\nAccept: */*\\nContent-Type: application/json; charset=utf-8\\nX-Algolia-API-Key: 20f***************************\\nX-Algolia-Application-Id: MyApplicationID\\n",
      "sha1": "26c53bd7e38ca71f4741b71994cd94a600b7ac68",
      "nb_api_calls": "1",
      "processing_time_ms": "2",
      "index": "products",
      "query_params": "query=georgia&attributesToRetrieve=name,city,country",
      "query_nb_hits": "1",
      "inner_queries": [
        {
          "index_name": "products",
          "user_token": "93.189.166.128",
          "query_id": "96f59a3145dd9bd8963dc223950507c8"
        }
      ]
    }
  ]
}
Required ACL: logs

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Query Parameters

offset
integer
default:0

First log entry to retrieve. The most recent entries are listed first.

length
integer
default:10

Maximum number of entries to retrieve.

Required range: x <= 1000
indexName
string | null

Index for which to retrieve log entries. By default, log entries are retrieved for all indices.

type
enum<string>
default:all

Type of log entries to retrieve. By default, all log entries are retrieved.

Available options:
all,
query,
build,
error

Response

OK

logs
log Β· object[]
required
⌘I