Update a control rule
curl --request PATCH \
--url https://api.opper.ai/management/v1/controls/rules/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {},
"confirm_file_deletion": true,
"enabled": true,
"name": "<string>",
"schema_version": 123
}
'import requests
url = "https://api.opper.ai/management/v1/controls/rules/{uuid}"
payload = {
"config": {},
"confirm_file_deletion": True,
"enabled": True,
"name": "<string>",
"schema_version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {},
confirm_file_deletion: true,
enabled: true,
name: '<string>',
schema_version: 123
})
};
fetch('https://api.opper.ai/management/v1/controls/rules/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"config": {},
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"id": "<string>",
"kind": "<string>",
"schema_version": 123,
"scope": {
"type": "<string>",
"function_uuids": [
"<string>"
],
"project_uuids": [
"<string>"
]
},
"updated_at": "2023-11-07T05:31:56Z",
"allowed_model_ids": [
"<string>"
],
"confirm_file_deletion": true,
"effective_count": 123,
"name": "<string>",
"parent_allowlist": {
"countries": [
"<string>"
],
"handling": {
"cache_scopes": [
"<string>"
],
"caching": [
"<string>"
],
"human_review": [
"<string>"
],
"logging": [
"<string>"
],
"max_retention_days": 123,
"moderation": [
"<string>"
],
"subprocessors_read_content": true,
"training": [
"<string>"
]
},
"maker": {
"jurisdiction": [
"<string>"
],
"name": [
"<string>"
]
},
"models": [
"<string>"
],
"provider": {
"locations": {
"inference": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"jurisdiction": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"storage": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
}
},
"name": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"route": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
}
},
"providers": [
"<string>"
],
"regions": [
"<string>"
],
"deny_all": true,
"exclude_providers": [
"<string>"
],
"exclude_service_routes": [
"<string>"
],
"service_routes": [
"<string>"
]
}
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"allowed_plans": [
"<string>"
],
"current_plan": "<string>",
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"code": "<string>",
"error": "<string>",
"file_count": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Management
Update a control rule
Changes any of name, enabled, config, schema_version on an existing rule; fields not sent are left as they are. id, kind and scope are immutable (delete and recreate to change them). Requires the controls:write scope.
PATCH
/
management
/
v1
/
controls
/
rules
/
{uuid}
Update a control rule
curl --request PATCH \
--url https://api.opper.ai/management/v1/controls/rules/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {},
"confirm_file_deletion": true,
"enabled": true,
"name": "<string>",
"schema_version": 123
}
'import requests
url = "https://api.opper.ai/management/v1/controls/rules/{uuid}"
payload = {
"config": {},
"confirm_file_deletion": True,
"enabled": True,
"name": "<string>",
"schema_version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {},
confirm_file_deletion: true,
enabled: true,
name: '<string>',
schema_version: 123
})
};
fetch('https://api.opper.ai/management/v1/controls/rules/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"config": {},
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"id": "<string>",
"kind": "<string>",
"schema_version": 123,
"scope": {
"type": "<string>",
"function_uuids": [
"<string>"
],
"project_uuids": [
"<string>"
]
},
"updated_at": "2023-11-07T05:31:56Z",
"allowed_model_ids": [
"<string>"
],
"confirm_file_deletion": true,
"effective_count": 123,
"name": "<string>",
"parent_allowlist": {
"countries": [
"<string>"
],
"handling": {
"cache_scopes": [
"<string>"
],
"caching": [
"<string>"
],
"human_review": [
"<string>"
],
"logging": [
"<string>"
],
"max_retention_days": 123,
"moderation": [
"<string>"
],
"subprocessors_read_content": true,
"training": [
"<string>"
]
},
"maker": {
"jurisdiction": [
"<string>"
],
"name": [
"<string>"
]
},
"models": [
"<string>"
],
"provider": {
"locations": {
"inference": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"jurisdiction": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"storage": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
}
},
"name": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"route": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
}
},
"providers": [
"<string>"
],
"regions": [
"<string>"
],
"deny_all": true,
"exclude_providers": [
"<string>"
],
"exclude_service_routes": [
"<string>"
],
"service_routes": [
"<string>"
]
}
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"allowed_plans": [
"<string>"
],
"current_plan": "<string>",
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"code": "<string>",
"error": "<string>",
"file_count": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
Management API authentication. Pass an op-mak-… management token as a Bearer token. Runtime op-… API keys are rejected with 403 — they belong on the data-plane endpoints. Mint a management key from the platform UI under Settings → API keys.
Path Parameters
Rule id
Body
application/json
Replacement configuration; validated for the rule's kind.
See the create request. Needed when the change makes the scope zero-day and files are stored in it.
Enable or disable the rule.
New display name.
Re-version the config. A version this deployment cannot decode is refused.