Ir al contenido

Ratify and activate a draft

POST/api/public/v1/aip/drafts/{public_id}/ratify beta

Ratifies at once every intent policy confirmed on the draft whose capability is enforce or defer, and attaches the AIP to the one zone saved on the draft in its mode (409 ONE_ZONE_PER_AIP for more); the refused and left-out intent policies are dropped. For an edit draft, a new version of the same AIP. An agent (OAuth) caller must send sentences, the exact sentences this puts in force: 428 SENTENCES_REQUIRED without them, 409 SENTENCES_MISMATCH unless they match.

Ventana de terminal
curl --fail-with-body -X POST 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/ratify' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"revision":<revision>,"sentences":<sentences>}'
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorPermitido
viewerNo permitido

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

Ámbito de la clave de API: aip:write

ParámetroTipoDescripción
public_idstringObligatorio.
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
revisionintegerObligatorio.
sentencesarray of string or nullThe exact sentences this call puts in force, as shown to the user. Required of an agent (OAuth) caller: 428 SENTENCES_REQUIRED without them, 409 SENTENCES_MISMATCH unless they match the sentences put in force (the same sentences, order ignored, each as many times as it appears, after Unicode NFC and whitespace normalisation).
CampoTipoDescripción
dataobjectObligatorio.
data.droppedarray of stringObligatorio.
data.policy_public_idstringObligatorio.
data.ratifiedarray of stringObligatorio.
data.versionintegerObligatorio.
{
"data": {
"dropped": [
"string"
],
"policy_public_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"ratified": [
"string"
],
"version": 3
}
}