Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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>
        }
    ],
    "tenantId": <tenant id>,
  

where the parameters are described as follows

Parameter

Description

actions

An array of asset sync actions

type

The sync type. Can be

  • sync

  • deleted

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

asset

This is the full asset response object. See example in API documentation DC 5.10 Getting assets by Id

integrationState

This is a state managed by the integration. See description below

assetStateHash

This is a hash of the above state

assetId

The assetId of the asset being synced

TenantId

Value controlled by KeyShot describing the tenant.

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.