{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/queue/v1/actions.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "description": "See taskcluster [actions](/docs/reference/platform/taskcluster-queue/docs/actions) documentation.\n",
  "items": {
    "additionalProperties": false,
    "description": "Actions provide a generic mechanism to expose additional features of a\nprovisioner, worker type, or worker to Taskcluster clients.\n\nAn action is comprised of metadata describing the feature it exposes,\ntogether with a webhook for triggering it.\n\nThe Taskcluster tools site, for example, retrieves actions when displaying\nprovisioners, worker types and workers. It presents the provisioner/worker\ntype/worker specific actions to the user. When the user triggers an action,\nthe web client takes the registered webhook, substitutes parameters into the\nURL (see `url`), signs the requests with the Taskcluster credentials of the\nuser operating the web interface, and issues the HTTP request.\n\nThe level to which the action relates (provisioner, worker type, worker) is\ncalled the action context. All actions, regardless of the action contexts,\nare registered against the provisioner when calling\n`queue.declareProvisioner`.\n\nThe action context is used by the web client to determine where in the web\ninterface to present the action to the user as follows:\n\n| `context`   | Tool where action is displayed |\n|-------------|--------------------------------|\n| provisioner | Provisioner Explorer           |\n| worker-type | Workers Explorer               |\n| worker      | Worker Explorer                |\n\nSee [actions docs](/docs/reference/platform/taskcluster-queue/docs/actions)\nfor more information.\n",
    "properties": {
      "context": {
        "description": "Actions have a \"context\" that is one of provisioner, worker-type, or worker, indicating\nwhich it applies to. `context` is used by the front-end to know where to display the action.\n\n| `context`   | Page displayed        |\n|-------------|-----------------------|\n| provisioner | Provisioner Explorer  |\n| worker-type | Workers Explorer      |\n| worker      | Worker Explorer       |\n",
        "enum": [
          "provisioner",
          "worker-type",
          "worker"
        ],
        "title": "Context",
        "type": "string"
      },
      "description": {
        "description": "Description of the provisioner.\n",
        "title": "Description",
        "type": "string"
      },
      "method": {
        "description": "Method to indicate the desired action to be performed for a given resource.\n",
        "enum": [
          "POST",
          "PUT",
          "DELETE",
          "PATCH"
        ],
        "title": "Method",
        "type": "string"
      },
      "name": {
        "description": "Short names for things like logging/error messages.\n",
        "title": "Name",
        "type": "string"
      },
      "title": {
        "description": "Appropriate title for any sort of Modal prompt.\n",
        "title": "Title"
      },
      "url": {
        "description": "When an action is triggered, a request is made using the `url` and `method`.\nDepending on the `context`, the following parameters will be substituted in the url:\n\n| `context`   | Path parameters                                          |\n|-------------|----------------------------------------------------------|\n| provisioner | <provisionerId>                                          |\n| worker-type | <provisionerId>, <workerType>                            |\n| worker      | <provisionerId>, <workerType>, <workerGroup>, <workerId> |\n\n_Note: The request needs to be signed with the user's Taskcluster credentials._\n",
        "title": "URL",
        "type": "string"
      }
    },
    "required": [
      "name",
      "title",
      "context",
      "url",
      "method",
      "description"
    ],
    "title": "Action",
    "type": "object"
  },
  "title": "Actions",
  "type": "array",
  "uniqueItems": true
}