{
  "components": {
    "schemas": {
      "Action": {
        "properties": {
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionCategory"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "defect: CIL fault; deviation: centreline departure; review: temporary-target verdict.\n\n    Manual actions have a null category. Clients must tolerate unknown values.\n    ",
            "title": "Category"
          },
          "check_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Check Id"
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "factory_id": {
            "title": "Factory Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "line_id": {
            "title": "Line Id",
            "type": "string"
          },
          "machine_id": {
            "title": "Machine Id",
            "type": "string"
          },
          "origin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionOrigin"
              },
              {
                "type": "string"
              }
            ],
            "description": "automatic: raised by the system; manual: raised by a member. Tolerate unknown values.",
            "title": "Origin"
          },
          "resolved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At"
          },
          "root_cause": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RootCause"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "equipment_fault, consumable_material, operator_error, process_issue, or other.\n\n    Null when not recorded. Clients must tolerate unknown values.\n    ",
            "title": "Root Cause"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionStatus"
              },
              {
                "type": "string"
              }
            ],
            "description": "open: awaiting work; pending_verification: resolved, awaiting confirmation; closed: finished.\n\n    Clients must tolerate unknown values.\n    ",
            "title": "Status"
          },
          "target_resolution_at": {
            "format": "date-time",
            "title": "Target Resolution At",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          }
        },
        "required": [
          "id",
          "factory_id",
          "line_id",
          "machine_id",
          "check_id",
          "title",
          "category",
          "origin",
          "status",
          "root_cause",
          "target_resolution_at",
          "resolved_at",
          "verified_at",
          "closed_at",
          "created_at",
          "updated_at"
        ],
        "title": "Action",
        "type": "object"
      },
      "ActionCategory": {
        "description": "defect: CIL fault; deviation: centreline departure; review: temporary-target verdict.\n\nManual actions have a null category. Clients must tolerate unknown values.",
        "enum": [
          "defect",
          "deviation",
          "review"
        ],
        "title": "ActionCategory",
        "type": "string"
      },
      "ActionGroup": {
        "properties": {
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionCategory"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "check_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Check Id"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "created_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Factory-local date, YYYY-MM-DD.",
            "title": "Created Date"
          },
          "created_month": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "First day of the factory-local month, YYYY-MM-DD.",
            "title": "Created Month"
          },
          "created_week": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Monday starting the factory-local week, YYYY-MM-DD.",
            "title": "Created Week"
          },
          "factory_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Factory Id"
          },
          "line_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line Id"
          },
          "machine_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Machine Id"
          },
          "origin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionOrigin"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin"
          },
          "root_cause": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RootCause"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Root Cause"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActionStatus"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "required": [
          "count"
        ],
        "title": "ActionGroup",
        "type": "object"
      },
      "ActionOrigin": {
        "description": "automatic: raised by the system; manual: raised by a member. Tolerate unknown values.",
        "enum": [
          "automatic",
          "manual"
        ],
        "title": "ActionOrigin",
        "type": "string"
      },
      "ActionStatus": {
        "description": "open: awaiting work; pending_verification: resolved, awaiting confirmation; closed: finished.\n\nClients must tolerate unknown values.",
        "enum": [
          "open",
          "pending_verification",
          "closed"
        ],
        "title": "ActionStatus",
        "type": "string"
      },
      "ActionSummary": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ActionGroup"
            },
            "title": "Groups",
            "type": "array"
          }
        },
        "required": [
          "groups"
        ],
        "title": "ActionSummary",
        "type": "object"
      },
      "CheckInstance": {
        "properties": {
          "check_id": {
            "title": "Check Id",
            "type": "string"
          },
          "check_kind": {
            "$ref": "#/components/schemas/CheckKind"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "due_at": {
            "format": "date-time",
            "title": "Due At",
            "type": "string"
          },
          "factory_id": {
            "title": "Factory Id",
            "type": "string"
          },
          "grace_period_ends_at": {
            "format": "date-time",
            "title": "Grace Period Ends At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "line_id": {
            "title": "Line Id",
            "type": "string"
          },
          "machine_id": {
            "title": "Machine Id",
            "type": "string"
          },
          "origin": {
            "$ref": "#/components/schemas/InstanceOrigin"
          },
          "passed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Passed"
          },
          "status": {
            "$ref": "#/components/schemas/InstanceStatus"
          },
          "updated_at": {
            "description": "Later of stored modification time and due_at; includes first visibility in sync.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "factory_id",
          "line_id",
          "machine_id",
          "created_at",
          "updated_at",
          "check_id",
          "check_kind",
          "origin",
          "status",
          "due_at",
          "grace_period_ends_at",
          "completed_at",
          "passed"
        ],
        "title": "CheckInstance",
        "type": "object"
      },
      "CheckKind": {
        "description": "cil: binary check; centreline: measured check. Clients must tolerate unknown values.",
        "enum": [
          "cil",
          "centreline"
        ],
        "title": "CheckKind",
        "type": "string"
      },
      "Factory": {
        "properties": {
          "created_at": {
            "description": "Creation timestamp in UTC.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/HierarchyStatus"
          },
          "timezone": {
            "description": "IANA timezone, e.g. Australia/Melbourne.",
            "title": "Timezone",
            "type": "string"
          },
          "updated_at": {
            "description": "Last modification timestamp in UTC.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "name",
          "timezone"
        ],
        "title": "Factory",
        "type": "object"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "const": "ok",
            "description": "Always `ok` when the API is serving.",
            "examples": [
              "ok"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "HealthResponse",
        "type": "object"
      },
      "HierarchyStatus": {
        "description": "active: available for use; archived: retained for history. Clients must tolerate unknown values.",
        "enum": [
          "active",
          "archived"
        ],
        "title": "HierarchyStatus",
        "type": "string"
      },
      "InstanceGroup": {
        "properties": {
          "check_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Check Id"
          },
          "check_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CheckKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "completion_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Completed / (completed + overdue + missed) × 100 over this group's records; null if there are no completed, overdue or missed records, or status is a group key.",
            "title": "Completion Rate"
          },
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Factory-local date, YYYY-MM-DD.",
            "title": "Due Date"
          },
          "due_month": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "First day of the factory-local month, YYYY-MM-DD.",
            "title": "Due Month"
          },
          "due_week": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Monday starting the factory-local week, YYYY-MM-DD.",
            "title": "Due Week"
          },
          "factory_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Factory Id"
          },
          "line_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line Id"
          },
          "machine_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Machine Id"
          },
          "origin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InstanceOrigin"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InstanceStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "count",
          "completion_rate"
        ],
        "title": "InstanceGroup",
        "type": "object"
      },
      "InstanceOrigin": {
        "description": "scheduled: system obligation; ad_hoc: volunteered work. Clients must tolerate unknown values.",
        "enum": [
          "scheduled",
          "ad_hoc"
        ],
        "title": "InstanceOrigin",
        "type": "string"
      },
      "InstanceStatus": {
        "description": "due: due and not yet done (inside its grace period, or past it until the sweep marks it);\noverdue: recorded as missed with no lifecycle closure stamp yet;\nmissed: lifecycle-closed without a result, so it can no longer be completed or skipped;\ncompleted: submitted; skipped: excused; not_applicable: not required;\nexpired: uncompleted ad-hoc work, never a miss.\nLifecycle closure occurs at the earlier of a newer occurrence coming due and exactly 7 days after grace ends.\nReporting transitions depend on the 5-minute sweep and may lag; status is not a guarantee of action\neligibility, which also depends on execution restrictions. Clients must tolerate unknown values.",
        "enum": [
          "due",
          "overdue",
          "missed",
          "completed",
          "skipped",
          "not_applicable",
          "expired"
        ],
        "title": "InstanceStatus",
        "type": "string"
      },
      "InstanceSummary": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/InstanceGroup"
            },
            "title": "Groups",
            "type": "array"
          }
        },
        "required": [
          "groups"
        ],
        "title": "InstanceSummary",
        "type": "object"
      },
      "InvalidParam": {
        "description": "One request value that failed validation.",
        "properties": {
          "location": {
            "description": "Where the value is: its source (`query`, `path`, `header` or `body`) then the field path.",
            "examples": [
              [
                "query",
                "limit"
              ]
            ],
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "message": {
            "description": "Why the value was rejected.",
            "examples": [
              "Input should be a valid integer"
            ],
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "location",
          "message"
        ],
        "title": "InvalidParam",
        "type": "object"
      },
      "Line": {
        "properties": {
          "created_at": {
            "description": "Creation timestamp in UTC.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "factory_id": {
            "title": "Factory Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "line_type": {
            "$ref": "#/components/schemas/LineType"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/HierarchyStatus"
          },
          "updated_at": {
            "description": "Last modification timestamp in UTC.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "name",
          "factory_id",
          "line_type"
        ],
        "title": "Line",
        "type": "object"
      },
      "LineType": {
        "description": "sequenced: machines in production order; group: unordered assets. Clients must tolerate unknown values.",
        "enum": [
          "sequenced",
          "group"
        ],
        "title": "LineType",
        "type": "string"
      },
      "Machine": {
        "properties": {
          "created_at": {
            "description": "Creation timestamp in UTC.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "factory_id": {
            "title": "Factory Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "line_id": {
            "title": "Line Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "sequence": {
            "description": "Machine position on a sequenced line; carries no ordering meaning in a group.",
            "title": "Sequence",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/HierarchyStatus"
          },
          "updated_at": {
            "description": "Last modification timestamp in UTC.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "name",
          "factory_id",
          "line_id",
          "sequence"
        ],
        "title": "Machine",
        "type": "object"
      },
      "MeResponse": {
        "properties": {
          "environment": {
            "description": "Which environment this key belongs to.",
            "enum": [
              "live",
              "test"
            ],
            "title": "Environment",
            "type": "string"
          },
          "id": {
            "description": "The API client's identifier.",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "The name the client was given when it was created.",
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "description": "What the client may do, as `resource:action` values, sorted.",
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/MeScope"
          }
        },
        "required": [
          "id",
          "name",
          "permissions",
          "scope",
          "environment"
        ],
        "title": "MeResponse",
        "type": "object"
      },
      "MeScope": {
        "properties": {
          "factory_ids": {
            "description": "The factories the client can read. Empty when `tenant_wide` is true (all factories) and when the client has not been granted any.",
            "items": {
              "type": "string"
            },
            "title": "Factory Ids",
            "type": "array"
          },
          "tenant_wide": {
            "description": "True when the client can read every factory in the organisation.",
            "title": "Tenant Wide",
            "type": "boolean"
          }
        },
        "required": [
          "tenant_wide",
          "factory_ids"
        ],
        "title": "MeScope",
        "type": "object"
      },
      "Page_Action_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Action"
            },
            "title": "Data",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass unchanged as `cursor` for the next page; null at the end.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "Page[Action]",
        "type": "object"
      },
      "Page_CheckInstance_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CheckInstance"
            },
            "title": "Data",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass unchanged as `cursor` for the next page; null at the end.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "Page[CheckInstance]",
        "type": "object"
      },
      "Page_Factory_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Factory"
            },
            "title": "Data",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass unchanged as `cursor` for the next page; null at the end.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "Page[Factory]",
        "type": "object"
      },
      "Page_Line_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Line"
            },
            "title": "Data",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass unchanged as `cursor` for the next page; null at the end.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "Page[Line]",
        "type": "object"
      },
      "Page_Machine_": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Machine"
            },
            "title": "Data",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass unchanged as `cursor` for the next page; null at the end.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor"
        ],
        "title": "Page[Machine]",
        "type": "object"
      },
      "Problem": {
        "description": "An error, as RFC 9457 problem details.\n\nClients should branch on `status` and, where it is not `about:blank`, on\n`type`. `title` and `detail` are for people and may be reworded.",
        "examples": [
          {
            "detail": "Not Found",
            "instance": "/public/v1/factories/unknown",
            "status": 404,
            "title": "Not Found",
            "type": "about:blank"
          }
        ],
        "properties": {
          "detail": {
            "description": "A human-readable explanation of this occurrence.",
            "title": "Detail",
            "type": "string"
          },
          "instance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The request path this occurrence relates to.",
            "title": "Instance"
          },
          "invalid_params": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/InvalidParam"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "For a validation error (422), each value that was rejected.",
            "title": "Invalid Params"
          },
          "status": {
            "description": "The HTTP status code.",
            "title": "Status",
            "type": "integer"
          },
          "title": {
            "description": "A short, human-readable summary of the problem type.",
            "title": "Title",
            "type": "string"
          },
          "type": {
            "default": "about:blank",
            "description": "A URI identifying the problem type. `about:blank` means the HTTP status says it all.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "title",
          "status",
          "detail"
        ],
        "title": "Problem",
        "type": "object"
      },
      "RootCause": {
        "description": "equipment_fault, consumable_material, operator_error, process_issue, or other.\n\nNull when not recorded. Clients must tolerate unknown values.",
        "enum": [
          "equipment_fault",
          "consumable_material",
          "operator_error",
          "process_issue",
          "other"
        ],
        "title": "RootCause",
        "type": "string"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "A Continual API key: `cntl_live_…`",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Read Continual data from your own tools. Authenticate with an API key in the `Authorization: Bearer` header. Errors are RFC 9457 problem details. Authentication attempts first have per-source (default 300/minute) and process-wide (default 1200/minute) admission limits, including missing or invalid keys. Fly deployments use the network caller reported by Fly Proxy; other deployments use the ASGI peer. Upstream proxies/NAT may share a source budget. Authenticated requests also have sliding-window limits per API client (default 60/minute) and tenant (default 300/minute), applied independently on each API machine. RateLimit headers describe the most constrained client/tenant budget after identity checks, or admission budget before them; RateLimit-Reset and Retry-After are delta seconds. Health and unknown routes advertise the client policy without consuming a budget. All public SQL, including authentication, has a default 10-second database statement timeout, maintained across transactions; a cancelled query returns 503 problem details with Retry-After. Summary endpoints may serve cached data for 120 seconds by default; Cache-Control: private, max-age reports its remaining freshness. Limits, timeout and cache lifetime are configurable by the service operator.",
    "title": "Continual Public API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/actions": {
      "get": {
        "description": "Requires actions:read. Only actions in the client's tenant and readable factories are returned, including historical actions in archived hierarchy. Every category is exposed, including review (temporary-target verdicts); manual actions have a null category. Clients must tolerate unknown enum values. Timestamps are UTC. Descriptions, resolution notes, people, assignments, media, events and escalations are excluded. created_from is inclusive; created_to is exclusive. Created ranges must not exceed 366 days. When either created filter is supplied, an omitted upper bound is now and an omitted lower bound is 366 days before the upper bound. Lists without created filters include all history. Returns {data, next_cursor} in created_at, id order. Limit defaults to 100, maximum 500. Follow next_cursor with unchanged filters. updated_since is inclusive and orders by updated_at, id; it observes resolution, verification and closure. Overlap sync windows and upsert by id, as concurrent edits can move rows between pages. Parent filters intersect.",
        "operationId": "list_actions",
        "parameters": [
          {
            "description": "Records per page (1–500).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Records per page (1–500).",
              "examples": [
                100
              ],
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
              "title": "Cursor"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Updated Since"
            }
          },
          {
            "description": "Only this factory.",
            "in": "query",
            "name": "factory_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this factory.",
              "title": "Factory Id"
            }
          },
          {
            "description": "Only this line.",
            "in": "query",
            "name": "line_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this line.",
              "title": "Line Id"
            }
          },
          {
            "description": "Only this machine.",
            "in": "query",
            "name": "machine_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this machine.",
              "title": "Machine Id"
            }
          },
          {
            "description": "Only this check.",
            "in": "query",
            "name": "check_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this check.",
              "title": "Check Id"
            }
          },
          {
            "description": "Comma list: open,pending_verification,closed.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: open,pending_verification,closed.",
              "title": "Status"
            }
          },
          {
            "description": "Comma list: defect,deviation,review. Use origin=manual for manual actions.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: defect,deviation,review. Use origin=manual for manual actions.",
              "title": "Category"
            }
          },
          {
            "description": "Comma list: automatic,manual.",
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: automatic,manual.",
              "title": "Origin"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "created_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Created From"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "created_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Created To"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "category": "defect",
                      "check_id": "check-id",
                      "created_at": "2026-10-02T00:00:00Z",
                      "factory_id": "factory-id",
                      "id": "action-id",
                      "line_id": "line-id",
                      "machine_id": "machine-id",
                      "origin": "automatic",
                      "status": "open",
                      "target_resolution_at": "2026-10-03T00:00:00Z",
                      "title": "Inspect guard",
                      "updated_at": "2026-10-02T00:00:00Z"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/Page_Action_"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs actions:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List actions",
        "tags": [
          "actions"
        ]
      }
    },
    "/v1/actions/summary": {
      "get": {
        "description": "Requires actions:read. Only actions in the client's tenant and readable factories are returned, including historical actions in archived hierarchy. Every category is exposed, including review (temporary-target verdicts); manual actions have a null category. Clients must tolerate unknown enum values. Timestamps are UTC. Descriptions, resolution notes, people, assignments, media, events and escalations are excluded. created_from is inclusive; created_to is exclusive. Created ranges must not exceed 366 days. When either created filter is supplied, an omitted upper bound is now and an omitted lower bound is 366 days before the upper bound. Lists without created filters include all history. Takes the list's record filters plus group_by. Returns {groups: [{<group keys>, count}]}; only selected keys appear, preserving null category, check_id and root_cause groups. No group_by returns one total, including {count: 0} for an empty population; grouped empty populations return []. Date buckets use each factory's local calendar: created_week starts Monday and created_month starts on day 1. Labels are YYYY-MM-DD. Open-actions recipe: status=open,pending_verification&group_by=line_id,category. Without created filters, totals and non-date groups include all history and the open-actions recipe matches the portal's open plus pending-verification count for the same factories. Summaries with created_date, created_week or created_month default to the last 366 days. Responses may be cached for 120 seconds by default; Cache-Control reports remaining freshness.",
        "operationId": "summarize_actions",
        "parameters": [
          {
            "description": "Only this factory.",
            "in": "query",
            "name": "factory_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this factory.",
              "title": "Factory Id"
            }
          },
          {
            "description": "Only this line.",
            "in": "query",
            "name": "line_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this line.",
              "title": "Line Id"
            }
          },
          {
            "description": "Only this machine.",
            "in": "query",
            "name": "machine_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this machine.",
              "title": "Machine Id"
            }
          },
          {
            "description": "Only this check.",
            "in": "query",
            "name": "check_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this check.",
              "title": "Check Id"
            }
          },
          {
            "description": "Comma list: open,pending_verification,closed.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: open,pending_verification,closed.",
              "title": "Status"
            }
          },
          {
            "description": "Comma list: defect,deviation,review. Use origin=manual for manual actions.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: defect,deviation,review. Use origin=manual for manual actions.",
              "title": "Category"
            }
          },
          {
            "description": "Comma list: automatic,manual.",
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: automatic,manual.",
              "title": "Origin"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "created_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Created From"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "created_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Created To"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Updated Since"
            }
          },
          {
            "description": "Comma list: status,category,origin,root_cause,factory_id,line_id,machine_id,check_id,created_date,created_week,created_month. Date buckets are factory-local; weeks start Monday.",
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: status,category,origin,root_cause,factory_id,line_id,machine_id,check_id,created_date,created_week,created_month. Date buckets are factory-local; weeks start Monday.",
              "examples": [
                "line_id,category"
              ],
              "title": "Group By"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "groups": [
                    {
                      "category": "review",
                      "count": 2,
                      "line_id": "line-id"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/ActionSummary"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Cache-Control": {
                "description": "Private caching; max-age is the summary's remaining freshness in seconds.",
                "schema": {
                  "examples": [
                    "private, max-age=120"
                  ],
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs actions:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Summarize actions",
        "tags": [
          "actions"
        ],
        "x-summary-cache": true
      }
    },
    "/v1/actions/{id}": {
      "get": {
        "description": "Requires actions:read. Only actions in the client's tenant and readable factories are returned, including historical actions in archived hierarchy. Every category is exposed, including review (temporary-target verdicts); manual actions have a null category. Clients must tolerate unknown enum values. Timestamps are UTC. Descriptions, resolution notes, people, assignments, media, events and escalations are excluded. Returns 404 for missing, other-tenant or out-of-scope actions.",
        "operationId": "get_action",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "title": "Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "category": "defect",
                  "check_id": "check-id",
                  "created_at": "2026-10-02T00:00:00Z",
                  "factory_id": "factory-id",
                  "id": "action-id",
                  "line_id": "line-id",
                  "machine_id": "machine-id",
                  "origin": "automatic",
                  "status": "open",
                  "target_resolution_at": "2026-10-03T00:00:00Z",
                  "title": "Inspect guard",
                  "updated_at": "2026-10-02T00:00:00Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/Action"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs actions:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The action does not exist or is outside the client's scope.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Get an action",
        "tags": [
          "actions"
        ]
      }
    },
    "/v1/check-instances": {
      "get": {
        "description": "Requires checks:read. Only records in the client's tenant and readable factories are returned, including historical records belonging to archived checks or hierarchy. Data Capture is excluded. Timestamps are UTC; clients must tolerate unknown enum values. Instances are visible only once due (due_at <= now), on lists, by id and in summaries. due means due and not yet done; overdue means its grace period ended without a result but it is not yet lifecycle-closed; missed means it closed without a result, at the earlier of a newer occurrence of its check coming due and exactly 7 days after its grace period ended, and can no longer be completed or skipped. Statuses move due -> overdue -> missed (or straight to missed) when the scheduler's sweep runs, normally every 5 minutes, so a transition can lag by that much or more; status reports what happened and does not guarantee that a completion would be accepted. expired is uncompleted ad-hoc work, never a miss. passed and completed_at come from the result, or are null without one. due_from is inclusive; due_to and due_before are exclusive and intersect. Public updated_at is the later of the stored modification time and due_at, so newly due work enters sync. include_archived defaults to true to retain history; false excludes archived checks, machines, lines and factories. Lists use opaque cursors and {data, next_cursor}; follow next_cursor with unchanged filters. Limit defaults to 100, maximum 500. updated_since is inclusive and orders by updated_at, id. Concurrent edits may move rows between pages; overlap sync windows and upsert by id. Due ranges must not exceed 366 days. An omitted upper bound is now. With a date filter on a list, an omitted lower bound is 366 days before the upper bound; without date filters lists include all history. Summaries default their lower bound to 30 days before the upper bound. Natural ordering is due_at, id.",
        "operationId": "list_check_instances",
        "parameters": [
          {
            "description": "Records per page (1–500).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Records per page (1–500).",
              "examples": [
                100
              ],
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
              "title": "Cursor"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Updated Since"
            }
          },
          {
            "description": "Only this factory.",
            "in": "query",
            "name": "factory_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this factory.",
              "title": "Factory Id"
            }
          },
          {
            "description": "Only this line.",
            "in": "query",
            "name": "line_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this line.",
              "title": "Line Id"
            }
          },
          {
            "description": "Only this machine.",
            "in": "query",
            "name": "machine_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this machine.",
              "title": "Machine Id"
            }
          },
          {
            "description": "Only this check.",
            "in": "query",
            "name": "check_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this check.",
              "title": "Check Id"
            }
          },
          {
            "description": "Comma list: cil,centreline.",
            "in": "query",
            "name": "check_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: cil,centreline.",
              "examples": [
                "cil,centreline"
              ],
              "title": "Check Kind"
            }
          },
          {
            "description": "Comma list: scheduled,ad_hoc.",
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: scheduled,ad_hoc.",
              "examples": [
                "scheduled"
              ],
              "title": "Origin"
            }
          },
          {
            "description": "Comma list: due,overdue,missed,completed,skipped,not_applicable,expired.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: due,overdue,missed,completed,skipped,not_applicable,expired.",
              "title": "Status"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "due_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Due From"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "due_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Due To"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "due_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Due Before"
            }
          },
          {
            "description": "Include history from archived checks or hierarchy. Use false for the portal headline recipe.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": true,
              "description": "Include history from archived checks or hierarchy. Use false for the portal headline recipe.",
              "title": "Include Archived",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "check_id": "check-id",
                      "check_kind": "cil",
                      "created_at": "2026-10-01T00:00:00Z",
                      "due_at": "2026-10-02T00:00:00Z",
                      "factory_id": "factory-id",
                      "grace_period_ends_at": "2026-10-02T01:00:00Z",
                      "id": "c2a61895-e716-4e81-9be5-723734ca8926",
                      "line_id": "line-id",
                      "machine_id": "machine-id",
                      "origin": "scheduled",
                      "status": "due",
                      "updated_at": "2026-10-02T00:00:00Z"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/Page_CheckInstance_"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs checks:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List due check instances",
        "tags": [
          "checks"
        ]
      }
    },
    "/v1/check-instances/summary": {
      "get": {
        "description": "Requires checks:read. Only records in the client's tenant and readable factories are returned, including historical records belonging to archived checks or hierarchy. Data Capture is excluded. Timestamps are UTC; clients must tolerate unknown enum values. Instances are visible only once due (due_at <= now), on lists, by id and in summaries. due means due and not yet done; overdue means its grace period ended without a result but it is not yet lifecycle-closed; missed means it closed without a result, at the earlier of a newer occurrence of its check coming due and exactly 7 days after its grace period ended, and can no longer be completed or skipped. Statuses move due -> overdue -> missed (or straight to missed) when the scheduler's sweep runs, normally every 5 minutes, so a transition can lag by that much or more; status reports what happened and does not guarantee that a completion would be accepted. expired is uncompleted ad-hoc work, never a miss. passed and completed_at come from the result, or are null without one. due_from is inclusive; due_to and due_before are exclusive and intersect. Public updated_at is the later of the stored modification time and due_at, so newly due work enters sync. include_archived defaults to true to retain history; false excludes archived checks, machines, lines and factories. Due ranges must not exceed 366 days. An omitted upper bound is now. With a date filter on a list, an omitted lower bound is 366 days before the upper bound; without date filters lists include all history. Summaries default their lower bound to 30 days before the upper bound. Returns grouped record counts and completed / (completed + overdue + missed) × 100, or null when none is present. Grouping by status makes completion_rate null in every group. No group_by returns one period total, including {count: 0, completion_rate: null} for an empty population. Grouped empty populations return []. Date buckets use each factory's timezone. due_week starts Monday; due_month starts on day 1; labels are YYYY-MM-DD. The portal headline recipe is origin=scheduled&check_kind=cil,centreline&include_archived=false with group_by=due_date or no group_by. Recipes: due now is status=due; overdue now is status=overdue; misses against the rate are status=overdue,missed. These differ from the apps' to-do lists, which hide instances for formats the line is not running, show one instance per check, hide a due instance past its grace period until the sweep marks it, and drop a newly closed instance at once rather than when the sweep stamps it. Responses may be cached for 120 seconds by default; Cache-Control reports remaining freshness.",
        "operationId": "summarize_check_instances",
        "parameters": [
          {
            "description": "Only this factory.",
            "in": "query",
            "name": "factory_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this factory.",
              "title": "Factory Id"
            }
          },
          {
            "description": "Only this line.",
            "in": "query",
            "name": "line_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this line.",
              "title": "Line Id"
            }
          },
          {
            "description": "Only this machine.",
            "in": "query",
            "name": "machine_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this machine.",
              "title": "Machine Id"
            }
          },
          {
            "description": "Only this check.",
            "in": "query",
            "name": "check_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this check.",
              "title": "Check Id"
            }
          },
          {
            "description": "Comma list: cil,centreline.",
            "in": "query",
            "name": "check_kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: cil,centreline.",
              "examples": [
                "cil,centreline"
              ],
              "title": "Check Kind"
            }
          },
          {
            "description": "Comma list: scheduled,ad_hoc.",
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: scheduled,ad_hoc.",
              "examples": [
                "scheduled"
              ],
              "title": "Origin"
            }
          },
          {
            "description": "Comma list: due,overdue,missed,completed,skipped,not_applicable,expired.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: due,overdue,missed,completed,skipped,not_applicable,expired.",
              "title": "Status"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "due_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Due From"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "due_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Due To"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "due_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Due Before"
            }
          },
          {
            "description": "UTC/offset timestamp; timezone required.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "UTC/offset timestamp; timezone required.",
              "title": "Updated Since"
            }
          },
          {
            "description": "Include history from archived checks or hierarchy. Use false for the portal headline recipe.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": true,
              "description": "Include history from archived checks or hierarchy. Use false for the portal headline recipe.",
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Comma list: status,origin,check_kind,factory_id,line_id,machine_id,check_id, due_date,due_week,due_month. Date buckets use each factory's timezone. Weeks start Monday; weeks/months are labeled by their first date.",
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Comma list: status,origin,check_kind,factory_id,line_id,machine_id,check_id, due_date,due_week,due_month. Date buckets use each factory's timezone. Weeks start Monday; weeks/months are labeled by their first date.",
              "examples": [
                "due_date"
              ],
              "title": "Group By"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "groups": [
                    {
                      "completion_rate": 80,
                      "count": 10,
                      "due_date": "2026-10-02"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/InstanceSummary"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "Cache-Control": {
                "description": "Private caching; max-age is the summary's remaining freshness in seconds.",
                "schema": {
                  "examples": [
                    "private, max-age=120"
                  ],
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs checks:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Summarize due check instances",
        "tags": [
          "checks"
        ],
        "x-summary-cache": true
      }
    },
    "/v1/check-instances/{id}": {
      "get": {
        "description": "Requires checks:read. Only records in the client's tenant and readable factories are returned, including historical records belonging to archived checks or hierarchy. Data Capture is excluded. Timestamps are UTC; clients must tolerate unknown enum values. Instances are visible only once due (due_at <= now), on lists, by id and in summaries. due means due and not yet done; overdue means its grace period ended without a result but it is not yet lifecycle-closed; missed means it closed without a result, at the earlier of a newer occurrence of its check coming due and exactly 7 days after its grace period ended, and can no longer be completed or skipped. Statuses move due -> overdue -> missed (or straight to missed) when the scheduler's sweep runs, normally every 5 minutes, so a transition can lag by that much or more; status reports what happened and does not guarantee that a completion would be accepted. expired is uncompleted ad-hoc work, never a miss. passed and completed_at come from the result, or are null without one. due_from is inclusive; due_to and due_before are exclusive and intersect. Public updated_at is the later of the stored modification time and due_at, so newly due work enters sync. include_archived defaults to true to retain history; false excludes archived checks, machines, lines and factories. Returns 404 for missing, other-tenant, out-of-scope or excluded records.",
        "operationId": "get_check_instance",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "title": "Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "check_id": "check-id",
                  "check_kind": "cil",
                  "created_at": "2026-10-01T00:00:00Z",
                  "due_at": "2026-10-02T00:00:00Z",
                  "factory_id": "factory-id",
                  "grace_period_ends_at": "2026-10-02T01:00:00Z",
                  "id": "c2a61895-e716-4e81-9be5-723734ca8926",
                  "line_id": "line-id",
                  "machine_id": "machine-id",
                  "origin": "scheduled",
                  "status": "due",
                  "updated_at": "2026-10-02T00:00:00Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/CheckInstance"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs checks:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The record does not exist or is outside the visible population.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a due check instance",
        "tags": [
          "checks"
        ]
      }
    },
    "/v1/factories": {
      "get": {
        "description": "Requires hierarchy:read. Only records in the client's tenant and readable factories are returned. Archived records are excluded unless include_archived=true. Ordered by name, id, or by updated_at, id when updated_since is supplied (inclusive, with a timezone). For incremental sync, use include_archived=true to receive archiving as status=archived with its updated_at change. Follow next_cursor with the same filters until it is null; limit defaults to 100 (maximum 500). Cursors are opaque: pass them unchanged. Concurrent edits may move records between pages; overlap sync windows and upsert by id. Timestamps are UTC. Clients must tolerate unknown enum values.",
        "operationId": "list_factories",
        "parameters": [
          {
            "description": "Include archived records as well as active records. Use true for incremental sync.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include archived records as well as active records. Use true for incremental sync.",
              "examples": [
                false
              ],
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Records per page (1–500).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Records per page (1–500).",
              "examples": [
                100
              ],
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
              "title": "Cursor"
            }
          },
          {
            "description": "Updated at or after this timestamp (timezone required). Orders by updated_at, id.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Updated at or after this timestamp (timezone required). Orders by updated_at, id.",
              "examples": [
                "2026-10-01T00:00:00Z"
              ],
              "title": "Updated Since"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "created_at": "2026-10-01T00:00:00Z",
                      "id": "ca787762-d6c9-4339-9118-ac4327232d45",
                      "name": "Main Facility",
                      "status": "active",
                      "timezone": "Australia/Melbourne",
                      "updated_at": "2026-10-02T00:00:00Z"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/Page_Factory_"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs hierarchy:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List factories",
        "tags": [
          "hierarchy"
        ]
      }
    },
    "/v1/factories/{id}": {
      "get": {
        "description": "Requires hierarchy:read. Returns 404 when the record does not exist, belongs to another tenant, is outside the client's readable factories. Archived records are returned for historical labeling. Timestamps are UTC. Clients must tolerate unknown enum values.",
        "operationId": "get_factory",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "title": "Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created_at": "2026-10-01T00:00:00Z",
                  "id": "ca787762-d6c9-4339-9118-ac4327232d45",
                  "name": "Main Facility",
                  "status": "active",
                  "timezone": "Australia/Melbourne",
                  "updated_at": "2026-10-02T00:00:00Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/Factory"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs hierarchy:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The record does not exist or is outside the client's tenant or factory scope.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a factory",
        "tags": [
          "hierarchy"
        ]
      }
    },
    "/v1/health": {
      "get": {
        "description": "Returns `ok` whenever the public API is serving requests. It needs no API key and says nothing about your tenant, so it is safe to use as an uptime probe.",
        "operationId": "get_health",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "Check the API is reachable",
        "tags": [
          "health"
        ]
      }
    },
    "/v1/lines": {
      "get": {
        "description": "Requires hierarchy:read. Only records in the client's tenant and readable factories are returned. Archived records are excluded unless include_archived=true. Ordered by name, id, or by updated_at, id when updated_since is supplied (inclusive, with a timezone). For incremental sync, use include_archived=true to receive archiving as status=archived with its updated_at change. Follow next_cursor with the same filters until it is null; limit defaults to 100 (maximum 500). Cursors are opaque: pass them unchanged. Concurrent edits may move records between pages; overlap sync windows and upsert by id. Timestamps are UTC. Clients must tolerate unknown enum values.",
        "operationId": "list_lines",
        "parameters": [
          {
            "description": "Include archived records as well as active records. Use true for incremental sync.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include archived records as well as active records. Use true for incremental sync.",
              "examples": [
                false
              ],
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Only records in this factory.",
            "in": "query",
            "name": "factory_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only records in this factory.",
              "title": "Factory Id"
            }
          },
          {
            "description": "Records per page (1–500).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Records per page (1–500).",
              "examples": [
                100
              ],
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
              "title": "Cursor"
            }
          },
          {
            "description": "Updated at or after this timestamp (timezone required). Orders by updated_at, id.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Updated at or after this timestamp (timezone required). Orders by updated_at, id.",
              "examples": [
                "2026-10-01T00:00:00Z"
              ],
              "title": "Updated Since"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "created_at": "2026-10-01T00:00:00Z",
                      "factory_id": "a163f08e-059b-4485-a418-aa7312f3a3e3",
                      "id": "ca787762-d6c9-4339-9118-ac4327232d45",
                      "line_type": "sequenced",
                      "name": "Packaging",
                      "status": "active",
                      "updated_at": "2026-10-02T00:00:00Z"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/Page_Line_"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs hierarchy:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List lines",
        "tags": [
          "hierarchy"
        ]
      }
    },
    "/v1/lines/{id}": {
      "get": {
        "description": "Requires hierarchy:read. Returns 404 when the record does not exist, belongs to another tenant, is outside the client's readable factories. Archived records are returned for historical labeling. Timestamps are UTC. Clients must tolerate unknown enum values.",
        "operationId": "get_line",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "title": "Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created_at": "2026-10-01T00:00:00Z",
                  "factory_id": "a163f08e-059b-4485-a418-aa7312f3a3e3",
                  "id": "ca787762-d6c9-4339-9118-ac4327232d45",
                  "line_type": "sequenced",
                  "name": "Packaging",
                  "status": "active",
                  "updated_at": "2026-10-02T00:00:00Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/Line"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs hierarchy:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The record does not exist or is outside the client's tenant or factory scope.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a line",
        "tags": [
          "hierarchy"
        ]
      }
    },
    "/v1/machines": {
      "get": {
        "description": "Requires hierarchy:read. Only records in the client's tenant and readable factories are returned. Archived records are excluded unless include_archived=true. Ordered by name, id, or by updated_at, id when updated_since is supplied (inclusive, with a timezone). For incremental sync, use include_archived=true to receive archiving as status=archived with its updated_at change. Follow next_cursor with the same filters until it is null; limit defaults to 100 (maximum 500). Cursors are opaque: pass them unchanged. Concurrent edits may move records between pages; overlap sync windows and upsert by id. Timestamps are UTC. Clients must tolerate unknown enum values.",
        "operationId": "list_machines",
        "parameters": [
          {
            "description": "Include archived records as well as active records. Use true for incremental sync.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include archived records as well as active records. Use true for incremental sync.",
              "examples": [
                false
              ],
              "title": "Include Archived",
              "type": "boolean"
            }
          },
          {
            "description": "Only records in this factory.",
            "in": "query",
            "name": "factory_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only records in this factory.",
              "title": "Factory Id"
            }
          },
          {
            "description": "Only machines on this line (combined with factory_id when supplied).",
            "in": "query",
            "name": "line_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only machines on this line (combined with factory_id when supplied).",
              "title": "Line Id"
            }
          },
          {
            "description": "Records per page (1–500).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "description": "Records per page (1–500).",
              "examples": [
                100
              ],
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 4096,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque next_cursor from the previous page; keep filters unchanged.",
              "title": "Cursor"
            }
          },
          {
            "description": "Updated at or after this timestamp (timezone required). Orders by updated_at, id.",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Updated at or after this timestamp (timezone required). Orders by updated_at, id.",
              "examples": [
                "2026-10-01T00:00:00Z"
              ],
              "title": "Updated Since"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "created_at": "2026-10-01T00:00:00Z",
                      "factory_id": "a163f08e-059b-4485-a418-aa7312f3a3e3",
                      "id": "ca787762-d6c9-4339-9118-ac4327232d45",
                      "line_id": "d30bdd07-d7a0-4890-b9f9-c060b73ee060",
                      "name": "Filler",
                      "sequence": 1,
                      "status": "active",
                      "updated_at": "2026-10-02T00:00:00Z"
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/Page_Machine_"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs hierarchy:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List machines",
        "tags": [
          "hierarchy"
        ]
      }
    },
    "/v1/machines/{id}": {
      "get": {
        "description": "Requires hierarchy:read. Returns 404 when the record does not exist, belongs to another tenant, is outside the client's readable factories. Archived records are returned for historical labeling. Timestamps are UTC. Clients must tolerate unknown enum values.",
        "operationId": "get_machine",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "title": "Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created_at": "2026-10-01T00:00:00Z",
                  "factory_id": "a163f08e-059b-4485-a418-aa7312f3a3e3",
                  "id": "ca787762-d6c9-4339-9118-ac4327232d45",
                  "line_id": "d30bdd07-d7a0-4890-b9f9-c060b73ee060",
                  "name": "Filler",
                  "sequence": 1,
                  "status": "active",
                  "updated_at": "2026-10-02T00:00:00Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/Machine"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A valid, active API key is required.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API client needs hierarchy:read permission.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The record does not exist or is outside the client's tenant or factory scope.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is invalid; `invalid_params` lists each rejected value.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Get a machine",
        "tags": [
          "hierarchy"
        ]
      }
    },
    "/v1/me": {
      "get": {
        "description": "Returns the API client the key authenticates as: its permissions, which factories it can read and which environment it belongs to. Any valid key can call it; it needs no permission. Use it to check that a key works and to see what it may do.",
        "operationId": "get_me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API key is missing, malformed, unknown, expired or revoked.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An authentication admission, API client or tenant per-machine budget is exhausted.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A database statement timed out. Retry after the indicated delay.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error, as RFC 9457 problem details.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests per minute for the most constrained client/tenant budget after identity checks, or source/process admission budget before them. Health/unknown routes advertise client policy.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests remaining in the reported budget after this attempt. Health/unknown routes report the unconsumed client policy limit.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the oldest request in that sliding window expires. Health/unknown routes report the policy window (60 seconds).",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Show the API client behind this key",
        "tags": [
          "me"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.continualapp.com/public",
      "description": "Production (cntl_live_ keys)"
    },
    {
      "url": "https://staging.api.continualapp.com/public",
      "description": "Staging (cntl_test_ keys)"
    }
  ]
}
