Directives (v0)

Create a directive

Changed on

Deprecated: 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 URL
    https://api.mux.com
  • Auth
    • HTTP basic
    • or HTTP bearer

Request body

namestring required

Human-readable directive name.

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

    • breaking

      added to the // response property oneOf list for the response status

    • info

      the request property default value en was removed

    • info

      added analyze-structure generate-contextual-text discriminator mapping keys to the / request property

    • info

      added to the / request property oneOf list

    • info

      the response's property default value en was removed for the status

    • info

      added analyze-structure generate-contextual-text discriminator mapping keys to the // response property for the response status