Lire une zone avec sa pile de couches et ses décomptes
GET/api/public/v1/zones/{zone_id}
The layer stack from the root down to this zone, plus the agent and policy counts. waiting and anomalies_24h are filtered over stored I-6 evidence in the zone subtree.
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/zones/<zone_id>' \ -H "Authorization: Bearer $OPENLATCH_API_KEY"import jsonimport osimport urllib.request
request = urllib.request.Request( 'https://app.openlatch.ai/api/public/v1/zones/<zone_id>', method='GET', headers={ 'Authorization': 'Bearer ' + os.environ['OPENLATCH_API_KEY'], },)with urllib.request.urlopen(request) as response: text = response.read().decode() print(json.dumps(json.loads(text), indent=2) if text else response.status)#!/usr/bin/env bashset -euo pipefail
curl -sS --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/zones/<zone_id>' \ -H "Authorization: Bearer $OPENLATCH_API_KEY" | jq .$headers = @{ Authorization = "Bearer $env:OPENLATCH_API_KEY"}Invoke-RestMethod -Method GET -Uri 'https://app.openlatch.ai/api/public/v1/zones/<zone_id>' -Headers $headers | ConvertTo-Json -Depth 20Autorisation
Section intitulée « Autorisation »| Rôle dans l’organisation | Ce point de terminaison |
|---|---|
owner | Autorisé |
admin | Autorisé |
editor | Autorisé |
viewer | Autorisé |
Une clé porte le rôle que son propriétaire détient dans l’organisation. Voir Authentification.
Portée de clé d’API : zones:read
Paramètres de chemin
Section intitulée « Paramètres de chemin »| Paramètre | Type | Description |
|---|---|---|
zone_id | string (uuid) | Obligatoire. |
- 200 OK — l’appel a réussi.
- 401 Unauthorized —
UNAUTHORIZED - 402 Payment Required —
license_expired - 403 Forbidden —
FEATURE_DISABLED,FORBIDDEN,INSUFFICIENT_SCOPE - 404 Not Found —
NOT_FOUND - 422 Unprocessable Content —
INVALID_ID,VALIDATION_ERROR - 429 Too Many Requests —
TOO_MANY_REQUESTS - 500 Internal Server Error —
INTERNAL_SERVER_ERROR,tenant_isolation_violation - 503 Service Unavailable —
FEATURE_STATE_UNAVAILABLE,SERVICE_UNAVAILABLE
Champs de la réponse
Section intitulée « Champs de la réponse »| Champ | Type | Description |
|---|---|---|
ask_mode | string or null | |
effective_ask_mode | string | |
id | string | Obligatoire. |
is_default | boolean | |
is_root | boolean | Obligatoire. |
kpis | object | Obligatoire. A zone's summary counts, including I-6 evidence in its subtree. |
kpis.agents | object | Obligatoire. A zone's agent counts, by control level. |
kpis.agents.compatibility_unavailable | integer | Obligatoire. |
kpis.agents.enforced | integer | Obligatoire. |
kpis.agents.known | integer | Obligatoire. |
kpis.agents.monitored | integer | Obligatoire. |
kpis.agents.total | integer | Obligatoire. |
kpis.anomalies_24h | integer | |
kpis.policies | object | Obligatoire. |
kpis.policies.added_here | integer | Obligatoire. |
kpis.policies.disabled | integer | Obligatoire. |
kpis.policies.enforce | integer | Obligatoire. |
kpis.policies.in_force | integer | Obligatoire. |
kpis.policies.inherited | integer | Obligatoire. |
kpis.policies.monitor | integer | Obligatoire. |
kpis.waiting | integer | |
layers | array of object | Obligatoire. |
layers[].depth | integer | Obligatoire. |
layers[].label | string | Obligatoire. |
layers[].unit_id | string | Obligatoire. |
limits | object or null | |
limits.cannot_prompt | integer | Obligatoire. Agents whose binding cannot prompt: their ASKs take the fallback verdict. |
limits.in_scope | integer | Obligatoire. Agents whose effective zone is in the subtree. |
limits.shell_only | integer | Obligatoire. Agents whose refusals reach shell tools only (Cline today). |
org_unit_id | string | Obligatoire. |
org_unit_path | string | Obligatoire. |
revision | integer | Obligatoire. |
Exemple de réponse
Section intitulée « Exemple de réponse »{ "ask_mode": "string", "effective_ask_mode": "both", "id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "is_default": false, "is_root": false, "kpis": { "agents": { "compatibility_unavailable": 3, "enforced": 3, "known": 3, "monitored": 3, "total": 3 }, "anomalies_24h": 0, "policies": { "added_here": 3, "disabled": 3, "enforce": 3, "in_force": 3, "inherited": 3, "monitor": 3 }, "waiting": 0 }, "layers": [ { "depth": 3, "label": "string", "unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10" } ], "limits": { "cannot_prompt": 3, "in_scope": 3, "shell_only": 3 }, "org_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10", "org_unit_path": "Engineering / Platform", "revision": 3}