POST · Inspecter

Statut : Inspecter. Paramètres, accès et exemples de réponse.

Rédigé par Red Blue

Mis à jour le

Statut

POST /api/v1/status/read

operationId : status_read

Accès

Permission

Consentements OAuth

OAuth : délégation d’un équipier pour l’API

status.read

api:connect, status:inspect

KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.

Champs du corps JSON

Nom

Emplacement

Requis

Type et contraintes

productId

JSON

Oui

string

request

JSON

Oui

object

Variantes de la requête

Sélecteur

Valeur

Autres champs requis dans request

request.view

"component"

componentId

request.view

"components"

Aucun autre champ imposé

request.view

"incidents"

Aucun autre champ imposé

request.view

"incident"

incidentId

request.view

"templates"

Aucun autre champ imposé

request.view

"template"

templateId

request.view

"settings"

Aucun autre champ imposé

request.view

"management"

Aucun autre champ imposé

request.view

"uptime"

componentIds

Choisissez une variante et respectez son schéma complet : les contraintes des champs optionnels et les unions imbriquées restent applicables.

Exemple de requête

Shell
curl --request POST "$KHONY_ORIGIN/api/v1/status/read" \
  --header "Authorization: Bearer $KHONY_ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "productId": "product_01k3w8d7vhe008000000000001",
  "request": {
    "view": "components",
    "limit": 20
  }
}'
Shell

Réponse de succès · HTTP 200

JSON
{
  "kind": "fragment",
  "content": "{\"items\":[],\"kind\":\"components\",\"nextCursor\":null}",
  "sha256": "5d66bdd9e2fb82a54ee0830295f9d2e7be7e44de86a8d7bb3dca52269757288f",
  "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "asOf": "2026-10-24T00:00:00.000Z",
  "nextContentCursor": null
}
JSON
Schéma complet du corps JSON
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "pattern": "^product_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "request": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "component"
            },
            "componentId": {
              "type": "string",
              "pattern": "^status_component_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "view",
            "componentId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "components"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema1"
            },
            "after": {
              "$ref": "#/$defs/__schema2"
            },
            "limit": {
              "$ref": "#/$defs/__schema3"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "incidents"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema1"
            },
            "after": {
              "$ref": "#/$defs/__schema2"
            },
            "limit": {
              "$ref": "#/$defs/__schema3"
            },
            "search": {
              "type": "string",
              "maxLength": 160
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "incident"
            },
            "incidentId": {
              "type": "string",
              "pattern": "^status_incident_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema1"
            },
            "after": {
              "$ref": "#/$defs/__schema2"
            },
            "limit": {
              "$ref": "#/$defs/__schema3"
            }
          },
          "required": [
            "view",
            "incidentId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "templates"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema1"
            },
            "after": {
              "$ref": "#/$defs/__schema2"
            },
            "limit": {
              "$ref": "#/$defs/__schema3"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "template"
            },
            "templateId": {
              "type": "string",
              "pattern": "^status_template_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "view",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "settings"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "management"
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema1"
            },
            "after": {
              "$ref": "#/$defs/__schema2"
            },
            "limit": {
              "$ref": "#/$defs/__schema3"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "uptime"
            },
            "componentIds": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "contentCursor": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "view",
            "componentIds"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "productId",
    "request"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "asOf": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "hash",
        "offset",
        "asOf"
      ],
      "additionalProperties": false
    },
    "__schema1": {
      "$ref": "#/$defs/__schema0"
    },
    "__schema2": {
      "type": "string",
      "maxLength": 240
    },
    "__schema3": {
      "default": 20,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "__schema4": {
      "type": "string",
      "pattern": "^status_component_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}
JSON
Schéma complet de la réponse
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "const": "fragment"
    },
    "content": {
      "type": "string",
      "maxLength": 32768
    },
    "sha256": {
      "$ref": "#/$defs/__schema0"
    },
    "revision": {
      "$ref": "#/$defs/__schema0"
    },
    "asOf": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "nextContentCursor": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "hash": {
              "$ref": "#/$defs/__schema0"
            },
            "offset": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "asOf": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "hash",
            "offset",
            "asOf"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "kind",
    "content",
    "sha256",
    "revision",
    "asOf",
    "nextContentCursor"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  }
}
JSON

Refus et reprise

Les statuts documentés pour cette opération sont 400, 401, 402, 403, 404, 409, 428, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.

Notes du contrat
JSON
{
  "description": "Current product member OAuth status:inspect for components, incidents, incident detail and history, matching native listStatus access. Templates, settings, management and uptime additionally require the native administrator role before loading metadata or revisions. Technical keys and cookies refused. Native ARTICLE remains complete. Lists expose explicit cursors and revisions; incident summaries omit bodies, detail returns complete ARTICLE with paginated updates. Offset pages can shift under concurrent edits; incident listing uses date and ID cursor across all states. Uptime is declared history with unknown intervals, not active monitoring. Subscriber emails require their separate administrator scope. Native role/product access, public API entitlement and admission apply. Response is a bounded JSON fragment: concatenate content across nextContentCursor pages, verify sha256 over UTF-8 bytes, then JSON.parse once to recover the complete native DTO including ARTICLE. Repeat the exact request plus contentCursor; actor/session/organization/product/request and complete native revision are bound. Current authority is checked on each read. Data pagination nextCursor remains inside the reconstructed DTO; start fresh content pagination when following it. Use reconstructed item.revision for mutation guards, not the outer snapshot revision."
}
JSON