Ir al contenido

Crear la Autonomy Zone de una unidad organizativa

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.

Ventana 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"
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorNo permitido
viewerNo permitido

Una clave tiene el rol que su propietario ocupa en la organización. Consulte Autenticación.

Ámbito de la clave de API: zones:write

ParámetroTipoDescripción
unit_idstring (uuid)Obligatorio.
ParámetroTipoDescripción
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.
CampoTipoDescripción
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).
CampoTipoDescripción
idstringObligatorio.
is_defaultboolean
is_rootbooleanObligatorio.
org_unit_idstringObligatorio.
revisionintegerObligatorio.
{
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"is_default": false,
"is_root": false,
"org_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"revision": 3
}