Retrieve an exchange snapshot
GET
v1/collections/{collectionId}/exchanges/{exchangeId}/snapshots:exchange
An exchange snapshot is a specification of what is included in each exchange fulfillment. The exchange snapshot provides a count of what is created, modified, and removed in that snapshot. You can subscribe to an exchange snapshot ID to receive events related to assets being added, changed, or removed.
Resource Information
Method and URI | GET https://developer.api.autodesk.com/exchange/v1/collections/{collectionId}/exchanges/{exchangeId}/snapshots:exchange |
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 |
* Required
Request
URI Parameters
collectionId string | The unique ID of the collection |
exchangeId string | The unique ID of the exchange |
Response
HTTP Status Code Summary
200 OK | A list of snapshots was retrieved successfully. |
400 Bad Request | The request is invalid. |
401 Unauthorized | Invalid authorization header. |
403 Forbidden | Access denied regardless of authorization status. |
404 Not Found | The specified resource was not found. |
500 Internal Server Error | Unexpected service interruption. |
Response
Body Structure (200)
Expand all
createdBy object | The information on the user or service that last modified the entity. |
userId string | The user ID that created / modified the entity. |
serviceId string | The service ID that created / modified the entity. |
date datetime: ISO 8601 | Timestamp in the following format: YYYY-MM-DDThh:mm:ss.sz . |
lastModifiedBy object | The information on the user or service that last modified the entity. |
userId string | The user ID that created / modified the entity. |
serviceId string | The service ID that created / modified the entity. |
date datetime: ISO 8601 | Timestamp in the following format: YYYY-MM-DDThh:mm:ss.sz . |
id string | The unique ID of the snapshot |
type string | The type of snapshot |
attributes object | |
name string | The name of the attribute |
value string | The value of the attribute |
category string | The category of the attribute. Possible values: system , application , internal . |
components object | All components associated with this exchange |
id string | The unique ID of the entity |
url string | The relative URL to get the entity’s components |
data object | See HFDM Schema Specification 1.0 - Change Sets |
insert object | Components to be inserted |
* object | Components to be inserted |
modify object | Components to be modified |
* object | Components to be modified |
remove array: string | Component IDs to be removed |
revisionId string | The ID of the latest revision of the asset |
deleted boolean | True if the snapshot has been deleted, otherwise false |
Example
A list of snapshots was retrieved successfully.
Request
curl -v 'https://developer.api.autodesk.com/exchange/v1/collections/:collectionId/exchanges/:exchangeId/snapshots:exchange' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a'
Response
{
"createdBy": {
"userId": "QTCWNHC87PKH",
"serviceId": "test-client-id",
"date": "2021-07-07T17:30:31.395476Z"
},
"lastModifiedBy": {
"userId": "QTCWNHC87PKH",
"serviceId": "test-client-id",
"date": "2021-07-07T17:30:31.395476Z"
},
"id": "38e928ee-2000-387f-b253-62c98ef30ba4",
"type": "autodesk.fdx:exchange.snapshot-1.0.0",
"attributes": {
"name": "rootAssetId",
"value": "ec78857a-9831-3fdf-b598-8c7214a30d33_STABLE1",
"category": "application"
},
"components": {
"id": "entityId",
"url": "/entityType/entityId/components",
"data": {
"insert": {
"autodesk.fdx:test-1.0.0": {
"test": {
"String": {
"prop1": "value1",
"prop2": "value2"
}
}
}
},
"modify": {
"autodesk.fdx:test-1.0.0": {
"test": {
"String": {
"prop1": "value3"
}
}
}
},
"remove": [
"autodesk.fdx:test-1.0.0"
]
}
},
"revisionId": "1640687055590_3a6742cd-a83a-3487-86da-f121cd5ddf09",
"deleted": false
}
Show More