import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const simulationGroup = await client.simulationGroup.update('2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d');
console.log(simulationGroup.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
simulation_group = client.simulation_group.update(
group_id="2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d",
)
print(simulation_group.data)curl --request PUT \
--url https://api.roark.ai/v1/simulation/group/{groupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"simulationRunPlanIds": [
"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/simulation/group/{groupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'simulationRunPlanIds' => [
'3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f',
'6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a'
]
]),
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.roark.ai/v1/simulation/group/{groupId}"
payload := strings.NewReader("{\n \"simulationRunPlanIds\": [\n \"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f\",\n \"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.roark.ai/v1/simulation/group/{groupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"simulationRunPlanIds\": [\n \"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f\",\n \"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/simulation/group/{groupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"simulationRunPlanIds\": [\n \"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f\",\n \"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"configManaged": true,
"plans": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"notifications": {
"email": {
"enabled": true,
"recipients": [
"<string>"
]
},
"slack": [
{
"channelId": "<string>",
"channelName": "<string>"
}
]
},
"lastRunAt": "<string>",
"latestRunGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "not_found",
"code": "resource_not_found",
"message": "The requested resource could not be found"
}{
"type": "conflict",
"code": "resource_in_use",
"message": "The resource is in use and cannot be deleted"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Update a simulation group
Edits a saved simulation group. Omitted fields keep their current value; notifications,
when sent, replaces the settings as a whole. Run groups it already started keep theirs.
A group managed by config as code (configManaged: true) returns 409: change it in the config file.
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const simulationGroup = await client.simulationGroup.update('2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d');
console.log(simulationGroup.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
simulation_group = client.simulation_group.update(
group_id="2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d",
)
print(simulation_group.data)curl --request PUT \
--url https://api.roark.ai/v1/simulation/group/{groupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"simulationRunPlanIds": [
"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/simulation/group/{groupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'simulationRunPlanIds' => [
'3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f',
'6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a'
]
]),
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.roark.ai/v1/simulation/group/{groupId}"
payload := strings.NewReader("{\n \"simulationRunPlanIds\": [\n \"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f\",\n \"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.roark.ai/v1/simulation/group/{groupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"simulationRunPlanIds\": [\n \"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f\",\n \"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/simulation/group/{groupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"simulationRunPlanIds\": [\n \"3c1d2e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f\",\n \"6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"configManaged": true,
"plans": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"notifications": {
"email": {
"enabled": true,
"recipients": [
"<string>"
]
},
"slack": [
{
"channelId": "<string>",
"channelName": "<string>"
}
]
},
"lastRunAt": "<string>",
"latestRunGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "not_found",
"code": "resource_not_found",
"message": "The requested resource could not be found"
}{
"type": "conflict",
"code": "resource_in_use",
"message": "The resource is in use and cannot be deleted"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The simulation group ID
Body
Omitted fields keep their current value. Run groups the group already started keep theirs.
1 - 200Send null to clear it.
2000Replaces the plans, in run order.
2 - 20 elementsReplaces the notification settings as a whole.
Show child attributes
Show child attributes
{ "email": { "enabled": true, "recipients": [] }, "slack": [ { "channelId": "C07ABCDEF12", "channelName": "qa-reports" } ] }
Response
The updated group
A saved, repeatable set of plans that run together. Each run starts one run of every plan and groups them into a run group with one combined report.
Show child attributes
Show child attributes