curl --request POST \
--url https://api.cloudcruise.com/run/{session_id}/decision/respond \
--header 'Content-Type: application/json' \
--header 'cc-key: <api-key>' \
--data '
{
"decision_id": "<string>",
"values": {
"choice": "keep"
},
"text": "<string>"
}
'import requests
url = "https://api.cloudcruise.com/run/{session_id}/decision/respond"
payload = {
"decision_id": "<string>",
"values": { "choice": "keep" },
"text": "<string>"
}
headers = {
"cc-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'cc-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({decision_id: '<string>', values: {choice: 'keep'}, text: '<string>'})
};
fetch('https://api.cloudcruise.com/run/{session_id}/decision/respond', 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://api.cloudcruise.com/run/{session_id}/decision/respond",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'decision_id' => '<string>',
'values' => [
'choice' => 'keep'
],
'text' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"cc-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcruise.com/run/{session_id}/decision/respond"
payload := strings.NewReader("{\n \"decision_id\": \"<string>\",\n \"values\": {\n \"choice\": \"keep\"\n },\n \"text\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cc-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.cloudcruise.com/run/{session_id}/decision/respond")
.header("cc-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"decision_id\": \"<string>\",\n \"values\": {\n \"choice\": \"keep\"\n },\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/run/{session_id}/decision/respond")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cc-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decision_id\": \"<string>\",\n \"values\": {\n \"choice\": \"keep\"\n },\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "accepted",
"decision_id": "<string>"
}Answer a decision
Answers a question the recovery agent asked during a run (Decision Required). The agent.decision_requested webhook carries the question, the fields with their ids and options, free_text, and respond_url, which is this endpoint for that run. This page is the reference for the request body. The first accepted answer resolves the decision, whether it comes from this endpoint, Slack or the dashboard; the run resumes with it and agent.decision_answered is sent with answered_via: api and answered_by: api_key:<key id>.
Send decision_id and at least one of values, text or directive. A key can only answer decisions of runs in its own workspace. Once the decision is answered, expired or cancelled, this endpoint returns 404.
curl --request POST \
--url https://api.cloudcruise.com/run/{session_id}/decision/respond \
--header 'Content-Type: application/json' \
--header 'cc-key: <api-key>' \
--data '
{
"decision_id": "<string>",
"values": {
"choice": "keep"
},
"text": "<string>"
}
'import requests
url = "https://api.cloudcruise.com/run/{session_id}/decision/respond"
payload = {
"decision_id": "<string>",
"values": { "choice": "keep" },
"text": "<string>"
}
headers = {
"cc-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'cc-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({decision_id: '<string>', values: {choice: 'keep'}, text: '<string>'})
};
fetch('https://api.cloudcruise.com/run/{session_id}/decision/respond', 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://api.cloudcruise.com/run/{session_id}/decision/respond",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'decision_id' => '<string>',
'values' => [
'choice' => 'keep'
],
'text' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"cc-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudcruise.com/run/{session_id}/decision/respond"
payload := strings.NewReader("{\n \"decision_id\": \"<string>\",\n \"values\": {\n \"choice\": \"keep\"\n },\n \"text\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cc-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.cloudcruise.com/run/{session_id}/decision/respond")
.header("cc-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"decision_id\": \"<string>\",\n \"values\": {\n \"choice\": \"keep\"\n },\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/run/{session_id}/decision/respond")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cc-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decision_id\": \"<string>\",\n \"values\": {\n \"choice\": \"keep\"\n },\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "accepted",
"decision_id": "<string>"
}Authorizations
API key-based authentication. Provide your CloudCruise API key in the cc-key header.
Path Parameters
The session that asked the decision (session_id in the webhook)
Body
The decision_id from agent.decision_requested
Answers keyed by field id. For choice fields, the option id.
{ "choice": "keep" }
A free-text instruction for the agent
2000Requeue the run, stop it and note that an error code should be added, or fail it
requeue, add_error_code, fail Was this page helpful?

