Update a status automation

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

Close
PUT /data/status-automations/{instance_id}

Update the fields of a status automation. Send only the fields to change. You cannot change id, created_at, updated_at. Dates use the ISO 8601 format. The automation is validated when you change its trigger, entity type or output. You must be an administrator.

Path parameters

  • instance_id string(uuid) Required

    Unique identifier of the status automation

application/json

Body Required

  • entity_type string

    Type of entity of the tasks (asset, shot, sequence, episode or edit). Empty means asset.

    Default value is asset.

  • in_conditions object

    Conditions that start the automation. It runs when a comment changes a task status and turns the group from false to true. A condition is met when every task of its task type on the entity has one of its statuses, and a condition on a task type that the entity has no task of is ignored. Each task type appears once and belongs to the entity type. With a status output, the task type that the automation changes cannot be a condition, and a condition on a task type after it in the production never starts the automation: under and it still has to be met, under or it is left out. Other keys are refused.

    Additional properties are NOT allowed.

    Hide in_conditions attributes Show in_conditions attributes object
    • operator string Required

      Values are and or or.

    • conditions array[object] Required

      At least 1 but not more than 10 elements.

      Hide conditions attributes Show conditions attributes object
      • task_type_id string(uuid) Required
      • task_status_ids array[string(uuid)] Required

        At least 1 element.

  • in_task_type_id string(uuid) | null Deprecated

    Task type that starts the automation, with in_task_status_id, when in_conditions is not given or sent back as stored. Both null next to in_conditions, they are ignored. The pair cannot clear the trigger: archive the automation instead. Refused on an automation whose trigger has several conditions or statuses.

  • in_task_status_id string(uuid) | null Deprecated

    Task status that starts the automation, see in_task_type_id

  • out_field_type string

    Field that the automation changes. ready_for applies to assets only.

    Values are status or ready_for.

  • out_task_type_id string(uuid)

    Task type that the automation changes

  • out_task_status_id string(uuid) | null

    New task status, null with a ready for output

  • out_only_if_task_status_ids array[string(uuid)] | null

    With a status output, the change applies only to a task in one of these statuses. Empty or null means always.

  • import_last_revision boolean

    Copy the last preview to the changed task, from the task of the first condition the entity has with and, from the commented task with or

  • archived boolean

Responses

  • 200 application/json

    The updated status automation

    Hide response attributes Show response attributes object
    • id string(uuid)
    • entity_type string
    • in_conditions object | null
    • in_task_type_id string(uuid) | null Deprecated

      Set for a trigger of one condition with one status only

    • in_task_status_id string(uuid) | null Deprecated

      Set for a trigger of one condition with one status only

    • out_field_type string
    • out_task_type_id string(uuid)
    • out_task_status_id string(uuid) | null
    • out_only_if_task_status_ids array[string(uuid)] | null
    • import_last_revision boolean
    • archived boolean
    • created_at string(date-time)
    • updated_at string(date-time)
  • 400

    The body is not valid, a date is not valid, a field breaks a database constraint, or the automation is not valid, for example "Trigger operator must be 'and' or 'or'.", "Task type Layout is not a task type of assets.", "Task type Layout appears in two conditions: merge their statuses into one." or "This automation has several trigger conditions: update it through in_conditions."

  • 403

    You are not an administrator

  • 404

    The status automation does not exist

PUT /data/status-automations/{instance_id}
curl -X PUT "http://api.example.com/data/status-automations/a24a6ea4-ce75-4665-a070-57453082c25" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "field_name": "ready_for",
  "field_value": "approved"
}'
import requests

url = "http://api.example.com/data/status-automations/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "field_name": "ready_for",
    "field_value": "approved"
}

response = requests.put(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
Request examples
{
  "entity_type": "asset",
  "in_conditions": {
    "operator": "and",
    "conditions": [
      {
        "task_type_id": "b24a6ea4-ce75-4665-a070-57453082c250",
        "task_status_ids": [
          "c24a6ea4-ce75-4665-a070-57453082c250"
        ]
      },
      {
        "task_type_id": "d24a6ea4-ce75-4665-a070-57453082c250",
        "task_status_ids": [
          "c24a6ea4-ce75-4665-a070-57453082c250",
          "e24a6ea4-ce75-4665-a070-57453082c250"
        ]
      }
    ]
  },
  "in_task_type_id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "in_task_status_id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "out_field_type": "status",
  "out_task_type_id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "out_task_status_id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "out_only_if_task_status_ids": [
    "string"
  ],
  "import_last_revision": true,
  "archived": false
}
Response examples (200)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "entity_type": "asset",
  "in_conditions": {
    "operator": "and",
    "conditions": [
      {
        "task_type_id": "b24a6ea4-ce75-4665-a070-57453082c250",
        "task_status_ids": [
          "c24a6ea4-ce75-4665-a070-57453082c250"
        ]
      },
      {
        "task_type_id": "d24a6ea4-ce75-4665-a070-57453082c250",
        "task_status_ids": [
          "c24a6ea4-ce75-4665-a070-57453082c250",
          "e24a6ea4-ce75-4665-a070-57453082c250"
        ]
      }
    ]
  },
  "in_task_type_id": "string",
  "in_task_status_id": "string",
  "out_field_type": "status",
  "out_task_type_id": "f24a6ea4-ce75-4665-a070-57453082c250",
  "out_task_status_id": "a34a6ea4-ce75-4665-a070-57453082c250",
  "out_only_if_task_status_ids": [
    "string"
  ],
  "import_last_revision": false,
  "archived": false,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T11:00:00Z"
}