Assign error flavours
curl --request PATCH \
--url https://api.cloud.corbado.io/v1/observe/errorFlavours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"flavourIDs": [
"<string>"
],
"errorID": "<string>",
"assignReason": "<string>"
}
'import requests
url = "https://api.cloud.corbado.io/v1/observe/errorFlavours"
payload = {
"flavourIDs": ["<string>"],
"errorID": "<string>",
"assignReason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({flavourIDs: ['<string>'], errorID: '<string>', assignReason: '<string>'})
};
fetch('https://api.cloud.corbado.io/v1/observe/errorFlavours', 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.cloud.corbado.io/v1/observe/errorFlavours",
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([
'flavourIDs' => [
'<string>'
],
'errorID' => '<string>',
'assignReason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.cloud.corbado.io/v1/observe/errorFlavours"
payload := strings.NewReader("{\n \"flavourIDs\": [\n \"<string>\"\n ],\n \"errorID\": \"<string>\",\n \"assignReason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://api.cloud.corbado.io/v1/observe/errorFlavours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"flavourIDs\": [\n \"<string>\"\n ],\n \"errorID\": \"<string>\",\n \"assignReason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.corbado.io/v1/observe/errorFlavours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flavourIDs\": [\n \"<string>\"\n ],\n \"errorID\": \"<string>\",\n \"assignReason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"assignedCount": 123
}{
"error": {
"message": "Validation failed",
"details": [
{
"field": "projectID",
"message": "required"
}
]
}
}Error management
Assign error flavours
Bulk-assigns the given error flavours to an error (or unassigns them when errorID is omitted). Flavours not belonging to the project are ignored.
An error never mixes subflow types: the assigned flavours must share one subflow type, which must match the error’s stamped scope (stamped on first assignment, cleared when the last member is unassigned or moved away). Violations return a validation error.
Refused with 400 in projects whose errors follow the error model: their flavours stay on the error the
model decided.
Required API key permission: observe:errorFlavours:write.
PATCH
/
observe
/
errorFlavours
Assign error flavours
curl --request PATCH \
--url https://api.cloud.corbado.io/v1/observe/errorFlavours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"flavourIDs": [
"<string>"
],
"errorID": "<string>",
"assignReason": "<string>"
}
'import requests
url = "https://api.cloud.corbado.io/v1/observe/errorFlavours"
payload = {
"flavourIDs": ["<string>"],
"errorID": "<string>",
"assignReason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({flavourIDs: ['<string>'], errorID: '<string>', assignReason: '<string>'})
};
fetch('https://api.cloud.corbado.io/v1/observe/errorFlavours', 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.cloud.corbado.io/v1/observe/errorFlavours",
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([
'flavourIDs' => [
'<string>'
],
'errorID' => '<string>',
'assignReason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.cloud.corbado.io/v1/observe/errorFlavours"
payload := strings.NewReader("{\n \"flavourIDs\": [\n \"<string>\"\n ],\n \"errorID\": \"<string>\",\n \"assignReason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://api.cloud.corbado.io/v1/observe/errorFlavours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"flavourIDs\": [\n \"<string>\"\n ],\n \"errorID\": \"<string>\",\n \"assignReason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.corbado.io/v1/observe/errorFlavours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flavourIDs\": [\n \"<string>\"\n ],\n \"errorID\": \"<string>\",\n \"assignReason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"assignedCount": 123
}{
"error": {
"message": "Validation failed",
"details": [
{
"field": "projectID",
"message": "required"
}
]
}
}Authorizations
Body
application/json
Was this page helpful?