Ir al contenido

Edit one intent policy of a draft

PATCH/api/public/v1/aip/drafts/{public_id}/intent-policies/{intent_policy_id} beta

sentence re-grounds it (202, its grounding job named); dimension changes it in place; confirmed stores "Is that right?", allowed while a case still gives a wrong verdict (the audit entry counts them); note is kept with its answers; steer replaces an Optimize intent policy's steer and re-grounds it (202), 422 INVALID_BODY on one that owns no Optimize rule. A sentence, steer or dimension change moves the draft's revision. 409 GROUNDING_IN_FLIGHT while it is being grounded; 422 EMPTY_PATCH.

Ventana de terminal
curl --fail-with-body -X PATCH 'https://app.openlatch.ai/api/public/v1/aip/drafts/<draft_public_id>/intent-policies/<intent_policy_id>' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"confirmed":true}'
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.
intent_policy_idstring (uuid)Obligatorio.
ParámetroTipoDescripción
Idempotency-Keystring or nullOptional. Makes this request safe to retry. Depending on the request, the same key with the same request either joins the job the first one queued (409 JOB_ALREADY_EXISTS, the job id in details) or replays the first answer (Idempotent-Replayed: true; 409 IDEMPOTENCY_IN_PROGRESS while it runs). The same key with another request is 422 IDEMPOTENCY_KEY_REUSED.
CampoTipoDescripción
confirmedboolean or null
dimensionstring — one of quality, economics, security, safety, compliance or null
notestring or null
retryboolean or nulltrue prepares again an intent policy the drafting job stopped on before it was ready, with every other one it left unprepared, in one job. INVALID_BODY on any other intent policy.
sentencestring or null
steerstring or null
CampoTipoDescripción
dataobjectObligatorio.
data.intent_policyobjectObligatorio. One intent policy of a draft.
data.intent_policy.busystring or nullWhat runs on the intent policy: grounding, cases (its stored cases checked again), fix, or topping_up (cases written for the values an answer added, appended when ready; it blocks nothing).
data.intent_policy.capabilitystring or null
data.intent_policy.cardsarray of objectObligatorio.
data.intent_policy.casesarray of objectObligatorio.
data.intent_policy.citationobject or nullObligatorio. The framework preset rule this intent policy came from, edited when its sentence differs; null for anything not drawn from a framework preset.
data.intent_policy.confirmedboolean or null
data.intent_policy.deferredobject or nullThe deferred part's gap class and fallback; null when it has none.
data.intent_policy.dimensionstring — one of quality, economics, security, safety, complianceObligatorio.
data.intent_policy.fallbackstring — one of Ask, Block or null
data.intent_policy.fixobject or null
data.intent_policy.idstringObligatorio.
data.intent_policy.job_idstring or null
data.intent_policy.languagestringObligatorio.
data.intent_policy.passageobject or null
data.intent_policy.refusalobject or null
data.intent_policy.request_ruleobject or null
data.intent_policy.sentencestringObligatorio. The intent policy. Empty while the drafting job still prepares it (busy is grounding and it holds no grounding yet): a sentence is served only once it is final.
data.intent_policy.steerstring or null
data.intent_policy.validateobject or null
data.job_idstring or null
{
"data": {
"intent_policy": {
"busy": "string",
"capability": "string",
"cards": [
{
"answer": {},
"key": "string",
"kind": "dictionary_values",
"question": "string",
"recommended": {}
}
],
"cases": [
{}
],
"citation": {
"edited": false,
"entries": [
{}
],
"items": [
{}
],
"license_url": "https://app.openlatch.ai/",
"preset_key": "string",
"preset_title": "string",
"rule_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"source_commit": "string",
"source_date": "string",
"source_sentence": "string",
"version": 1
},
"confirmed": false,
"deferred": {
"class": "string",
"fallback": "Ask"
},
"dimension": "quality",
"fallback": "Ask",
"fix": {
"attempts_left": 3,
"available": false,
"diff": {},
"fix_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"reason": "Never push to main without a review.",
"requested": false
},
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"job_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"language": "string",
"passage": {
"end": 3,
"start": 3
},
"refusal": {
"class": "nothing_observable",
"reason": "Never push to main without a review."
},
"request_rule": {
"lever": "effort_clamp",
"params": {}
},
"sentence": "string",
"steer": "string",
"validate": {
"example": "string",
"fires_on_every_action": false,
"never_fires": false
}
},
"job_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10"
}
}