Register Template
curl --request POST \
--url https://{host}/api/extensions/v1/job-templates \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"caption": "<string>",
"description": "<string>",
"version": "<string>",
"wizard_template": {
"steps": [
{
"title": "<string>",
"name": "<string>",
"format": "predefined",
"attributes": {}
}
]
},
"job_configuration": {
"template_name": "<string>",
"tasks": [
{
"task_id": "<string>",
"instance_name": "<string>",
"inputs": "<unknown>"
}
],
"name": "<string>",
"template_id": "<string>",
"simulation_controller_settings": {
"files_to_use": [],
"files_to_retrieve": {}
},
"files": {},
"parameters": {}
},
"required_solver_capabilities": [
"<string>"
]
}
'import requests
url = "https://{host}/api/extensions/v1/job-templates"
payload = {
"name": "<string>",
"caption": "<string>",
"description": "<string>",
"version": "<string>",
"wizard_template": { "steps": [
{
"title": "<string>",
"name": "<string>",
"format": "predefined",
"attributes": {}
}
] },
"job_configuration": {
"template_name": "<string>",
"tasks": [
{
"task_id": "<string>",
"instance_name": "<string>",
"inputs": "<unknown>"
}
],
"name": "<string>",
"template_id": "<string>",
"simulation_controller_settings": {
"files_to_use": [],
"files_to_retrieve": {}
},
"files": {},
"parameters": {}
},
"required_solver_capabilities": ["<string>"]
}
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({
name: '<string>',
caption: '<string>',
description: '<string>',
version: '<string>',
wizard_template: {
steps: [{title: '<string>', name: '<string>', format: 'predefined', attributes: {}}]
},
job_configuration: {
template_name: '<string>',
tasks: [{task_id: '<string>', instance_name: '<string>', inputs: '<unknown>'}],
name: '<string>',
template_id: '<string>',
simulation_controller_settings: {files_to_use: [], files_to_retrieve: {}},
files: {},
parameters: {}
},
required_solver_capabilities: ['<string>']
})
};
fetch('https://{host}/api/extensions/v1/job-templates', 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/extensions/v1/job-templates",
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([
'name' => '<string>',
'caption' => '<string>',
'description' => '<string>',
'version' => '<string>',
'wizard_template' => [
'steps' => [
[
'title' => '<string>',
'name' => '<string>',
'format' => 'predefined',
'attributes' => [
]
]
]
],
'job_configuration' => [
'template_name' => '<string>',
'tasks' => [
[
'task_id' => '<string>',
'instance_name' => '<string>',
'inputs' => '<unknown>'
]
],
'name' => '<string>',
'template_id' => '<string>',
'simulation_controller_settings' => [
'files_to_use' => [
],
'files_to_retrieve' => [
]
],
'files' => [
],
'parameters' => [
]
],
'required_solver_capabilities' => [
'<string>'
]
]),
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://{host}/api/extensions/v1/job-templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\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://{host}/api/extensions/v1/job-templates")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/extensions/v1/job-templates")
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 \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/extensions/v1/job-templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\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/extensions/v1/job-templates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);{
"name": "<string>",
"caption": "<string>",
"description": "<string>",
"version": "<string>",
"wizard_template": {
"steps": [
{
"title": "<string>",
"name": "<string>",
"format": "predefined",
"attributes": {}
}
]
},
"job_configuration": {
"template_name": "<string>",
"tasks": [
{
"task_id": "<string>",
"instance_name": "<string>",
"inputs": "<unknown>"
}
],
"name": "<string>",
"template_id": "<string>",
"simulation_controller_settings": {
"files_to_use": [],
"files_to_retrieve": {}
},
"files": {},
"parameters": {}
},
"required_solver_capabilities": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Register Template
Register a new template.
:param template: The template to register
POST
/
job-templates
Register Template
curl --request POST \
--url https://{host}/api/extensions/v1/job-templates \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"caption": "<string>",
"description": "<string>",
"version": "<string>",
"wizard_template": {
"steps": [
{
"title": "<string>",
"name": "<string>",
"format": "predefined",
"attributes": {}
}
]
},
"job_configuration": {
"template_name": "<string>",
"tasks": [
{
"task_id": "<string>",
"instance_name": "<string>",
"inputs": "<unknown>"
}
],
"name": "<string>",
"template_id": "<string>",
"simulation_controller_settings": {
"files_to_use": [],
"files_to_retrieve": {}
},
"files": {},
"parameters": {}
},
"required_solver_capabilities": [
"<string>"
]
}
'import requests
url = "https://{host}/api/extensions/v1/job-templates"
payload = {
"name": "<string>",
"caption": "<string>",
"description": "<string>",
"version": "<string>",
"wizard_template": { "steps": [
{
"title": "<string>",
"name": "<string>",
"format": "predefined",
"attributes": {}
}
] },
"job_configuration": {
"template_name": "<string>",
"tasks": [
{
"task_id": "<string>",
"instance_name": "<string>",
"inputs": "<unknown>"
}
],
"name": "<string>",
"template_id": "<string>",
"simulation_controller_settings": {
"files_to_use": [],
"files_to_retrieve": {}
},
"files": {},
"parameters": {}
},
"required_solver_capabilities": ["<string>"]
}
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({
name: '<string>',
caption: '<string>',
description: '<string>',
version: '<string>',
wizard_template: {
steps: [{title: '<string>', name: '<string>', format: 'predefined', attributes: {}}]
},
job_configuration: {
template_name: '<string>',
tasks: [{task_id: '<string>', instance_name: '<string>', inputs: '<unknown>'}],
name: '<string>',
template_id: '<string>',
simulation_controller_settings: {files_to_use: [], files_to_retrieve: {}},
files: {},
parameters: {}
},
required_solver_capabilities: ['<string>']
})
};
fetch('https://{host}/api/extensions/v1/job-templates', 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/extensions/v1/job-templates",
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([
'name' => '<string>',
'caption' => '<string>',
'description' => '<string>',
'version' => '<string>',
'wizard_template' => [
'steps' => [
[
'title' => '<string>',
'name' => '<string>',
'format' => 'predefined',
'attributes' => [
]
]
]
],
'job_configuration' => [
'template_name' => '<string>',
'tasks' => [
[
'task_id' => '<string>',
'instance_name' => '<string>',
'inputs' => '<unknown>'
]
],
'name' => '<string>',
'template_id' => '<string>',
'simulation_controller_settings' => [
'files_to_use' => [
],
'files_to_retrieve' => [
]
],
'files' => [
],
'parameters' => [
]
],
'required_solver_capabilities' => [
'<string>'
]
]),
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://{host}/api/extensions/v1/job-templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\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://{host}/api/extensions/v1/job-templates")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/extensions/v1/job-templates")
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 \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://{host}/api/extensions/v1/job-templates");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\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/extensions/v1/job-templates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"<string>\",\n \"caption\": \"<string>\",\n \"description\": \"<string>\",\n \"version\": \"<string>\",\n \"wizard_template\": {\n \"steps\": [\n {\n \"title\": \"<string>\",\n \"name\": \"<string>\",\n \"format\": \"predefined\",\n \"attributes\": {}\n }\n ]\n },\n \"job_configuration\": {\n \"template_name\": \"<string>\",\n \"tasks\": [\n {\n \"task_id\": \"<string>\",\n \"instance_name\": \"<string>\",\n \"inputs\": \"<unknown>\"\n }\n ],\n \"name\": \"<string>\",\n \"template_id\": \"<string>\",\n \"simulation_controller_settings\": {\n \"files_to_use\": [],\n \"files_to_retrieve\": {}\n },\n \"files\": {},\n \"parameters\": {}\n },\n \"required_solver_capabilities\": [\n \"<string>\"\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);{
"name": "<string>",
"caption": "<string>",
"description": "<string>",
"version": "<string>",
"wizard_template": {
"steps": [
{
"title": "<string>",
"name": "<string>",
"format": "predefined",
"attributes": {}
}
]
},
"job_configuration": {
"template_name": "<string>",
"tasks": [
{
"task_id": "<string>",
"instance_name": "<string>",
"inputs": "<unknown>"
}
],
"name": "<string>",
"template_id": "<string>",
"simulation_controller_settings": {
"files_to_use": [],
"files_to_retrieve": {}
},
"files": {},
"parameters": {}
},
"required_solver_capabilities": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Job template.
Response
Successful Response
Job template.
Was this page helpful?