Jobs
Submit Jobs
POST
/
jobs
cURL
curl --request POST \
--url https://api.example.com/jobs \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"compute": {
"container": {
"cpu_request": "<string>",
"image": "<string>",
"memory_request": "<string>",
"cpu_limit": "<string>",
"environment": {},
"memory_limit": "<string>"
},
"job_timeout_seconds": 1,
"max_parallel_jobs": 1,
"baremetal": {
"max_parallel_processes": 1,
"ssh_hosts": [
{
"cores": 1,
"host": "<string>",
"ssh_key_path": "<string>",
"username": "<string>"
}
],
"working_directory": "<string>"
},
"kubernetes": {
"cluster_name": "<string>",
"namespace": "<string>",
"node_selectors": {},
"tolerations": [
{
"effect": "<string>",
"key": "<string>",
"operator": "<string>",
"value": "<string>"
}
]
}
},
"dispersions": {},
"early_termination": {
"check_frequency_hz": 123,
"conditions": [
{
"condition": "<string>",
"description": "<string>",
"variable": "<string>"
}
],
"enabled": true
},
"monte_carlo": {
"runs": 1,
"seed": 1
},
"simulation": {
"duration_minutes": 1,
"name": "<string>",
"version": "<string>"
},
"telemetry": {
"buffer_flush_interval_seconds": 1,
"sampling_rate_hz": 123,
"storage": {
"s3_bucket": "<string>",
"s3_prefix": "<string>"
},
"variables": [
"<string>"
]
}
},
"name": "<string>",
"runs_override": 1
}
'import requests
url = "https://api.example.com/jobs"
payload = {
"config": {
"compute": {
"container": {
"cpu_request": "<string>",
"image": "<string>",
"memory_request": "<string>",
"cpu_limit": "<string>",
"environment": {},
"memory_limit": "<string>"
},
"job_timeout_seconds": 1,
"max_parallel_jobs": 1,
"baremetal": {
"max_parallel_processes": 1,
"ssh_hosts": [
{
"cores": 1,
"host": "<string>",
"ssh_key_path": "<string>",
"username": "<string>"
}
],
"working_directory": "<string>"
},
"kubernetes": {
"cluster_name": "<string>",
"namespace": "<string>",
"node_selectors": {},
"tolerations": [
{
"effect": "<string>",
"key": "<string>",
"operator": "<string>",
"value": "<string>"
}
]
}
},
"dispersions": {},
"early_termination": {
"check_frequency_hz": 123,
"conditions": [
{
"condition": "<string>",
"description": "<string>",
"variable": "<string>"
}
],
"enabled": True
},
"monte_carlo": {
"runs": 1,
"seed": 1
},
"simulation": {
"duration_minutes": 1,
"name": "<string>",
"version": "<string>"
},
"telemetry": {
"buffer_flush_interval_seconds": 1,
"sampling_rate_hz": 123,
"storage": {
"s3_bucket": "<string>",
"s3_prefix": "<string>"
},
"variables": ["<string>"]
}
},
"name": "<string>",
"runs_override": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
compute: {
container: {
cpu_request: '<string>',
image: '<string>',
memory_request: '<string>',
cpu_limit: '<string>',
environment: {},
memory_limit: '<string>'
},
job_timeout_seconds: 1,
max_parallel_jobs: 1,
baremetal: {
max_parallel_processes: 1,
ssh_hosts: [{cores: 1, host: '<string>', ssh_key_path: '<string>', username: '<string>'}],
working_directory: '<string>'
},
kubernetes: {
cluster_name: '<string>',
namespace: '<string>',
node_selectors: {},
tolerations: [{effect: '<string>', key: '<string>', operator: '<string>', value: '<string>'}]
}
},
dispersions: {},
early_termination: {
check_frequency_hz: 123,
conditions: [{condition: '<string>', description: '<string>', variable: '<string>'}],
enabled: true
},
monte_carlo: {runs: 1, seed: 1},
simulation: {duration_minutes: 1, name: '<string>', version: '<string>'},
telemetry: {
buffer_flush_interval_seconds: 1,
sampling_rate_hz: 123,
storage: {s3_bucket: '<string>', s3_prefix: '<string>'},
variables: ['<string>']
}
},
name: '<string>',
runs_override: 1
})
};
fetch('https://api.example.com/jobs', 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://api.example.com/jobs",
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([
'config' => [
'compute' => [
'container' => [
'cpu_request' => '<string>',
'image' => '<string>',
'memory_request' => '<string>',
'cpu_limit' => '<string>',
'environment' => [
],
'memory_limit' => '<string>'
],
'job_timeout_seconds' => 1,
'max_parallel_jobs' => 1,
'baremetal' => [
'max_parallel_processes' => 1,
'ssh_hosts' => [
[
'cores' => 1,
'host' => '<string>',
'ssh_key_path' => '<string>',
'username' => '<string>'
]
],
'working_directory' => '<string>'
],
'kubernetes' => [
'cluster_name' => '<string>',
'namespace' => '<string>',
'node_selectors' => [
],
'tolerations' => [
[
'effect' => '<string>',
'key' => '<string>',
'operator' => '<string>',
'value' => '<string>'
]
]
]
],
'dispersions' => [
],
'early_termination' => [
'check_frequency_hz' => 123,
'conditions' => [
[
'condition' => '<string>',
'description' => '<string>',
'variable' => '<string>'
]
],
'enabled' => true
],
'monte_carlo' => [
'runs' => 1,
'seed' => 1
],
'simulation' => [
'duration_minutes' => 1,
'name' => '<string>',
'version' => '<string>'
],
'telemetry' => [
'buffer_flush_interval_seconds' => 1,
'sampling_rate_hz' => 123,
'storage' => [
's3_bucket' => '<string>',
's3_prefix' => '<string>'
],
'variables' => [
'<string>'
]
]
],
'name' => '<string>',
'runs_override' => 1
]),
CURLOPT_HTTPHEADER => [
"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.example.com/jobs"
payload := strings.NewReader("{\n \"config\": {\n \"compute\": {\n \"container\": {\n \"cpu_request\": \"<string>\",\n \"image\": \"<string>\",\n \"memory_request\": \"<string>\",\n \"cpu_limit\": \"<string>\",\n \"environment\": {},\n \"memory_limit\": \"<string>\"\n },\n \"job_timeout_seconds\": 1,\n \"max_parallel_jobs\": 1,\n \"baremetal\": {\n \"max_parallel_processes\": 1,\n \"ssh_hosts\": [\n {\n \"cores\": 1,\n \"host\": \"<string>\",\n \"ssh_key_path\": \"<string>\",\n \"username\": \"<string>\"\n }\n ],\n \"working_directory\": \"<string>\"\n },\n \"kubernetes\": {\n \"cluster_name\": \"<string>\",\n \"namespace\": \"<string>\",\n \"node_selectors\": {},\n \"tolerations\": [\n {\n \"effect\": \"<string>\",\n \"key\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"dispersions\": {},\n \"early_termination\": {\n \"check_frequency_hz\": 123,\n \"conditions\": [\n {\n \"condition\": \"<string>\",\n \"description\": \"<string>\",\n \"variable\": \"<string>\"\n }\n ],\n \"enabled\": true\n },\n \"monte_carlo\": {\n \"runs\": 1,\n \"seed\": 1\n },\n \"simulation\": {\n \"duration_minutes\": 1,\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"telemetry\": {\n \"buffer_flush_interval_seconds\": 1,\n \"sampling_rate_hz\": 123,\n \"storage\": {\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\"\n },\n \"variables\": [\n \"<string>\"\n ]\n }\n },\n \"name\": \"<string>\",\n \"runs_override\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/jobs")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"compute\": {\n \"container\": {\n \"cpu_request\": \"<string>\",\n \"image\": \"<string>\",\n \"memory_request\": \"<string>\",\n \"cpu_limit\": \"<string>\",\n \"environment\": {},\n \"memory_limit\": \"<string>\"\n },\n \"job_timeout_seconds\": 1,\n \"max_parallel_jobs\": 1,\n \"baremetal\": {\n \"max_parallel_processes\": 1,\n \"ssh_hosts\": [\n {\n \"cores\": 1,\n \"host\": \"<string>\",\n \"ssh_key_path\": \"<string>\",\n \"username\": \"<string>\"\n }\n ],\n \"working_directory\": \"<string>\"\n },\n \"kubernetes\": {\n \"cluster_name\": \"<string>\",\n \"namespace\": \"<string>\",\n \"node_selectors\": {},\n \"tolerations\": [\n {\n \"effect\": \"<string>\",\n \"key\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"dispersions\": {},\n \"early_termination\": {\n \"check_frequency_hz\": 123,\n \"conditions\": [\n {\n \"condition\": \"<string>\",\n \"description\": \"<string>\",\n \"variable\": \"<string>\"\n }\n ],\n \"enabled\": true\n },\n \"monte_carlo\": {\n \"runs\": 1,\n \"seed\": 1\n },\n \"simulation\": {\n \"duration_minutes\": 1,\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"telemetry\": {\n \"buffer_flush_interval_seconds\": 1,\n \"sampling_rate_hz\": 123,\n \"storage\": {\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\"\n },\n \"variables\": [\n \"<string>\"\n ]\n }\n },\n \"name\": \"<string>\",\n \"runs_override\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"compute\": {\n \"container\": {\n \"cpu_request\": \"<string>\",\n \"image\": \"<string>\",\n \"memory_request\": \"<string>\",\n \"cpu_limit\": \"<string>\",\n \"environment\": {},\n \"memory_limit\": \"<string>\"\n },\n \"job_timeout_seconds\": 1,\n \"max_parallel_jobs\": 1,\n \"baremetal\": {\n \"max_parallel_processes\": 1,\n \"ssh_hosts\": [\n {\n \"cores\": 1,\n \"host\": \"<string>\",\n \"ssh_key_path\": \"<string>\",\n \"username\": \"<string>\"\n }\n ],\n \"working_directory\": \"<string>\"\n },\n \"kubernetes\": {\n \"cluster_name\": \"<string>\",\n \"namespace\": \"<string>\",\n \"node_selectors\": {},\n \"tolerations\": [\n {\n \"effect\": \"<string>\",\n \"key\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"dispersions\": {},\n \"early_termination\": {\n \"check_frequency_hz\": 123,\n \"conditions\": [\n {\n \"condition\": \"<string>\",\n \"description\": \"<string>\",\n \"variable\": \"<string>\"\n }\n ],\n \"enabled\": true\n },\n \"monte_carlo\": {\n \"runs\": 1,\n \"seed\": 1\n },\n \"simulation\": {\n \"duration_minutes\": 1,\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"telemetry\": {\n \"buffer_flush_interval_seconds\": 1,\n \"sampling_rate_hz\": 123,\n \"storage\": {\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\"\n },\n \"variables\": [\n \"<string>\"\n ]\n }\n },\n \"name\": \"<string>\",\n \"runs_override\": 1\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_jobs": 1,
"estimated_completion_time_mins": 1
}Body
application/json
⌘I
cURL
curl --request POST \
--url https://api.example.com/jobs \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"compute": {
"container": {
"cpu_request": "<string>",
"image": "<string>",
"memory_request": "<string>",
"cpu_limit": "<string>",
"environment": {},
"memory_limit": "<string>"
},
"job_timeout_seconds": 1,
"max_parallel_jobs": 1,
"baremetal": {
"max_parallel_processes": 1,
"ssh_hosts": [
{
"cores": 1,
"host": "<string>",
"ssh_key_path": "<string>",
"username": "<string>"
}
],
"working_directory": "<string>"
},
"kubernetes": {
"cluster_name": "<string>",
"namespace": "<string>",
"node_selectors": {},
"tolerations": [
{
"effect": "<string>",
"key": "<string>",
"operator": "<string>",
"value": "<string>"
}
]
}
},
"dispersions": {},
"early_termination": {
"check_frequency_hz": 123,
"conditions": [
{
"condition": "<string>",
"description": "<string>",
"variable": "<string>"
}
],
"enabled": true
},
"monte_carlo": {
"runs": 1,
"seed": 1
},
"simulation": {
"duration_minutes": 1,
"name": "<string>",
"version": "<string>"
},
"telemetry": {
"buffer_flush_interval_seconds": 1,
"sampling_rate_hz": 123,
"storage": {
"s3_bucket": "<string>",
"s3_prefix": "<string>"
},
"variables": [
"<string>"
]
}
},
"name": "<string>",
"runs_override": 1
}
'import requests
url = "https://api.example.com/jobs"
payload = {
"config": {
"compute": {
"container": {
"cpu_request": "<string>",
"image": "<string>",
"memory_request": "<string>",
"cpu_limit": "<string>",
"environment": {},
"memory_limit": "<string>"
},
"job_timeout_seconds": 1,
"max_parallel_jobs": 1,
"baremetal": {
"max_parallel_processes": 1,
"ssh_hosts": [
{
"cores": 1,
"host": "<string>",
"ssh_key_path": "<string>",
"username": "<string>"
}
],
"working_directory": "<string>"
},
"kubernetes": {
"cluster_name": "<string>",
"namespace": "<string>",
"node_selectors": {},
"tolerations": [
{
"effect": "<string>",
"key": "<string>",
"operator": "<string>",
"value": "<string>"
}
]
}
},
"dispersions": {},
"early_termination": {
"check_frequency_hz": 123,
"conditions": [
{
"condition": "<string>",
"description": "<string>",
"variable": "<string>"
}
],
"enabled": True
},
"monte_carlo": {
"runs": 1,
"seed": 1
},
"simulation": {
"duration_minutes": 1,
"name": "<string>",
"version": "<string>"
},
"telemetry": {
"buffer_flush_interval_seconds": 1,
"sampling_rate_hz": 123,
"storage": {
"s3_bucket": "<string>",
"s3_prefix": "<string>"
},
"variables": ["<string>"]
}
},
"name": "<string>",
"runs_override": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
compute: {
container: {
cpu_request: '<string>',
image: '<string>',
memory_request: '<string>',
cpu_limit: '<string>',
environment: {},
memory_limit: '<string>'
},
job_timeout_seconds: 1,
max_parallel_jobs: 1,
baremetal: {
max_parallel_processes: 1,
ssh_hosts: [{cores: 1, host: '<string>', ssh_key_path: '<string>', username: '<string>'}],
working_directory: '<string>'
},
kubernetes: {
cluster_name: '<string>',
namespace: '<string>',
node_selectors: {},
tolerations: [{effect: '<string>', key: '<string>', operator: '<string>', value: '<string>'}]
}
},
dispersions: {},
early_termination: {
check_frequency_hz: 123,
conditions: [{condition: '<string>', description: '<string>', variable: '<string>'}],
enabled: true
},
monte_carlo: {runs: 1, seed: 1},
simulation: {duration_minutes: 1, name: '<string>', version: '<string>'},
telemetry: {
buffer_flush_interval_seconds: 1,
sampling_rate_hz: 123,
storage: {s3_bucket: '<string>', s3_prefix: '<string>'},
variables: ['<string>']
}
},
name: '<string>',
runs_override: 1
})
};
fetch('https://api.example.com/jobs', 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://api.example.com/jobs",
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([
'config' => [
'compute' => [
'container' => [
'cpu_request' => '<string>',
'image' => '<string>',
'memory_request' => '<string>',
'cpu_limit' => '<string>',
'environment' => [
],
'memory_limit' => '<string>'
],
'job_timeout_seconds' => 1,
'max_parallel_jobs' => 1,
'baremetal' => [
'max_parallel_processes' => 1,
'ssh_hosts' => [
[
'cores' => 1,
'host' => '<string>',
'ssh_key_path' => '<string>',
'username' => '<string>'
]
],
'working_directory' => '<string>'
],
'kubernetes' => [
'cluster_name' => '<string>',
'namespace' => '<string>',
'node_selectors' => [
],
'tolerations' => [
[
'effect' => '<string>',
'key' => '<string>',
'operator' => '<string>',
'value' => '<string>'
]
]
]
],
'dispersions' => [
],
'early_termination' => [
'check_frequency_hz' => 123,
'conditions' => [
[
'condition' => '<string>',
'description' => '<string>',
'variable' => '<string>'
]
],
'enabled' => true
],
'monte_carlo' => [
'runs' => 1,
'seed' => 1
],
'simulation' => [
'duration_minutes' => 1,
'name' => '<string>',
'version' => '<string>'
],
'telemetry' => [
'buffer_flush_interval_seconds' => 1,
'sampling_rate_hz' => 123,
'storage' => [
's3_bucket' => '<string>',
's3_prefix' => '<string>'
],
'variables' => [
'<string>'
]
]
],
'name' => '<string>',
'runs_override' => 1
]),
CURLOPT_HTTPHEADER => [
"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.example.com/jobs"
payload := strings.NewReader("{\n \"config\": {\n \"compute\": {\n \"container\": {\n \"cpu_request\": \"<string>\",\n \"image\": \"<string>\",\n \"memory_request\": \"<string>\",\n \"cpu_limit\": \"<string>\",\n \"environment\": {},\n \"memory_limit\": \"<string>\"\n },\n \"job_timeout_seconds\": 1,\n \"max_parallel_jobs\": 1,\n \"baremetal\": {\n \"max_parallel_processes\": 1,\n \"ssh_hosts\": [\n {\n \"cores\": 1,\n \"host\": \"<string>\",\n \"ssh_key_path\": \"<string>\",\n \"username\": \"<string>\"\n }\n ],\n \"working_directory\": \"<string>\"\n },\n \"kubernetes\": {\n \"cluster_name\": \"<string>\",\n \"namespace\": \"<string>\",\n \"node_selectors\": {},\n \"tolerations\": [\n {\n \"effect\": \"<string>\",\n \"key\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"dispersions\": {},\n \"early_termination\": {\n \"check_frequency_hz\": 123,\n \"conditions\": [\n {\n \"condition\": \"<string>\",\n \"description\": \"<string>\",\n \"variable\": \"<string>\"\n }\n ],\n \"enabled\": true\n },\n \"monte_carlo\": {\n \"runs\": 1,\n \"seed\": 1\n },\n \"simulation\": {\n \"duration_minutes\": 1,\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"telemetry\": {\n \"buffer_flush_interval_seconds\": 1,\n \"sampling_rate_hz\": 123,\n \"storage\": {\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\"\n },\n \"variables\": [\n \"<string>\"\n ]\n }\n },\n \"name\": \"<string>\",\n \"runs_override\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/jobs")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"compute\": {\n \"container\": {\n \"cpu_request\": \"<string>\",\n \"image\": \"<string>\",\n \"memory_request\": \"<string>\",\n \"cpu_limit\": \"<string>\",\n \"environment\": {},\n \"memory_limit\": \"<string>\"\n },\n \"job_timeout_seconds\": 1,\n \"max_parallel_jobs\": 1,\n \"baremetal\": {\n \"max_parallel_processes\": 1,\n \"ssh_hosts\": [\n {\n \"cores\": 1,\n \"host\": \"<string>\",\n \"ssh_key_path\": \"<string>\",\n \"username\": \"<string>\"\n }\n ],\n \"working_directory\": \"<string>\"\n },\n \"kubernetes\": {\n \"cluster_name\": \"<string>\",\n \"namespace\": \"<string>\",\n \"node_selectors\": {},\n \"tolerations\": [\n {\n \"effect\": \"<string>\",\n \"key\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"dispersions\": {},\n \"early_termination\": {\n \"check_frequency_hz\": 123,\n \"conditions\": [\n {\n \"condition\": \"<string>\",\n \"description\": \"<string>\",\n \"variable\": \"<string>\"\n }\n ],\n \"enabled\": true\n },\n \"monte_carlo\": {\n \"runs\": 1,\n \"seed\": 1\n },\n \"simulation\": {\n \"duration_minutes\": 1,\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"telemetry\": {\n \"buffer_flush_interval_seconds\": 1,\n \"sampling_rate_hz\": 123,\n \"storage\": {\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\"\n },\n \"variables\": [\n \"<string>\"\n ]\n }\n },\n \"name\": \"<string>\",\n \"runs_override\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"compute\": {\n \"container\": {\n \"cpu_request\": \"<string>\",\n \"image\": \"<string>\",\n \"memory_request\": \"<string>\",\n \"cpu_limit\": \"<string>\",\n \"environment\": {},\n \"memory_limit\": \"<string>\"\n },\n \"job_timeout_seconds\": 1,\n \"max_parallel_jobs\": 1,\n \"baremetal\": {\n \"max_parallel_processes\": 1,\n \"ssh_hosts\": [\n {\n \"cores\": 1,\n \"host\": \"<string>\",\n \"ssh_key_path\": \"<string>\",\n \"username\": \"<string>\"\n }\n ],\n \"working_directory\": \"<string>\"\n },\n \"kubernetes\": {\n \"cluster_name\": \"<string>\",\n \"namespace\": \"<string>\",\n \"node_selectors\": {},\n \"tolerations\": [\n {\n \"effect\": \"<string>\",\n \"key\": \"<string>\",\n \"operator\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n },\n \"dispersions\": {},\n \"early_termination\": {\n \"check_frequency_hz\": 123,\n \"conditions\": [\n {\n \"condition\": \"<string>\",\n \"description\": \"<string>\",\n \"variable\": \"<string>\"\n }\n ],\n \"enabled\": true\n },\n \"monte_carlo\": {\n \"runs\": 1,\n \"seed\": 1\n },\n \"simulation\": {\n \"duration_minutes\": 1,\n \"name\": \"<string>\",\n \"version\": \"<string>\"\n },\n \"telemetry\": {\n \"buffer_flush_interval_seconds\": 1,\n \"sampling_rate_hz\": 123,\n \"storage\": {\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\"\n },\n \"variables\": [\n \"<string>\"\n ]\n }\n },\n \"name\": \"<string>\",\n \"runs_override\": 1\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_jobs": 1,
"estimated_completion_time_mins": 1
}