Edit policy draft
curl --request PATCH \
--url https://trylimitless.ai/v1/organization/policies/{policy_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": 1073741824
}
'import requests
url = "https://trylimitless.ai/v1/organization/policies/{policy_id}"
payload = { "revision": 1073741824 }
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({revision: 1073741824})
};
fetch('https://trylimitless.ai/v1/organization/policies/{policy_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"state": "draft",
"revision": 123,
"has_unpublished_changes": true,
"created_at": 123,
"updated_at": 123,
"draft": {
"rule": "<string>",
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"match_threshold_basis_points": 123,
"base_version": 123
},
"object": "organization.policy",
"current_version": 123,
"published": {
"id": "<string>",
"version": 123,
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"published_at": 123,
"current": true,
"rule": "<string>",
"object": "organization.policy.version",
"match_threshold_basis_points": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}Policies
Edit policy draft
Update a draft using its current revision. Published behavior is unchanged until the next publish. Requires policies:write.
PATCH
/
v1
/
organization
/
policies
/
{policy_id}
Edit policy draft
curl --request PATCH \
--url https://trylimitless.ai/v1/organization/policies/{policy_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": 1073741824
}
'import requests
url = "https://trylimitless.ai/v1/organization/policies/{policy_id}"
payload = { "revision": 1073741824 }
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({revision: 1073741824})
};
fetch('https://trylimitless.ai/v1/organization/policies/{policy_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"state": "draft",
"revision": 123,
"has_unpublished_changes": true,
"created_at": 123,
"updated_at": 123,
"draft": {
"rule": "<string>",
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"match_threshold_basis_points": 123,
"base_version": 123
},
"object": "organization.policy",
"current_version": 123,
"published": {
"id": "<string>",
"version": 123,
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"published_at": 123,
"current": true,
"rule": "<string>",
"object": "organization.policy.version",
"match_threshold_basis_points": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}Authorizations
Organization Admin API key with an appropriate scope. Customer keys cannot call organization routes.
Path Parameters
Resource identifier from a previous API response.
Required string length:
1 - 200Body
application/json
Current edit revision. Mutations must send the latest value.
Required range:
1 <= x <= 2147483647Required string length:
1 - 80Maximum string length:
240A yes-or-no question ending with ?.
Required string length:
1 - 20000Available options:
request, response, both Available options:
monitoring, enforcing Available options:
organization, projects, unattached Maximum array length:
1000Optional match threshold from 1 to 9,999; null restores the backend default.
Required range:
1 <= x <= 9999Response
Successful response.
Available options:
draft, monitoring, enforcing, paused Current edit revision. Mutations must send the latest value.
Show child attributes
Show child attributes
Allowed value:
"organization.policy"Active published version number, or null before first publication.
Show child attributes
Show child attributes