Ir al contenido

Rename or describe an organization preset

PATCH/api/public/v1/policy-presets/{key} beta

revision is the one the caller read; a stale one answers 409 PRESET_CHANGED. description: null clears it. 409 PRESET_READ_ONLY for a built-in preset; 422 EMPTY_PATCH with neither field.

Ventana de terminal
curl --fail-with-body -X PATCH 'https://app.openlatch.ai/api/public/v1/policy-presets/<preset_key>' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"revision":<revision>,"description":"Updated by the API examples."}'
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: presets:write

ParámetroTipoDescripción
keystringObligatorio.
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
descriptionstring or null
namestring or null
revisionintegerObligatorio.
CampoTipoDescripción
dataobjectObligatorio. One preset: built-in (read-only for every role) or the organization's own.
data.created_byobject or null
data.created_by.namestringObligatorio.
data.default_selectedbooleanObligatorio. False for a framework preset, otherwise true.
data.descriptionstringObligatorio.
data.frameworkobject or nullObligatorio. Set on a framework preset; null on every other.
data.framework.noticeobject or nullObligatorio.
data.framework.sourceobjectObligatorio.
data.keystringObligatorio.
data.kindstring — one of builtin, organizationObligatorio.
data.revisioninteger or null
data.rulesarray of objectObligatorio.
data.rules[].capabilityobject or null
data.rules[].citationobject or nullObligatorio. What the rule cites, for a framework preset's rule; null for every other.
data.rules[].dimensionstring — one of quality, economics, security, safety, complianceObligatorio.
data.rules[].intent_keystringObligatorio.
data.rules[].sentencestringObligatorio.
data.titlestringObligatorio.
{
"data": {
"created_by": {
"name": "release-bot"
},
"default_selected": false,
"description": "string",
"framework": {
"notice": "string",
"source": {
"framework_url": "https://app.openlatch.ai/",
"github_url": "https://app.openlatch.ai/",
"license_name": "release-bot",
"license_url": "https://app.openlatch.ai/",
"name": "release-bot",
"source_commit": "string",
"source_date": "string"
}
},
"key": "string",
"kind": "builtin",
"revision": 3,
"rules": [
{
"capability": "enforce",
"citation": {
"entries": [
{}
],
"items": [
{}
]
},
"dimension": "quality",
"intent_key": "string",
"sentence": "string"
}
],
"title": "string"
}
}