curl --request POST \
--url https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"targetWorkspaceId": "<string>",
"changeSummary": "<string>"
}
'import requests
url = "https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions"
payload = {
"targetWorkspaceId": "<string>",
"changeSummary": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetWorkspaceId: '<string>', changeSummary: '<string>'})
};
fetch('https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions', 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}/promotions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetWorkspaceId' => '<string>',
'changeSummary' => '<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}/promotions"
payload := strings.NewReader("{\n \"targetWorkspaceId\": \"<string>\",\n \"changeSummary\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetWorkspaceId\": \"<string>\",\n \"changeSummary\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetWorkspaceId\": \"<string>\",\n \"changeSummary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"status": 400,
"message": "Bad request",
"code": "VALIDATION_ERROR"
}<string><string><string>Apply a preset
Applies a preset’s configuration to the workspace. 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 POST \
--url https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"targetWorkspaceId": "<string>",
"changeSummary": "<string>"
}
'import requests
url = "https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions"
payload = {
"targetWorkspaceId": "<string>",
"changeSummary": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetWorkspaceId: '<string>', changeSummary: '<string>'})
};
fetch('https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions', 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}/promotions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetWorkspaceId' => '<string>',
'changeSummary' => '<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}/promotions"
payload := strings.NewReader("{\n \"targetWorkspaceId\": \"<string>\",\n \"changeSummary\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetWorkspaceId\": \"<string>\",\n \"changeSummary\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.gominerva.com/v2/organizations/{orgId}/workspaces/{workspaceId}/presets/{presetId}/promotions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetWorkspaceId\": \"<string>\",\n \"changeSummary\": \"<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
On customer_risk_rating the path presetId carries a CRR scorecard id.
match_scoring, alert_suppression, customer_risk_rating 1 - 64Recorded on the scorecard revision; ignored for presets.
500Response
Success
Envelope { data: { id, ... } } carrying the requested tenant-configuration record(s).