curl --request POST \
--url http://localhost:9371/processes \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"ref": "<string>",
"timeoutMs": 1,
"envConfig": {},
"autorun": true
}
'import requests
url = "http://localhost:9371/processes"
payload = {
"code": "<string>",
"ref": "<string>",
"timeoutMs": 1,
"envConfig": {},
"autorun": True
}
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({code: '<string>', ref: '<string>', timeoutMs: 1, envConfig: {}, autorun: true})
};
fetch('http://localhost:9371/processes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9371",
CURLOPT_URL => "http://localhost:9371/processes",
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([
'code' => '<string>',
'ref' => '<string>',
'timeoutMs' => 1,
'envConfig' => [
],
'autorun' => true
]),
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 := "http://localhost:9371/processes"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"ref\": \"<string>\",\n \"timeoutMs\": 1,\n \"envConfig\": {},\n \"autorun\": true\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("http://localhost:9371/processes")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"ref\": \"<string>\",\n \"timeoutMs\": 1,\n \"envConfig\": {},\n \"autorun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9371/processes")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"ref\": \"<string>\",\n \"timeoutMs\": 1,\n \"envConfig\": {},\n \"autorun\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 1
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "rate_limit_exceeded",
"message": "<string>",
"retryAfter": 1
}{
"error": "<string>",
"code": "<string>"
}Create a process
Creates a new process with the supplied source code and optional execution options. If autorun is true (the default), the process begins execution immediately.
curl --request POST \
--url http://localhost:9371/processes \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"ref": "<string>",
"timeoutMs": 1,
"envConfig": {},
"autorun": true
}
'import requests
url = "http://localhost:9371/processes"
payload = {
"code": "<string>",
"ref": "<string>",
"timeoutMs": 1,
"envConfig": {},
"autorun": True
}
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({code: '<string>', ref: '<string>', timeoutMs: 1, envConfig: {}, autorun: true})
};
fetch('http://localhost:9371/processes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9371",
CURLOPT_URL => "http://localhost:9371/processes",
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([
'code' => '<string>',
'ref' => '<string>',
'timeoutMs' => 1,
'envConfig' => [
],
'autorun' => true
]),
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 := "http://localhost:9371/processes"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"ref\": \"<string>\",\n \"timeoutMs\": 1,\n \"envConfig\": {},\n \"autorun\": true\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("http://localhost:9371/processes")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"ref\": \"<string>\",\n \"timeoutMs\": 1,\n \"envConfig\": {},\n \"autorun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:9371/processes")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"ref\": \"<string>\",\n \"timeoutMs\": 1,\n \"envConfig\": {},\n \"autorun\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 1
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "rate_limit_exceeded",
"message": "<string>",
"retryAfter": 1
}{
"error": "<string>",
"code": "<string>"
}Body
Request body used to create a new process.
Executable source code to stage and run in the active environment (max 100 KB).
102400Optional reference label used for filtering and correlation.
1API-level execution timeout in milliseconds. null disables enforcement; undefined uses the default.
x > 0Opaque per-execution environment configuration passed through to the environment module.
Show child attributes
Show child attributes
Whether to start execution immediately. When false, the process is created in idle state and must be started via the run signal.
Response
Process created.
Response returned after a process is created.
Stable process identifier assigned to the newly created process.
x > 0Was this page helpful?