Workflows
Workflows are dedicated to policy batch manipulations and large changes. You can trigger a new job for any workflow through their dedicated endpoint. This first step returns a job execution id, that can be used to poll results thanks to the getJobStatus
endpoint.
Batch Assets Management
Our first workflow is batchAssetState
, which allows you to request a list of asset states to be created or edited. We advise to use this endpoint when you have large fleets or manage your policy on your own.
When calling the batchAssetState
endpoint, you need to specify the asset state of all active assets on your policy, along with an operation.
We introduced the new externalAssetId
attribute to interface with your own system, and allows you to track assets creations and updates.
There are currently four types of operation:
- CREATE: The new asset will be create as specified, if no asset already exists with the same
externalAssetId
- UPDATE: Update the existing asset that matches the
externalAssetId
- STOP: Stop the existing asset that matches the
externalAssetId
- NOTHING: The asset matching the
externalAssetId
remains unchanged
The philosophy of the batchAssetState
workflow is for you to specify the expected state of the whole policy and the expected modifications, as a safety check.
Troubleshooting common errors
Invalid batch fleet size
This error is caused by a mismatch between the given asset fleet and the existing fleet on your policy:
- You have assets on your policy without an
externalAssetId
, making the mapping to the given asset states impossible. - It also happens that existing assets on the policy are missing in the given states.
Failed batch validation
When getting this error, you should look at the error list in details for items with isValid=false
, which describe the error(s) blocking the asset creation or edition. Those errors will clearly state the cause of failure, be it an invalid operation, missing asset with the given externalAssetId
, etc.