Ir al contenido

Renombrar o mover una unidad organizativa manual

PATCH/api/public/v1/org-units/{unit_id}

Manual units only — the root answers 409 ROOT_UNIT; another directory-owned unit answers 409 DIRECTORY_OWNED, because the next sync pass would undo the change. A reparent rewrites path and depth for the whole subtree in one transaction; a move that would push any descendant past level 10 is rejected whole, and a move under the unit's own descendant answers 409 UNIT_CYCLE.

Ventana de terminal
curl --fail-with-body -X PATCH 'https://app.openlatch.ai/api/public/v1/org-units/<unit_id>' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"<unit_name>-renamed"}'
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: org: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
namestring or null
parent_idstring (uuid) or null
CampoTipoDescripción
agents_countintegerObligatorio.
agents_directinteger or null
depthintegerObligatorio.
effective_zone_idstring or null
idstringObligatorio.
namestringObligatorio.
parent_idstring or null
pathstringObligatorio.
policies_added_hereintegerObligatorio.
policies_in_forceintegerObligatorio.
shortstring or null
sourcestringObligatorio.
zoneobject or null
zone.ask_modestring or null
zone.effective_ask_modestring
zone.idstringObligatorio.
zone.is_defaultbooleanWhether this is the organization's default zone: it serves agents with no owner and no pin.
zone.is_rootbooleanObligatorio.
zone.limitsobject or null
{
"agents_count": 3,
"agents_direct": 3,
"depth": 3,
"effective_zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"name": "release-bot",
"parent_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"path": "Engineering / Platform",
"policies_added_here": 3,
"policies_in_force": 3,
"short": "string",
"source": "string",
"zone": {
"ask_mode": "string",
"effective_ask_mode": "both",
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"is_default": false,
"is_root": false,
"limits": {
"cannot_prompt": 3,
"in_scope": 3,
"shell_only": 3
}
}
}