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"
}
]
}
}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.
Required API key permission: observe:errorFlavours:write.
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
Use an Observe API key from the management console. The key selects the project and must grant the permission listed on the operation. Keep this key on your server.
Body
Flavour IDs to (un)assign (format erf-<number>).
1 - 1000 elementsError to assign the flavours to (format err-<number>). Omit to unassign the flavours.
Provenance of this assignment (defaults to manual). Only allowed together with errorID; unassigning always clears the stored provenance.
manual, kb, agent Human-readable explanation of why these flavours belong to the error; stored per flavour and overwritten on remap. Only allowed together with errorID.
Response
Assignment applied.
Number of flavours whose assignment was changed.
Was this page helpful?