curl --request PATCH \
--url https://api.cloudcruise.com/error-codes/{error_code_id} \
--header 'Content-Type: application/json' \
--header 'cc-key: <api-key>' \
--data '
{
"error_code": "<string>",
"description": "<string>",
"enriched_description": "<string>",
"retries": 1,
"retry_after": 1
}
'import requests
url = "https://api.cloudcruise.com/error-codes/{error_code_id}"
payload = {
"error_code": "<string>",
"description": "<string>",
"enriched_description": "<string>",
"retries": 1,
"retry_after": 1
}
headers = {
"cc-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'cc-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
error_code: '<string>',
description: '<string>',
enriched_description: '<string>',
retries: 1,
retry_after: 1
})
};
fetch('https://api.cloudcruise.com/error-codes/{error_code_id}', 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/error-codes/{error_code_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'error_code' => '<string>',
'description' => '<string>',
'enriched_description' => '<string>',
'retries' => 1,
'retry_after' => 1
]),
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/error-codes/{error_code_id}"
payload := strings.NewReader("{\n \"error_code\": \"<string>\",\n \"description\": \"<string>\",\n \"enriched_description\": \"<string>\",\n \"retries\": 1,\n \"retry_after\": 1\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cloudcruise.com/error-codes/{error_code_id}")
.header("cc-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"error_code\": \"<string>\",\n \"description\": \"<string>\",\n \"enriched_description\": \"<string>\",\n \"retries\": 1,\n \"retry_after\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/error-codes/{error_code_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cc-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"error_code\": \"<string>\",\n \"description\": \"<string>\",\n \"enriched_description\": \"<string>\",\n \"retries\": 1,\n \"retry_after\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_code": "<string>",
"description": "<string>",
"enriched_description": "<string>",
"error_action": "alert",
"retries": 123,
"retry_after": 123,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}Update error code
Updates fields of an error code. Only the fields you send are changed.
Renaming (error_code) fails with 409 if another code in the workspace already has that name (case- and whitespace-insensitive).
curl --request PATCH \
--url https://api.cloudcruise.com/error-codes/{error_code_id} \
--header 'Content-Type: application/json' \
--header 'cc-key: <api-key>' \
--data '
{
"error_code": "<string>",
"description": "<string>",
"enriched_description": "<string>",
"retries": 1,
"retry_after": 1
}
'import requests
url = "https://api.cloudcruise.com/error-codes/{error_code_id}"
payload = {
"error_code": "<string>",
"description": "<string>",
"enriched_description": "<string>",
"retries": 1,
"retry_after": 1
}
headers = {
"cc-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'cc-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
error_code: '<string>',
description: '<string>',
enriched_description: '<string>',
retries: 1,
retry_after: 1
})
};
fetch('https://api.cloudcruise.com/error-codes/{error_code_id}', 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/error-codes/{error_code_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'error_code' => '<string>',
'description' => '<string>',
'enriched_description' => '<string>',
'retries' => 1,
'retry_after' => 1
]),
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/error-codes/{error_code_id}"
payload := strings.NewReader("{\n \"error_code\": \"<string>\",\n \"description\": \"<string>\",\n \"enriched_description\": \"<string>\",\n \"retries\": 1,\n \"retry_after\": 1\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.cloudcruise.com/error-codes/{error_code_id}")
.header("cc-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"error_code\": \"<string>\",\n \"description\": \"<string>\",\n \"enriched_description\": \"<string>\",\n \"retries\": 1,\n \"retry_after\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudcruise.com/error-codes/{error_code_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cc-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"error_code\": \"<string>\",\n \"description\": \"<string>\",\n \"enriched_description\": \"<string>\",\n \"retries\": 1,\n \"retry_after\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error_code": "<string>",
"description": "<string>",
"enriched_description": "<string>",
"error_action": "alert",
"retries": 123,
"retry_after": 123,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}Authorizations
API key-based authentication. Provide your CloudCruise API key in the cc-key header.
Headers
CloudCruise API key for authentication
Path Parameters
The ID of the error code
Body
New name. Must not be blank or match another code in the workspace.
100Short description of the error
Longer description used to classify errors against this code
What CloudCruise does when a run fails with this code
alert, cancel, pause, retry, input_required Number of retries when error_action is retry
x >= 0Seconds to wait between retries when error_action is retry
x >= 0Response
Error code updated
Unique identifier. Use this value in a node's error-code parameter.
Name of the error code, e.g. CLAIM_NOT_FOUND
Short description of the error
Longer description used to classify errors against this code
What CloudCruise does when a run fails with this code
alert, cancel, pause, retry, input_required Number of retries when error_action is retry
Seconds to wait between retries when error_action is retry
ID of the workspace this error code belongs to
Timestamp when the error code was created
Was this page helpful?

