Aller au contenu

Renommer ou déplacer une unité organisationnelle manuelle

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.

Fenêtre 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"}'
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 : org: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
namestring or null
parent_idstring (uuid) or null
ChampTypeDescription
agents_countintegerObligatoire.
agents_directinteger or null
depthintegerObligatoire.
effective_zone_idstring or null
idstringObligatoire.
namestringObligatoire.
parent_idstring or null
pathstringObligatoire.
policies_added_hereintegerObligatoire.
policies_in_forceintegerObligatoire.
shortstring or null
sourcestringObligatoire.
zoneobject or null
zone.ask_modestring or null
zone.effective_ask_modestring
zone.idstringObligatoire.
zone.is_defaultbooleanWhether this is the organization's default zone: it serves agents with no owner and no pin.
zone.is_rootbooleanObligatoire.
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
}
}
}