...
The list icon provide all the successfully tracked assets. Similarly to the failed overview the assets may be forced to re-sync. Additionally this view provides a Sync all assets button. Be careful when clicking this as this executes a full re-synchronization of all assets matching the provided asset filters for the integration.
Rest API
The API that must be made available configured to receive events on the Endpoint URL must follow the below description.
It must be a POST API that takes the following JSON input
Code Block |
---|
{
"actions": [
{
"type": "<sync type>",
"asset": <the full asset response object>
"integrationState": <integration state as json string>,
"assetStateHash": <hash of the saved integration state>,
"assetId": <asset id>
}
],
"configuration": <the configuration object provided when registering the endpoint>
"tenantId": <tenant id>,
|
where the parameters are described as follows
Parameter | Description |
---|---|
| An array of asset sync actions. See below |
| If custom configuration is supplied. This is included in this property. |
| Value controlled by KeyShot describing the tenant. |
The actions are defined as follows
Parameter | Description |
---|---|
| The sync type. Can be
where sync covers both create and update. If the state is not null then the asset is tracked and hence the sync can be considered an update |
| This is the full asset response object. See example in API documentation DC 5.10 Getting assets by Id |
| This is a state managed by the integration. See description below |
| This is a hash of the above state |
| The assetId of the asset being synced |
The integrationState
is an object controlled by the integration. For the KeyShot API it is just serialized into a json string and saved in the database. This state is then parsed along in the API request if the asset has already been synchronized before. This means that the integration it self controls what is in the state and it receives it on update to be used to determine what should happen with the asset.
Examples of what could be included in the state
Unique identifiers of external system
Asset hash (to determine if files should be updated)
And other properties that can be used to determine how the sync should be handled.
The response to the API must return a 200 OK status code and the following JSON output
Code Block |
---|
{
"Items": [
{
"AssetId": <assetid of sync>
"IntegrationState": <Json string of integration state>
}
]
} |
Where each item corresponds to a sync action and must contain the assetid and the JSON string value of the corresponding sync state.