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

Complete a multipart upload of a test file

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

Overview

Complete a multipart file upload for a Synthetic test. Call this endpoint after all parts have been uploaded using the presigned URLs obtained from the multipart presigned URLs endpoint.

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 for the uploaded file.

parts [required]
[object]

Array of completed parts with their ETags.

uploadId [required]
string

The upload ID returned when the multipart upload was initiated.

Response

No Content

Code Example

# 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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "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-complete" \
-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",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "uploadId": "upload-id-abc123"
}
EOF