Set action configuration
SetActionConfiguration
Associates a number of action types with an annotation type. This means that when an annotation is created, it will trigger the associated actions to be executed.
Note: To update action types on an annotation type, all action type IDs and the configuration must be re-submitted. To help with this, you can retrieve the current action type IDs and configuration via the GET call.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The id of the annotation type to attach action types to
Body
The id of the annotation type to attach action types to
A map of action_type_id
to a set of key-value pairs containing all input fields for that action type, and their values.
For example, if there are two action types configured, create_clip
and share_to_instagram
, this map would look like:
{
"create_clip": {
"name": "Goal",
"relative_end_offset": 10000,
"relative_start_offset": -10000
},
"share_to_instagram": {
"clip_asset_id": "$create_clip.reserved_asset_id"
"social_media_post": "Have a look at this great goal! #soccer #goal #sports"
}
}
A few things to note:
- The values you specify in this payload must match the types as defined in the action type's
input_fields
field. - If you do not provide a value on an input field, the action type input field's default value will be used.
- If you want to pass the output of an action type as input to a following action type, you can use the
$
notation. The required format is$action_type_id.output_field
. The field name must be a field in the output of a previous action type. In the example above, theclip_asset_id
field in theshare_to_instagram
action type is populated with thereserved_asset_id
field from thecreate_clip
action type.
These actions are executed in parallel where possible, unless there is a dependency between actions, in which case the dependent action will wait for the dependency to complete.
The conditions under which the actions should be executed. If not provided, the actions will always be executed. If more than one condition is provided, all conditions must be met for the actions to be executed.
Response
The response is of type object
.