Download binary assets
POST
v1/collections/{collectionId}/exchanges/{exchangeId}/assets/binaries:download
Download the binary assets from an exchange in batches of 25. You can also download assets one-by-one, if desired. The response provides signed URLs to S3 buckets which expire after 60 seconds. In case of expiration, you can re-request the download URLs.
Resource Information
Method and URI | POST https://developer.api.autodesk.com/exchange/v1/collections/{collectionId}/exchanges/{exchangeId}/assets/binaries:download |
Authentication Context | app only |
Required OAuth Scopes | data:read |
Data Format | JSON |
Request
Headers
Authorization* string | Must be Bearer <token> , where <token> is obtained via OAuth |
Content-Type* string | Must be application/json |
* Required
Request
URI Parameters
collectionId string | The unique ID of the collection |
exchangeId string | The unique ID of the exchange |
Request
Body Structure
Expand all
binaries array: object | List of binary download requests |
id* string | Asset ID of the binary asset |
revisionId string | Revision ID of the binary asset. It is optional, and when empty, downloads the latest revision. |
contentType string | MIME type of the content to be downloaded |
contentDisposition string | Parameters to be applied during the download |
* Required
Response
HTTP Status Code Summary
200 OK | OK |
400 Bad Request | Bad Request |
403 Forbidden | Unauthorized |
Response
Body Structure (200)
Expand all
binaries array: object | List of binaries with download details |
id string | Asset ID of the binary asset |
revisionId string | Revision ID of the asset being downloaded |
downloadUrl string | The direct download URL of the file requested |
status string | Status of the download requested |
reason string | Reason for failure of the download requested |
Example
OK
Request
curl -v 'https://developer.api.autodesk.com/exchange/v1/collections/:collectionId/exchanges/:exchangeId/assets/binaries:download' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"binaries": [
{
"id": "24b7025-6594-3c85-a1a5-3146a0df58K2",
"revisionId": "24b7025-6594-3c85-a1a5-3146a0df58K2",
"contentType": "text/plain",
"contentDisposition": "attachment; filename=test.txt"
}
]
}'
Show More
Response
{
"binaries": [
{
"id": "24b7025-6594-3c85-a1a5-3146a0df58K2",
"revisionId": "7dd2-nf42h2-2ndu2i-qdd90-9879adcdcc",
"downloadUrl": "https://s3.amazonaws.com/com.autodesk.oss-opsstaging-persistent/da/39/a3/ee5e6b4b0d3255bfef95601890afd80709/29c82719a1a521282646914460a36674",
"status": "error",
"reason": "Not Found"
}
]
}
Show More