Act on a pod now
curl --request POST \
--url https://app.trustivan.com/api/v1/runtime/response/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod": "<string>",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workload_name": "<string>",
"dry_run": true,
"reason": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/runtime/response/actions"
payload = {
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod": "<string>",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workload_name": "<string>",
"dry_run": True,
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
namespace: '<string>',
pod: '<string>',
event_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workload_name: '<string>',
dry_run: true,
reason: '<string>'
})
};
fetch('https://app.trustivan.com/api/v1/runtime/response/actions', 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/actions"
payload := strings.NewReader("{\n \"cluster_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"namespace\": \"<string>\",\n \"pod\": \"<string>\",\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workload_name\": \"<string>\",\n \"dry_run\": true,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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"
}Act on a pod now
A person’s request: approved as it is created (the requester holds
the permission an approver needs, and is recorded as the decider), so
the cluster’s responder carries it out on its next poll. scale_to_zero
needs workload_kind (Deployment or StatefulSet) and workload_name.
Behind credentials:manage, for a person.
POST
/
runtime
/
response
/
actions
Act on a pod now
curl --request POST \
--url https://app.trustivan.com/api/v1/runtime/response/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod": "<string>",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workload_name": "<string>",
"dry_run": true,
"reason": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/runtime/response/actions"
payload = {
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod": "<string>",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workload_name": "<string>",
"dry_run": True,
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
namespace: '<string>',
pod: '<string>',
event_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workload_name: '<string>',
dry_run: true,
reason: '<string>'
})
};
fetch('https://app.trustivan.com/api/v1/runtime/response/actions', 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/actions"
payload := strings.NewReader("{\n \"cluster_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"namespace\": \"<string>\",\n \"pod\": \"<string>\",\n \"event_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workload_name\": \"<string>\",\n \"dry_run\": true,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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 action.