Directives

Create a directive

Changed on

Creates a new directive that defines which Robots workflows should run against Mux assets, and under what resource conditions.

post/robots/v1/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": "Moderate new assets",
  "subject": {
    "type": "video.asset"
  },
  "bindings": [
    {
      "reference_id": "moderation",
      "workflow": "moderate",
      "parameters": {
        "on_flagged": {
          "action": "delete_playback_ids"
        }
      }
    }
  ]
}

Response

V1 directive created

Example response

{
  "data": {
    "name": "Moderate new assets",
    "subject": {
      "type": "video.asset"
    },
    "bindings": [
      {
        "reference_id": "moderation",
        "workflow": "moderate",
        "parameters": {
          "on_flagged": {
            "action": "delete_playback_ids"
          }
        }
      }
    ],
    "id": "drv_example123",
    "resources": [],
    "_links": {
      "self": {
        "href": "/robots/v1/directives/drv_example123"
      }
    },
    "created_at": 1700000000,
    "updated_at": 1700000000
  }
}

Changes

    • info

      added the new optional request property ///////

    • info

      added the optional property //////////// to the response with the status

    • info

      endpoint added