Workflow

Get the workflow schema

GET/api/v1/workflows/schema

Returns the catalogue a workflow is built from: every trigger, condition and action with its id, the operators a condition accepts and the shape of the value each one takes, plus the rules for combining them. Read it before creating or updating a workflow; the same catalogue is used to validate those requests.

Where a value is an id (valueSource / source, for example queue, user, tag), look the id up with the matching endpoint of this API.

Required ability: workflows:read.

Request

Authorization

Bearer Token

Provide your API token in the Authorization header. See Authentication to issue one.

Example:Authorization: Bearer ********************

Query Params
  • typestringoptional

    Optional. Only workflow has a schema; sla and ticket_sla are answered with 400.

    Allowed values:"workflow"

Responses

200

The catalogue. The example is shortened.

  • typestringoptional

    Allowed values:"workflow"

  • triggersarray[object]optional
    Child attributes
    • idstringoptional

      The value to put in trigger.events.

    • namestringoptional
    • descriptionstringoptional
    • supportsDelaybooleanoptional

      Whether the trigger needs trigger.delaySeconds.

    • exclusivebooleanoptional

      Whether the trigger must be the only one.

  • conditionsarray[object]optional
    Child attributes
    • idstringoptional

      The value to put in a condition's key.

    • namestringoptional
    • operatorsarray[string]optional
    • operatorOptionalbooleanoptional
    • valueTypestringoptional

      The shape of the condition's values.

    • valueSourcestringoptional

      What kind of id the value is, when it is one.

    • notesstringoptional
  • actionsarray[object]optional
    Child attributes
    • idstringoptional

      The value to put in an action's key.

    • namestringoptional
    • descriptionstringoptional
    • valueTypestringoptional

      Whether the action's values is a string or an object.

    • fieldsarray[object]optional

      The fields of an object values.

    • valueobjectoptional

      The rule for a string values.

    • repeatablebooleanoptional

      Whether the action may appear more than once.

    • supportsStampbooleanoptional
    • nullablebooleanoptional
  • operatorsarray[object]optional
    Child attributes
    • idstringoptional
    • namestringoptional
  • conditionExtrasarray[string]optional

    Optional display fields a condition may carry.

  • actionExtrasarray[string]optional

    Optional fields an action may carry.

  • rulesarray[string]optional

    The rules for combining triggers, conditions and actions, in plain text.

400

type is not workflow.

  • messagestringrequired
  • errorstringoptional
  • statusCodeintegerrequired
401

The API token is missing or invalid.

403

The API token does not have the ability this endpoint requires. See "Token abilities" in the introduction.

  • messagestringrequired
  • errorstringoptional
  • statusCodeintegerrequired