For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/synthetics/get-a-presigned-url-for-downloading-a-test-file.md. A documentation index is available at /llms.txt.
Language
Datadog site

테스트 파일 다운로드를 위한 사전 서명된 URL 가져오기

POSThttps://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.uk1.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/files/downloadhttps://api.us2.ddog-gov.com/api/v2/synthetics/tests/{public_id}/files/download

개요

Synthetic 테스트에 첨부된 파일을 다운로드하기 위한 사전 서명된 URL을 가져옵니다. 반환된 URL은 임시적이며 짧은 시간 후에 만료됩니다.

This endpoint requires the synthetics_read permission.

OAuth apps require the synthetics_read authorization scope to access this endpoint.

인수

경로 파라미터

이름
유형
설명
public_id [required]
string

The public ID of the Synthetic test.

요청

Body Data (required)

항목
유형
설명
bucketKey [required]
string

테스트 파일에 대한 사전 서명된 다운로드 URL을 가져오기 위한 요청 본문입니다.

응답

OK

Response containing a presigned URL for downloading a test file.

항목
유형
설명
url
string

A presigned URL to download the file. The URL expires after a short period.

코드 예시

# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
# Path parameters
export public_id="abc-def-123"

# 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 POST "https://api.${DD_SITE}/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF