Report the change of active simulations at the moment
curl --request POST \
--url https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "1",
"type": "rel"
}
'import requests
url = "https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats"
payload = {
"value": "1",
"type": "rel"
}
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({value: '1', type: 'rel'})
};
fetch('https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats', 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://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats",
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([
'value' => '1',
'type' => 'rel'
]),
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://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats"
payload := strings.NewReader("{\n \"value\": \"1\",\n \"type\": \"rel\"\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://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"1\",\n \"type\": \"rel\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats")
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 \"value\": \"1\",\n \"type\": \"rel\"\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"value\": \"1\",\n \"type\": \"rel\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: <api-key>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"value\": \"1\",\n \"type\": \"rel\"\n}");
CURLcode ret = curl_easy_perform(hnd);Report the change of active simulations at the moment
Relative values are considered (±1)
POST
/
v2
/
tsa
/
jobs
/
simulation_status
/
{job_chunk_id}
/
stats
Report the change of active simulations at the moment
curl --request POST \
--url https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "1",
"type": "rel"
}
'import requests
url = "https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats"
payload = {
"value": "1",
"type": "rel"
}
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({value: '1', type: 'rel'})
};
fetch('https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats', 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://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats",
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([
'value' => '1',
'type' => 'rel'
]),
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://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats"
payload := strings.NewReader("{\n \"value\": \"1\",\n \"type\": \"rel\"\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://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"1\",\n \"type\": \"rel\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats")
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 \"value\": \"1\",\n \"type\": \"rel\"\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"value\": \"1\",\n \"type\": \"rel\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://{host}/api/tsa/v2/tsa/jobs/simulation_status/{job_chunk_id}/stats");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: <api-key>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"value\": \"1\",\n \"type\": \"rel\"\n}");
CURLcode ret = curl_easy_perform(hnd);Body
application/json
Response
201
Reported successfully
Was this page helpful?