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",
"processing_time_ms": "2",
"nb_api_calls": "1",
"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"
}
]
}
]
}The request must be authenticated by an API key with the logs ACL.
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",
"processing_time_ms": "2",
"nb_api_calls": "1",
"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"
}
]
}
]
}logsYour Algolia application ID.
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.
First log entry to retrieve. The most recent entries are listed first.
Maximum number of entries to retrieve.
x <= 1000Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
Type of log entries to retrieve. By default, all log entries are retrieved.
all, query, build, error OK
Show child attributes
Date and time of the API request, in RFC 3339 format.
"2023-03-08T12:34:56Z"
HTTP method of the request.
"GET"
HTTP status code of the response.
"200"
Request body.
1000"{\\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"
Response body.
1000"'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 of the API endpoint.
"/1/indexes"
IP address of the client that performed the request.
"93.184.216.34"
Request headers (API keys are obfuscated).
"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 signature of the log entry.
"26c53bd7e38ca71f4741b71994cd94a600b7ac68"
Processing time for the query in milliseconds. This doesn't include latency due to the network.
"2"
Number of API requests.
"1"
Index targeted by the query.
"products"
Query parameters sent with the request.
"query=georgia&attributesToRetrieve=name,city,country"
Number of search results (hits) returned for the query.
"1"
Queries performed for the given request.
Was this page helpful?