Ir al contenido

Remove a rule from an organization preset

DELETE/api/public/v1/policy-presets/{key}/rules/{rule_id} beta

revision is the one the caller read. 409 PRESET_EMPTY on the last rule of the preset: delete the preset instead. 409 PRESET_CHANGED for a stale revision; 409 PRESET_READ_ONLY for a built-in.

Ventana de terminal
curl --fail-with-body -X DELETE 'https://app.openlatch.ai/api/public/v1/policy-presets/<preset_key>/rules/<rule_id>?revision=<preset_revision>' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
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.
rule_idstringObligatorio.
ParámetroTipoDescripción
revisionintegerObligatorio.
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
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"
}
}