Disable policy
curl --request POST \
--url https://cp.xenovia.io/api/v1/policies/{policy_id}/disable \
--header 'Authorization: Bearer <token>'import requests
url = "https://cp.xenovia.io/api/v1/policies/{policy_id}/disable"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cp.xenovia.io/api/v1/policies/{policy_id}/disable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cp.xenovia.io/api/v1/policies/{policy_id}/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cp.xenovia.io/api/v1/policies/{policy_id}/disable"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cp.xenovia.io/api/v1/policies/{policy_id}/disable")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cp.xenovia.io/api/v1/policies/{policy_id}/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"category": "<string>",
"summary": "<string>",
"rego": "<string>",
"enabled": true,
"stage": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"warnings": [
"<string>"
],
"group": "<string>",
"template_controls_outdated": true,
"enforcement_mode": "enforce",
"response_body_mode": "none",
"template_id": "<string>",
"template_version": 123,
"framework_tags": [
"<string>"
],
"control_mappings": [
{
"framework": "<string>",
"controls": [
"<string>"
],
"rationale": ""
}
],
"parameter_values": {},
"version": 1,
"baseline_target": {},
"conformance_cases": [
{
"name": "<string>",
"input": {},
"expect": {
"action": "<string>",
"rule": "<string>"
},
"stage": "request",
"parameters": {}
}
],
"conformance": {
"ran_at": "2023-11-07T05:31:56Z",
"opa_version": "<string>",
"source": "template",
"passed": 123,
"failed": 123,
"cases": [
{
"name": "<string>",
"stage": "request",
"expected_action": "<string>",
"got_action": "<string>",
"ok": true,
"expected_rule": "<string>",
"got_rule": "<string>",
"error": "<string>"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Policies
Disable policy
Auth: organization API key with write scope, or a signed-in user.
POST
/
api
/
v1
/
policies
/
{policy_id}
/
disable
Disable policy
curl --request POST \
--url https://cp.xenovia.io/api/v1/policies/{policy_id}/disable \
--header 'Authorization: Bearer <token>'import requests
url = "https://cp.xenovia.io/api/v1/policies/{policy_id}/disable"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cp.xenovia.io/api/v1/policies/{policy_id}/disable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cp.xenovia.io/api/v1/policies/{policy_id}/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cp.xenovia.io/api/v1/policies/{policy_id}/disable"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cp.xenovia.io/api/v1/policies/{policy_id}/disable")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cp.xenovia.io/api/v1/policies/{policy_id}/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"category": "<string>",
"summary": "<string>",
"rego": "<string>",
"enabled": true,
"stage": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"warnings": [
"<string>"
],
"group": "<string>",
"template_controls_outdated": true,
"enforcement_mode": "enforce",
"response_body_mode": "none",
"template_id": "<string>",
"template_version": 123,
"framework_tags": [
"<string>"
],
"control_mappings": [
{
"framework": "<string>",
"controls": [
"<string>"
],
"rationale": ""
}
],
"parameter_values": {},
"version": 1,
"baseline_target": {},
"conformance_cases": [
{
"name": "<string>",
"input": {},
"expect": {
"action": "<string>",
"rule": "<string>"
},
"stage": "request",
"parameters": {}
}
],
"conformance": {
"ran_at": "2023-11-07T05:31:56Z",
"opa_version": "<string>",
"source": "template",
"passed": 123,
"failed": 123,
"cases": [
{
"name": "<string>",
"stage": "request",
"expected_action": "<string>",
"got_action": "<string>",
"ok": true,
"expected_rule": "<string>",
"got_rule": "<string>",
"error": "<string>"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer token: an organization API key (ak_…) created under Settings → API Keys, or a dashboard user session token. Agent keys (xe_…) are not accepted here. Endpoints marked as user-only in their description reject organization keys with 403.
Headers
Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The last run of a policy's cases: what an auditor reads next to the control the policy is evidence for.
Show child attributes
Show child attributes