Replace a runtime response policy
curl --request PUT \
--url https://app.trustivan.com/api/v1/runtime/response/policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"categories": [],
"rule_ids": [
"<string>"
],
"min_severity": "high",
"exclude_namespaces": [
"<string>"
],
"dry_run": true,
"enabled": true
}
'import requests
url = "https://app.trustivan.com/api/v1/runtime/response/policies/{id}"
payload = {
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"categories": [],
"rule_ids": ["<string>"],
"min_severity": "high",
"exclude_namespaces": ["<string>"],
"dry_run": True,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
categories: [],
rule_ids: ['<string>'],
min_severity: 'high',
exclude_namespaces: ['<string>'],
dry_run: true,
enabled: true
})
};
fetch('https://app.trustivan.com/api/v1/runtime/response/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/runtime/response/policies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cluster_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categories\": [],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"min_severity\": \"high\",\n \"exclude_namespaces\": [\n \"<string>\"\n ],\n \"dry_run\": true,\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Replace a runtime response policy
Behind credentials:manage, for a person.
PUT
/
runtime
/
response
/
policies
/
{id}
Replace a runtime response policy
curl --request PUT \
--url https://app.trustivan.com/api/v1/runtime/response/policies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"categories": [],
"rule_ids": [
"<string>"
],
"min_severity": "high",
"exclude_namespaces": [
"<string>"
],
"dry_run": true,
"enabled": true
}
'import requests
url = "https://app.trustivan.com/api/v1/runtime/response/policies/{id}"
payload = {
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"categories": [],
"rule_ids": ["<string>"],
"min_severity": "high",
"exclude_namespaces": ["<string>"],
"dry_run": True,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
categories: [],
rule_ids: ['<string>'],
min_severity: 'high',
exclude_namespaces: ['<string>'],
dry_run: true,
enabled: true
})
};
fetch('https://app.trustivan.com/api/v1/runtime/response/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/runtime/response/policies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"cluster_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categories\": [],\n \"rule_ids\": [\n \"<string>\"\n ],\n \"min_severity\": \"high\",\n \"exclude_namespaces\": [\n \"<string>\"\n ],\n \"dry_run\": true,\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Body
application/json
Response
The stored policy.