Skip to content

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.

Terminal window
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"
Role in the organizationThis endpoint
ownerAllowed
adminAllowed
editorAllowed
viewerNot allowed

A key carries the role its owner holds in the organization. See Authentication.

API key scope: presets:write

ParameterTypeDescription
keystringRequired.
rule_idstringRequired.
ParameterTypeDescription
revisionintegerRequired.
ParameterTypeDescription
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.
FieldTypeDescription
dataobjectRequired. One preset: built-in (read-only for every role) or the organization's own.
data.created_byobject or null
data.created_by.namestringRequired.
data.default_selectedbooleanRequired. False for a framework preset, otherwise true.
data.descriptionstringRequired.
data.frameworkobject or nullRequired. Set on a framework preset; null on every other.
data.framework.noticeobject or nullRequired.
data.framework.sourceobjectRequired.
data.keystringRequired.
data.kindstring — one of builtin, organizationRequired.
data.revisioninteger or null
data.rulesarray of objectRequired.
data.rules[].capabilityobject or null
data.rules[].citationobject or nullRequired. What the rule cites, for a framework preset's rule; null for every other.
data.rules[].dimensionstring — one of quality, economics, security, safety, complianceRequired.
data.rules[].intent_keystringRequired.
data.rules[].sentencestringRequired.
data.titlestringRequired.
{
"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"
}
}