Saltar al contenido

List automation rows

Módulo Platform

GET/automationsautomations.list

An automation (Section 7.3, ADR 0047): when a domain event of the trigger type happens in the org and the conditions hold, the actions run in order as the owner through public API operations, so row level security and capabilities decide every write. The owner is whoever last changed what it does or turned it on. Needs the automations plan feature (Pro and above) to create, change or turn on (plan_feature_required: 422); without it an automation can still be turned off and deleted. Saving validates the documents as automation.schema.json does (automation_conditions_invalid, automation_actions_invalid: 422) and checks the actions fit the trigger (automation_action_needs_record, automation_action_needs_commentable_subject, automation_person_not_member, automation_webhook_unknown: 422). Returns a cursor page of automation rows the caller may see. The default order is `name` ascending. Supports sparse fieldsets and the filter grammar.

  • Requiere la capacidad org.automations.write.
  • Alcances de OAuth: org.
  • Paginación por cursor: se aplican limit, cursor, fields, sort y filter.
  • Estados de error: 400, 401, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

automations.list: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
limitLimitNoPage size. Default 50, maximum 200.Restricciones: range 1 to 200
cursorCursorNoOpaque cursor from `next_cursor` of the previous page.Restricciones: length 1 to any
fieldsFieldsNoSparse fieldset: a comma-separated list of top-level fields to return. `id` is always returned.Restricciones: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$
sortSortNoSort keys, comma-separated; a leading `-` sorts descending. Without `sort`, the documented default order applies (coded lists sort in numeric code order).Restricciones: pattern ^-?[a-z_][a-z0-9_]*(,-?[a-z_][a-z0-9_]*)*$
filterFilterNoFilter grammar `filter[field][op]=value`. Operators: eq, ne, lt, lte, gt, gte, in (comma-separated values), is_null (true or false) and contains. Conditions combine with AND.

Respuesta 200: una página de Automation

automations.list: Automation
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the automation.
org_idstring (uuid)SíIdentifier of the owning organization, derived from the parent row and never accepted from the caller.
created_atstring (date-time)SíWhen the row was created.
created_bystring (uuid) | nullSíIdentifier of the person who created the row.
updated_atstring (date-time)SíWhen the row was last updated.
updated_bystring (uuid) | nullSíIdentifier of the person who last updated the row.
namestringSíName shown in Settings, Automations.Restricciones: length 1 to 120
descriptionstring | nullSíWhat the automation is for.Restricciones: length 1 to 500
trigger_event_typestringSíDomain event type that starts a run, from the catalog webhooks use (webhookEventTypes.list).Restricciones: pattern ^[a-z][a-z_]*\.[a-z][a-z_]*$
condition_match"all" | "any"SíHow the top-level conditions combine; set from the conditions document.
owner_person_idstring (uuid)SíIdentifier of the person the actions run as.
enabledbooleanSíTrue while new events start runs.
paused_atstring (date-time) | nullSíWhen the engine turned the automation off because a run could not act as the owner; null otherwise. Turning it on again clears it.
pause_reasonstring | nullSíWhy the engine paused it: owner_left_org, owner_lost_capability, owner_cannot_sign_in or owner_access_refused.Restricciones: pattern ^[a-z][a-z0-9_]*$
conditionsAutomationConditionsSíAn automation's conditions: {"all": [...]} or {"any": [...]} of conditions and one-level groups, at most 20 in all. An empty list always holds.
actionsAutomationActionsSíAn automation's 1 to 10 actions, in the order they run.
{
  "data": [
    {
      "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "created_at": "2026-10-08T14:30:00Z",
      "created_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "updated_at": "2026-10-08T14:30:00Z",
      "updated_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "name": "Pick up new tasks",
      "description": "Comments on every new task.",
      "trigger_event_type": "record.created",
      "condition_match": "all",
      "owner_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "enabled": true,
      "paused_at": "2026-10-08T14:30:00Z",
      "pause_reason": "owner_left_org",
      "conditions": {
        "all": [
          {
            "field": "data.record_kind",
            "operator": "eq",
            "value": "Task"
          }
        ]
      },
      "actions": [
        {
          "type": "add_comment",
          "body": "Picked up {{data.title}}."
        }
      ]
    }
  ],
  "next_cursor": null
}

Ejemplos de código

curl -X GET "$XOS_BASE_URL/automations" \
  -H "Authorization: Bearer $XOS_API_KEY"
for await (const row of xos.automations.listAll()) {
  console.log(row);
}
for row in xos.automations.list_all():
    print(row)
xos automations list --all