Aller au contenu

Créer l’Autonomy Zone d’une unité organisationnelle

POST/api/public/v1/org-units/{unit_id}/zone

The layer starts EMPTY and inherits everything above it — a layer only ever adds. An optional body {agent_ids} pins those agents to the new zone by hand in the same transaction (at most 5 000; an id that is not an agent of this organization answers 404 AGENT_NOT_FOUND). The bare call, with no body, stays valid. 409 ZONE_EXISTS when the unit already carries one.

Fenêtre de terminal
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/org-units/<unit_id>/zone' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rôle dans l’organisationCe point de terminaison
ownerAutorisé
adminAutorisé
editorNon autorisé
viewerNon 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:write

ParamètreTypeDescription
unit_idstring (uuid)Obligatoire.
ParamètreTypeDescription
Idempotency-Keystring or nullOptional. Makes the request safe to retry: the same key and the same request, within 24 hours, returns the stored response with Idempotent-Replayed: true and runs once.
ChampTypeDescription
agent_idsarray of string or nullAgents pinned to the new zone by hand in the same transaction (at most 5 000; an id that is not an agent of this organization answers 404 AGENT_NOT_FOUND).
ChampTypeDescription
idstringObligatoire.
is_defaultboolean
is_rootbooleanObligatoire.
org_unit_idstringObligatoire.
revisionintegerObligatoire.
{
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"is_default": false,
"is_root": false,
"org_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"revision": 3
}