curl --request PATCH \
--url https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"config": {},
"presetId": "<string>",
"description": "<string>"
}
'import requests
url = "https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}"
payload = {
"label": "<string>",
"config": {},
"presetId": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', config: {}, presetId: '<string>', description: '<string>'})
};
fetch('https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}', 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://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}",
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([
'label' => '<string>',
'config' => [
],
'presetId' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"config\": {},\n \"presetId\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("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://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"config\": {},\n \"presetId\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"config\": {},\n \"presetId\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"status": 400,
"message": "Bad request",
"code": "VALIDATION_ERROR"
}<string><string><string>Update a preset
Updates a custom preset. Requires an admin application key (tenant-scoped, created by an owner or admin) or a dashboard user token. Writes by a user token require an owner or admin.
curl --request PATCH \
--url https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"config": {},
"presetId": "<string>",
"description": "<string>"
}
'import requests
url = "https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}"
payload = {
"label": "<string>",
"config": {},
"presetId": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', config: {}, presetId: '<string>', description: '<string>'})
};
fetch('https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}', 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://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}",
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([
'label' => '<string>',
'config' => [
],
'presetId' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"config\": {},\n \"presetId\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("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://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"config\": {},\n \"presetId\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"config\": {},\n \"presetId\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"status": 400,
"message": "Bad request",
"code": "VALIDATION_ERROR"
}<string><string><string>Authorizations
An admin application key: Authorization: Api-Key <token> (or legacy x-api-key). Only tenant owners and admins can create one. Standard keys are refused with 403 on workspace management and tenant configuration routes.
Path Parameters
The organization (tenant) id. Must equal the tenant of the admin key.
A workspace id in this organization. A workspace of another organization is 404.
The preset id.
Body
match_scoring, alert_suppression 1 - 128The preset configuration for configType.
Optional caller-chosen preset id. On update, the path presetId selects the preset.
1 - 1281024Response
Success
Envelope { data: { id, ... } } carrying the requested tenant-configuration record(s).