Jobs
Bulk trigger a job
Triggers multiple executions of a job with different payloads.
POST
/
v1
/
jobs
/
{jobID}
/
trigger
/
bulk
Bulk trigger a job
curl --request POST \
--url https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"concurrency_key": "<string>",
"idempotency_key": "<string>",
"payload": "<unknown>",
"priority": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"tags": {},
"ttl_secs": 123
}
]
}
'import requests
url = "https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk"
payload = { "items": [
{
"concurrency_key": "<string>",
"idempotency_key": "<string>",
"payload": "<unknown>",
"priority": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"tags": {},
"ttl_secs": 123
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
concurrency_key: '<string>',
idempotency_key: '<string>',
payload: '<unknown>',
priority: 123,
scheduled_at: '2023-11-07T05:31:56Z',
tags: {},
ttl_secs: 123
}
]
})
};
fetch('https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk', 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.strait.dev/v1/jobs/{jobID}/trigger/bulk",
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([
'items' => [
[
'concurrency_key' => '<string>',
'idempotency_key' => '<string>',
'payload' => '<unknown>',
'priority' => 123,
'scheduled_at' => '2023-11-07T05:31:56Z',
'tags' => [
],
'ttl_secs' => 123
]
]
]),
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.strait.dev/v1/jobs/{jobID}/trigger/bulk"
payload := strings.NewReader("{\n \"items\": [\n {\n \"concurrency_key\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"payload\": \"<unknown>\",\n \"priority\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"tags\": {},\n \"ttl_secs\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"concurrency_key\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"payload\": \"<unknown>\",\n \"priority\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"tags\": {},\n \"ttl_secs\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"concurrency_key\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"payload\": \"<unknown>\",\n \"priority\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"tags\": {},\n \"ttl_secs\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "<string>",
"created": 123,
"results": [
{
"id": "<string>",
"idempotency_hit": true,
"run_token": "<string>",
"status": "<string>"
}
],
"total": 123,
"$schema": "<string>"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
API key passed as Bearer token
Path Parameters
Body
application/json
Show child attributes
Show child attributes
⌘I
Bulk trigger a job
curl --request POST \
--url https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"concurrency_key": "<string>",
"idempotency_key": "<string>",
"payload": "<unknown>",
"priority": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"tags": {},
"ttl_secs": 123
}
]
}
'import requests
url = "https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk"
payload = { "items": [
{
"concurrency_key": "<string>",
"idempotency_key": "<string>",
"payload": "<unknown>",
"priority": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"tags": {},
"ttl_secs": 123
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
concurrency_key: '<string>',
idempotency_key: '<string>',
payload: '<unknown>',
priority: 123,
scheduled_at: '2023-11-07T05:31:56Z',
tags: {},
ttl_secs: 123
}
]
})
};
fetch('https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk', 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.strait.dev/v1/jobs/{jobID}/trigger/bulk",
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([
'items' => [
[
'concurrency_key' => '<string>',
'idempotency_key' => '<string>',
'payload' => '<unknown>',
'priority' => 123,
'scheduled_at' => '2023-11-07T05:31:56Z',
'tags' => [
],
'ttl_secs' => 123
]
]
]),
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.strait.dev/v1/jobs/{jobID}/trigger/bulk"
payload := strings.NewReader("{\n \"items\": [\n {\n \"concurrency_key\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"payload\": \"<unknown>\",\n \"priority\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"tags\": {},\n \"ttl_secs\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"concurrency_key\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"payload\": \"<unknown>\",\n \"priority\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"tags\": {},\n \"ttl_secs\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strait.dev/v1/jobs/{jobID}/trigger/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"concurrency_key\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"payload\": \"<unknown>\",\n \"priority\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"tags\": {},\n \"ttl_secs\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "<string>",
"created": 123,
"results": [
{
"id": "<string>",
"idempotency_hit": true,
"run_token": "<string>",
"status": "<string>"
}
],
"total": 123,
"$schema": "<string>"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}