Directives (v0)
Create a directive
Changed onDeprecated: use POST /robots/v1/directives instead. Creates a new directive that defines which Robots workflows should run against Mux assets, and under what resource conditions.
post/robots/v0/directives
Request
- Base URLhttps://api.mux.com
- Auth
- HTTP basic
- or HTTP bearer
Request body
Example request
{
"name": "Generate captions, then translate",
"subject": {
"type": "video.asset"
},
"resources": [
{
"reference_id": "captions_en",
"type": "video.asset.track",
"kind": "caption",
"language": "en",
"source": {
"via": "workflow",
"binding": "premium_captions"
}
}
],
"workflows": [
{
"reference_id": "premium_captions",
"workflow": "generate-premium-captions",
"params": {
"language_code": "en"
}
},
{
"reference_id": "translate_es",
"workflow": "translate-captions",
"inputs": [
"captions_en"
],
"params": {
"to_language_code": "es"
}
}
]
}Response
Directive created
Changes
- info
endpoint deprecated
- info
- breaking
added to the
//response propertyoneOflist for the response status - info
the
request property default valueenwas removed - info
added
analyze-structuregenerate-contextual-textdiscriminator mapping keys to the/request property - info
added to the
/request propertyoneOflist - info
the
response's property default valueenwas removed for the status - info
added
analyze-structuregenerate-contextual-textdiscriminator mapping keys to the//response property for the response status
- breaking