API Reference

Initiate an export of a sample attachment

Description

Asynchronously exports an attachment for a sample to .PDF.

Responses include a Location header, which indicates where to poll for export results. For more details on long-running job polling, see Operations endpoint. When the export completes, its status will be completed, and the response body includes a resourceURL. To download the exported file, perform a GET on the resourceURL with the same authentication credentials and flow as the export request. For more details, see Authentication documentation.

POST /testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples/{sampleId}/attachments/{attachmentId}/export

🚧

Required OAuth Scopes:

graph:read

Parameters

ParameterInTypeRequiredDescription
testFormIdpathstringtrueThe unique identifier of the test form
testPhaseIdpathstringtrueThe unique identifier of the test phase
matrixIdpathstringtrueThe unique identifier of the matrix
sampleIdpathstringtrueThe unique identifier of the sample
attachmentIdpathstringtrueThe unique identifier of the attachment
bodybodyGraphAttachmentExporttrueDetails about the attachment export

Body parameter example

{
  "format": "pdf"
}

Code Samples

curl -X POST https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples/{sampleId}/attachments/{attachmentId}/export  \ 
-H 'Content-Type: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http POST https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples/{sampleId}/attachments/{attachmentId}/export  \ 
Content-Type:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples/{sampleId}/attachments/{attachmentId}/export" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples/{sampleId}/attachments/{attachmentId}/export', headers = headers)

print(r.headers['Location'])

Returns

202 - Accepted

HeaderDescription
LocationThe location to poll for the operation result.
Retry-AfterThe number of seconds to wait before polling for a result and between polling attempts.