Archive Search を実行してください

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}https://api.ap2.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}https://api.datadoghq.eu/api/v2/logs/archive_searches/{archive_search_id}https://api.ddog-gov.com/api/v2/logs/archive_searches/{archive_search_id}https://api.us2.ddog-gov.com/api/v2/logs/archive_searches/{archive_search_id}https://api.uk1.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}https://api.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}https://api.us3.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}https://api.us5.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}

概要

Get a single Archive Search, including its status and the amount of archive data scanned when the search finishes. This endpoint requires the logs_read_data permission.

引数

パスパラメーター

名前

タイプ

説明

archive_search_id [required]

string

Unique identifier of the Archive Search.

応答

OK

Response containing a single Archive Search.

Expand All

フィールド

タイプ

説明

data [required]

object

Archive Search object.

attributes [required]

object

Attributes of an Archive Search.

archive_id [required]

string

ID of the archive being searched.

bytes_scanned [required]

int64

Number of bytes read from the archive at the end of the search.

completed_at

date-time

Time the Archive Search finished, as an ISO 8601 timestamp. Absent while the search is still running.

created_at [required]

date-time

Time the Archive Search was created, as an ISO 8601 timestamp.

description

string

Free-text description of the Archive Search.

events_scanned [required]

int64

Number of events read from the archive at the end of the search.

expected_duration

int64

Estimated time left before the Archive Search completes, in seconds.

from [required]

date-time

Start of the searched time range, as an ISO 8601 timestamp.

name [required]

string

Name of the Archive Search.

query [required]

string

Log search query used to filter the archived logs.

rehydration

object

Rehydration settings of the Archive Search. Absent when the search only scans the archive without indexing the results.

max_rehydrated_events [required]

int64

Maximum number of events to rehydrate.

retention_days [required]

int64

Number of days the rehydrated logs are retained for.

tier [required]

enum

Storage tier the matched logs are rehydrated into. Allowed enum values: standard,flex

status [required]

enum

Current state of an Archive Search. Allowed enum values: RUNNING,COMPLETED,FAILED,CANCELLED,QUOTA_REACHED,EXPIRED

to [required]

date-time

End of the searched time range, as an ISO 8601 timestamp.

id [required]

string

Unique identifier of the Archive Search.

type [required]

enum

Archive Search resource type. Allowed enum values: archive_search

default: archive_search

{
  "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"
  }
}

Bad Request

API error response.

Expand All

フィールド

タイプ

説明

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short 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"
    }
  ]
}

Forbidden

API error response.

Expand All

フィールド

タイプ

説明

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short 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"
    }
  ]
}

Not Found

API error response.

Expand All

フィールド

タイプ

説明

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short 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.

Expand All

フィールド

タイプ

説明

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

                  # Path parameters
export archive_search_id="nv2eu4srgyzdkulggjzg2zkmmzifa2rum5iq"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/archive_searches/${archive_search_id}" \ -H "Accept: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}"