Skip to content

Commit f7d8a05

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Synthetics test file upload and download endpoints (#3363)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4098def commit f7d8a05

20 files changed

+1343
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 374 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65511,6 +65511,149 @@ components:
6551165511
type: string
6551265512
x-enum-varnames:
6551365513
- SUITES
65514+
SyntheticsTestFileAbortMultipartUploadRequest:
65515+
description: Request body for aborting a multipart file upload.
65516+
properties:
65517+
key:
65518+
description: The full storage path of the file whose upload should be aborted.
65519+
example: "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
65520+
type: string
65521+
uploadId:
65522+
description: The upload ID of the multipart upload to abort.
65523+
example: "upload-id-abc123"
65524+
type: string
65525+
required:
65526+
- uploadId
65527+
- key
65528+
type: object
65529+
SyntheticsTestFileCompleteMultipartUploadPart:
65530+
description: A completed part of a multipart upload.
65531+
properties:
65532+
ETag:
65533+
description: The ETag returned by the storage provider after uploading the part.
65534+
example: '"d41d8cd98f00b204e9800998ecf8427e"'
65535+
type: string
65536+
PartNumber:
65537+
description: The 1-indexed part number for the multipart upload.
65538+
example: 1
65539+
format: int64
65540+
type: integer
65541+
required:
65542+
- ETag
65543+
- PartNumber
65544+
type: object
65545+
SyntheticsTestFileCompleteMultipartUploadRequest:
65546+
description: Request body for completing a multipart file upload.
65547+
properties:
65548+
key:
65549+
description: The full storage path for the uploaded file.
65550+
example: "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
65551+
type: string
65552+
parts:
65553+
description: Array of completed parts with their ETags.
65554+
items:
65555+
$ref: "#/components/schemas/SyntheticsTestFileCompleteMultipartUploadPart"
65556+
type: array
65557+
uploadId:
65558+
description: The upload ID returned when the multipart upload was initiated.
65559+
example: "upload-id-abc123"
65560+
type: string
65561+
required:
65562+
- uploadId
65563+
- key
65564+
- parts
65565+
type: object
65566+
SyntheticsTestFileDownloadRequest:
65567+
description: Request body for getting a presigned download URL for a test file.
65568+
properties:
65569+
bucketKey:
65570+
description: The bucket key referencing the file to download.
65571+
example: "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
65572+
minLength: 1
65573+
type: string
65574+
required:
65575+
- bucketKey
65576+
type: object
65577+
SyntheticsTestFileDownloadResponse:
65578+
description: Response containing a presigned URL for downloading a test file.
65579+
properties:
65580+
url:
65581+
description: A presigned URL to download the file. The URL expires after a short period.
65582+
example: "https://storage.example.com/presigned-download-url"
65583+
type: string
65584+
type: object
65585+
SyntheticsTestFileMultipartPresignedUrlsParams:
65586+
description: Presigned URL parameters returned for a multipart upload.
65587+
properties:
65588+
key:
65589+
description: The full storage path for the file being uploaded.
65590+
example: "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
65591+
type: string
65592+
upload_id:
65593+
description: The upload ID assigned by the storage provider for this multipart upload.
65594+
example: "upload-id-abc123"
65595+
type: string
65596+
urls:
65597+
additionalProperties:
65598+
type: string
65599+
description: A map of part numbers to presigned upload URLs.
65600+
example:
65601+
"1": "https://storage.example.com/presigned-upload-url-part-1"
65602+
"2": "https://storage.example.com/presigned-upload-url-part-2"
65603+
type: object
65604+
type: object
65605+
SyntheticsTestFileMultipartPresignedUrlsPart:
65606+
description: A part descriptor for initiating a multipart upload.
65607+
properties:
65608+
md5:
65609+
description: Base64-encoded MD5 digest of the part content.
65610+
example: "1B2M2Y8AsgTpgAmY7PhCfg=="
65611+
maxLength: 24
65612+
minLength: 22
65613+
type: string
65614+
partNumber:
65615+
description: The 1-indexed part number for the multipart upload.
65616+
example: 1
65617+
format: int64
65618+
type: integer
65619+
required:
65620+
- md5
65621+
- partNumber
65622+
type: object
65623+
SyntheticsTestFileMultipartPresignedUrlsRequest:
65624+
description: Request body for getting presigned URLs for a multipart file upload.
65625+
properties:
65626+
bucketKeyPrefix:
65627+
$ref: "#/components/schemas/SyntheticsTestFileMultipartPresignedUrlsRequestBucketKeyPrefix"
65628+
parts:
65629+
description: Array of part descriptors for the multipart upload.
65630+
items:
65631+
$ref: "#/components/schemas/SyntheticsTestFileMultipartPresignedUrlsPart"
65632+
type: array
65633+
required:
65634+
- bucketKeyPrefix
65635+
- parts
65636+
type: object
65637+
SyntheticsTestFileMultipartPresignedUrlsRequestBucketKeyPrefix:
65638+
description: The bucket key prefix indicating the type of file upload.
65639+
enum:
65640+
- api-upload-file
65641+
- browser-upload-file-step
65642+
example: "api-upload-file"
65643+
type: string
65644+
x-enum-varnames:
65645+
- API_UPLOAD_FILE
65646+
- BROWSER_UPLOAD_FILE_STEP
65647+
SyntheticsTestFileMultipartPresignedUrlsResponse:
65648+
description: Response containing presigned URLs for multipart file upload and the bucket key.
65649+
properties:
65650+
bucketKey:
65651+
description: The bucket key that references the uploaded file after completion.
65652+
example: "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
65653+
type: string
65654+
multipart_presigned_urls_params:
65655+
$ref: "#/components/schemas/SyntheticsTestFileMultipartPresignedUrlsParams"
65656+
type: object
6551465657
SyntheticsTestOptions:
6551565658
description: Object describing the extra options for a Synthetic test.
6551665659
properties:
@@ -107374,6 +107517,237 @@ paths:
107374107517
permissions:
107375107518
- synthetics_write
107376107519
- synthetics_create_edit_trigger
107520+
/api/v2/synthetics/tests/{public_id}/files/download:
107521+
post:
107522+
description: |-
107523+
Get a presigned URL to download a file attached to a Synthetic test.
107524+
The returned URL is temporary and expires after a short period.
107525+
operationId: GetTestFileDownloadUrl
107526+
parameters:
107527+
- description: The public ID of the Synthetic test.
107528+
in: path
107529+
name: public_id
107530+
required: true
107531+
schema:
107532+
example: abc-def-123
107533+
type: string
107534+
requestBody:
107535+
content:
107536+
application/json:
107537+
schema:
107538+
$ref: "#/components/schemas/SyntheticsTestFileDownloadRequest"
107539+
required: true
107540+
responses:
107541+
"200":
107542+
content:
107543+
application/json:
107544+
schema:
107545+
$ref: "#/components/schemas/SyntheticsTestFileDownloadResponse"
107546+
description: OK
107547+
"400":
107548+
content:
107549+
application/json:
107550+
schema:
107551+
$ref: "#/components/schemas/APIErrorResponse"
107552+
description: API error response.
107553+
"403":
107554+
content:
107555+
application/json:
107556+
schema:
107557+
$ref: "#/components/schemas/APIErrorResponse"
107558+
description: Forbidden.
107559+
"404":
107560+
content:
107561+
application/json:
107562+
schema:
107563+
$ref: "#/components/schemas/APIErrorResponse"
107564+
description: API error response.
107565+
"429":
107566+
$ref: "#/components/responses/TooManyRequestsResponse"
107567+
security:
107568+
- apiKeyAuth: []
107569+
appKeyAuth: []
107570+
- AuthZ:
107571+
- synthetics_read
107572+
summary: Get a presigned URL for downloading a test file
107573+
tags:
107574+
- Synthetics
107575+
x-permission:
107576+
operator: OR
107577+
permissions:
107578+
- synthetics_read
107579+
/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls:
107580+
post:
107581+
description: |-
107582+
Get presigned URLs for uploading a file to a Synthetic test using multipart upload.
107583+
Returns the presigned URLs for each part along with the bucket key that references the file.
107584+
operationId: GetTestFileMultipartPresignedUrls
107585+
parameters:
107586+
- description: The public ID of the Synthetic test.
107587+
in: path
107588+
name: public_id
107589+
required: true
107590+
schema:
107591+
example: abc-def-123
107592+
type: string
107593+
requestBody:
107594+
content:
107595+
application/json:
107596+
schema:
107597+
$ref: "#/components/schemas/SyntheticsTestFileMultipartPresignedUrlsRequest"
107598+
required: true
107599+
responses:
107600+
"200":
107601+
content:
107602+
application/json:
107603+
schema:
107604+
$ref: "#/components/schemas/SyntheticsTestFileMultipartPresignedUrlsResponse"
107605+
description: OK
107606+
"400":
107607+
content:
107608+
application/json:
107609+
schema:
107610+
$ref: "#/components/schemas/APIErrorResponse"
107611+
description: API error response.
107612+
"403":
107613+
content:
107614+
application/json:
107615+
schema:
107616+
$ref: "#/components/schemas/APIErrorResponse"
107617+
description: Forbidden.
107618+
"404":
107619+
content:
107620+
application/json:
107621+
schema:
107622+
$ref: "#/components/schemas/APIErrorResponse"
107623+
description: API error response.
107624+
"429":
107625+
$ref: "#/components/responses/TooManyRequestsResponse"
107626+
security:
107627+
- apiKeyAuth: []
107628+
appKeyAuth: []
107629+
- AuthZ:
107630+
- synthetics_write
107631+
summary: Get presigned URLs for uploading a test file
107632+
tags:
107633+
- Synthetics
107634+
x-permission:
107635+
operator: OR
107636+
permissions:
107637+
- synthetics_write
107638+
- synthetics_create_edit_trigger
107639+
/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort:
107640+
post:
107641+
description: |-
107642+
Abort an in-progress multipart file upload for a Synthetic test. This cancels the upload
107643+
and releases any storage used by already-uploaded parts.
107644+
operationId: AbortTestFileMultipartUpload
107645+
parameters:
107646+
- description: The public ID of the Synthetic test.
107647+
in: path
107648+
name: public_id
107649+
required: true
107650+
schema:
107651+
example: abc-def-123
107652+
type: string
107653+
requestBody:
107654+
content:
107655+
application/json:
107656+
schema:
107657+
$ref: "#/components/schemas/SyntheticsTestFileAbortMultipartUploadRequest"
107658+
required: true
107659+
responses:
107660+
"204":
107661+
description: No Content
107662+
"400":
107663+
content:
107664+
application/json:
107665+
schema:
107666+
$ref: "#/components/schemas/APIErrorResponse"
107667+
description: API error response.
107668+
"403":
107669+
content:
107670+
application/json:
107671+
schema:
107672+
$ref: "#/components/schemas/APIErrorResponse"
107673+
description: Forbidden.
107674+
"404":
107675+
content:
107676+
application/json:
107677+
schema:
107678+
$ref: "#/components/schemas/APIErrorResponse"
107679+
description: API error response.
107680+
"429":
107681+
$ref: "#/components/responses/TooManyRequestsResponse"
107682+
security:
107683+
- apiKeyAuth: []
107684+
appKeyAuth: []
107685+
- AuthZ:
107686+
- synthetics_write
107687+
summary: Abort a multipart upload of a test file
107688+
tags:
107689+
- Synthetics
107690+
x-permission:
107691+
operator: OR
107692+
permissions:
107693+
- synthetics_write
107694+
- synthetics_create_edit_trigger
107695+
/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete:
107696+
post:
107697+
description: |-
107698+
Complete a multipart file upload for a Synthetic test. Call this endpoint after all parts
107699+
have been uploaded using the presigned URLs obtained from the multipart presigned URLs endpoint.
107700+
operationId: CompleteTestFileMultipartUpload
107701+
parameters:
107702+
- description: The public ID of the Synthetic test.
107703+
in: path
107704+
name: public_id
107705+
required: true
107706+
schema:
107707+
example: abc-def-123
107708+
type: string
107709+
requestBody:
107710+
content:
107711+
application/json:
107712+
schema:
107713+
$ref: "#/components/schemas/SyntheticsTestFileCompleteMultipartUploadRequest"
107714+
required: true
107715+
responses:
107716+
"204":
107717+
description: No Content
107718+
"400":
107719+
content:
107720+
application/json:
107721+
schema:
107722+
$ref: "#/components/schemas/APIErrorResponse"
107723+
description: API error response.
107724+
"403":
107725+
content:
107726+
application/json:
107727+
schema:
107728+
$ref: "#/components/schemas/APIErrorResponse"
107729+
description: Forbidden.
107730+
"404":
107731+
content:
107732+
application/json:
107733+
schema:
107734+
$ref: "#/components/schemas/APIErrorResponse"
107735+
description: API error response.
107736+
"429":
107737+
$ref: "#/components/responses/TooManyRequestsResponse"
107738+
security:
107739+
- apiKeyAuth: []
107740+
appKeyAuth: []
107741+
- AuthZ:
107742+
- synthetics_write
107743+
summary: Complete a multipart upload of a test file
107744+
tags:
107745+
- Synthetics
107746+
x-permission:
107747+
operator: OR
107748+
permissions:
107749+
- synthetics_write
107750+
- synthetics_create_edit_trigger
107377107751
/api/v2/synthetics/tests/{public_id}/parent-suites:
107378107752
get:
107379107753
description: Get the list of parent suites and their status for a given Synthetic test.

0 commit comments

Comments
 (0)