List Archive Searches
https://api.datadoghq.com/api/v2/logs/archive_searcheshttps://api.us3.datadoghq.com/api/v2/logs/archive_searcheshttps://api.us5.datadoghq.com/api/v2/logs/archive_searcheshttps://api.datadoghq.eu/api/v2/logs/archive_searcheshttps://api.ap1.datadoghq.com/api/v2/logs/archive_searcheshttps://api.ap2.datadoghq.com/api/v2/logs/archive_searcheshttps://api.uk1.datadoghq.com/api/v2/logs/archive_searcheshttps://api.ddog-gov.com/api/v2/logs/archive_searcheshttps://api.us2.ddog-gov.com/api/v2/logs/archive_searchesPrésentation
List the organization's Archive Searches that haven't expired, up to 5,000. When more
exist, meta.truncated is true.
Réponse
OK
Response containing multiple Archive Searches.
data [required]Array of Archive Searches.
attributes [required]Attributes of an Archive Search.
archive_id [required]ID of the archive being searched.
bytes_scanned [required]Number of bytes read from the archive at the end of the search.
completed_atTime the Archive Search finished, as an ISO 8601 timestamp. Absent while the search is still running.
created_at [required]Time the Archive Search was created, as an ISO 8601 timestamp.
descriptionFree-text description of the Archive Search.
events_scanned [required]Number of events read from the archive at the end of the search.
expected_durationEstimated time left before the Archive Search completes, in seconds.
from [required]Start of the searched time range, as an ISO 8601 timestamp.
name [required]Name of the Archive Search.
query [required]Log search query used to filter the archived logs.
rehydrationRehydration settings of the Archive Search. Absent when the search only scans the archive without indexing the results.
max_rehydrated_events [required]Maximum number of events to rehydrate.
retention_days [required]Number of days the rehydrated logs are retained for.
tier [required]Storage tier the matched logs are rehydrated into.
standard, flexstatus [required]Current state of an Archive Search.
RUNNING, COMPLETED, FAILED, CANCELLED, QUOTA_REACHED, EXPIREDto [required]End of the searched time range, as an ISO 8601 timestamp.
id [required]Unique identifier of the Archive Search.
type [required]Archive Search resource type.
archive_searcharchive_searchmetaMetadata of the Archive Searches response.
truncatedWhether more Archive Searches exist beyond the ones returned.
{
"data": [
{
"attributes": {
"archive_id": "mhmyYmyLTOaFYKvhNadu1w",
"bytes_scanned": 402764439,
"completed_at": "2026-01-02T12:30:00Z",
"created_at": "2026-01-02T12:00:00Z",
"description": "Investigating the checkout latency spike.",
"events_scanned": 1500,
"expected_duration": 120,
"from": "2026-01-01T00:00:00Z",
"name": "checkout-latency-investigation",
"query": "service:checkout status:error",
"rehydration": {
"max_rehydrated_events": 1000000,
"retention_days": 15,
"tier": "standard"
},
"status": "RUNNING",
"to": "2026-01-02T00:00:00Z"
},
"id": "nv2eu4srgyzdkulggjzg2zkmmzifa2rum5iq",
"type": "archive_search"
}
],
"meta": {
"truncated": false
}
}Forbidden
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Exemple de code
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/logs/archive_searches" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"