Update classification
curl --request PATCH \
--url https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification} \
--header 'Content-Type: application/json' \
--header 'x-qanapi-authorization: <api-key>' \
--data '
{
"name": "<string>",
"bg_color": "<string>",
"fg_color": "<string>",
"description": "<string>",
"emoji": "<string>",
"provider_container_id": 123,
"gws_groups": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"users": [
123
],
"roles": [
123
]
}
'import requests
url = "https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}"
payload = {
"name": "<string>",
"bg_color": "<string>",
"fg_color": "<string>",
"description": "<string>",
"emoji": "<string>",
"provider_container_id": 123,
"gws_groups": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"users": [123],
"roles": [123]
}
headers = {
"x-qanapi-authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-qanapi-authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
bg_color: '<string>',
fg_color: '<string>',
description: '<string>',
emoji: '<string>',
provider_container_id: 123,
gws_groups: [{id: '<string>', name: '<string>', email: '<string>'}],
users: [123],
roles: [123]
})
};
fetch('https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}', 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://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}",
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([
'name' => '<string>',
'bg_color' => '<string>',
'fg_color' => '<string>',
'description' => '<string>',
'emoji' => '<string>',
'provider_container_id' => 123,
'gws_groups' => [
[
'id' => '<string>',
'name' => '<string>',
'email' => '<string>'
]
],
'users' => [
123
],
'roles' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-qanapi-authorization: <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://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"bg_color\": \"<string>\",\n \"fg_color\": \"<string>\",\n \"description\": \"<string>\",\n \"emoji\": \"<string>\",\n \"provider_container_id\": 123,\n \"gws_groups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"users\": [\n 123\n ],\n \"roles\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-qanapi-authorization", "<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://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}")
.header("x-qanapi-authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"bg_color\": \"<string>\",\n \"fg_color\": \"<string>\",\n \"description\": \"<string>\",\n \"emoji\": \"<string>\",\n \"provider_container_id\": 123,\n \"gws_groups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"users\": [\n 123\n ],\n \"roles\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-qanapi-authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"bg_color\": \"<string>\",\n \"fg_color\": \"<string>\",\n \"description\": \"<string>\",\n \"emoji\": \"<string>\",\n \"provider_container_id\": 123,\n \"gws_groups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"users\": [\n 123\n ],\n \"roles\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"bg_color": "<string>",
"fg_color": "<string>",
"description": "<string>",
"emoji": "<string>",
"providers": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"gws_groups": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
]
}
],
"users": [
{
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"two_factor_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"roles": [
{
"name": "<string>",
"description": "<string>",
"permissions": [
{
"name": "<string>"
}
]
}
]
}
],
"roles": [
{
"name": "<string>",
"description": "<string>",
"permissions": [
{
"name": "<string>"
}
]
}
]
}{
"message": "Unauthorized."
}{
"message": "User does not have the right permissions."
}{
"message": "Resource not found."
}{
"message": "Validation failed.",
"errors": {
"field_name": [
"The field_name field is required."
]
}
}Classifications
Update classification
PATCH
/
v3
/
classifications
/
{classification}
Update classification
curl --request PATCH \
--url https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification} \
--header 'Content-Type: application/json' \
--header 'x-qanapi-authorization: <api-key>' \
--data '
{
"name": "<string>",
"bg_color": "<string>",
"fg_color": "<string>",
"description": "<string>",
"emoji": "<string>",
"provider_container_id": 123,
"gws_groups": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"users": [
123
],
"roles": [
123
]
}
'import requests
url = "https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}"
payload = {
"name": "<string>",
"bg_color": "<string>",
"fg_color": "<string>",
"description": "<string>",
"emoji": "<string>",
"provider_container_id": 123,
"gws_groups": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"users": [123],
"roles": [123]
}
headers = {
"x-qanapi-authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-qanapi-authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
bg_color: '<string>',
fg_color: '<string>',
description: '<string>',
emoji: '<string>',
provider_container_id: 123,
gws_groups: [{id: '<string>', name: '<string>', email: '<string>'}],
users: [123],
roles: [123]
})
};
fetch('https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}', 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://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}",
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([
'name' => '<string>',
'bg_color' => '<string>',
'fg_color' => '<string>',
'description' => '<string>',
'emoji' => '<string>',
'provider_container_id' => 123,
'gws_groups' => [
[
'id' => '<string>',
'name' => '<string>',
'email' => '<string>'
]
],
'users' => [
123
],
'roles' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-qanapi-authorization: <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://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"bg_color\": \"<string>\",\n \"fg_color\": \"<string>\",\n \"description\": \"<string>\",\n \"emoji\": \"<string>\",\n \"provider_container_id\": 123,\n \"gws_groups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"users\": [\n 123\n ],\n \"roles\": [\n 123\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-qanapi-authorization", "<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://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}")
.header("x-qanapi-authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"bg_color\": \"<string>\",\n \"fg_color\": \"<string>\",\n \"description\": \"<string>\",\n \"emoji\": \"<string>\",\n \"provider_container_id\": 123,\n \"gws_groups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"users\": [\n 123\n ],\n \"roles\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.qanapi.cloud/api/v3/classifications/{classification}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-qanapi-authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"bg_color\": \"<string>\",\n \"fg_color\": \"<string>\",\n \"description\": \"<string>\",\n \"emoji\": \"<string>\",\n \"provider_container_id\": 123,\n \"gws_groups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"users\": [\n 123\n ],\n \"roles\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"bg_color": "<string>",
"fg_color": "<string>",
"description": "<string>",
"emoji": "<string>",
"providers": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"gws_groups": [
{
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
]
}
],
"users": [
{
"id": 123,
"name": "<string>",
"email": "jsmith@example.com",
"two_factor_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"roles": [
{
"name": "<string>",
"description": "<string>",
"permissions": [
{
"name": "<string>"
}
]
}
]
}
],
"roles": [
{
"name": "<string>",
"description": "<string>",
"permissions": [
{
"name": "<string>"
}
]
}
]
}{
"message": "Unauthorized."
}{
"message": "User does not have the right permissions."
}{
"message": "Resource not found."
}{
"message": "Validation failed.",
"errors": {
"field_name": [
"The field_name field is required."
]
}
}Authorizations
Path Parameters
Body
application/json
Maximum string length:
32Pattern:
^#[0-9A-Fa-f]{6}$Pattern:
^#[0-9A-Fa-f]{6}$Maximum string length:
255Required if gws_groups is provided.
Show child attributes
Show child attributes
Array of user IDs.
Array of role IDs.
Response
Classification updated
Maximum string length:
32Pattern:
^#[0-9A-Fa-f]{6}$Pattern:
^#[0-9A-Fa-f]{6}$Maximum string length:
255Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I