For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/api/latest/synthetics/abort-a-multipart-upload-of-a-test-file.md. A documentation index is available at /llms.txt.
Language
Datadog site

Abort a multipart upload of a test file

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

Overview

Abort an in-progress multipart file upload for a Synthetic test. This cancels the upload and releases any storage used by already-uploaded parts.

This endpoint requires any of the following permissions:

  • synthetics_write
  • synthetics_create_edit_trigger

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

Arguments

Path Parameters

Name
Type
Description
public_id [required]
string

The public ID of the Synthetic test.

Request

Body Data (required)

Field
Type
Description
key [required]
string

The full storage path of the file whose upload should be aborted.

uploadId [required]
string

The upload ID of the multipart upload to abort.

Response

No Content

Code Example

Abort a multipart upload of a test file
# 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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
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/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
EOF