Jobs
Clone a job
Creates a copy of an existing job with a new name.
POST
/
v1
/
jobs
/
{jobID}
/
clone
Clone a job
curl --request POST \
--url https://api.strait.dev/v1/jobs/{jobID}/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>"
}
'import requests
url = "https://api.strait.dev/v1/jobs/{jobID}/clone"
payload = {
"name": "<string>",
"slug": "<string>"
}
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({name: '<string>', slug: '<string>'})
};
fetch('https://api.strait.dev/v1/jobs/{jobID}/clone', 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}/clone",
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>',
'slug' => '<string>'
]),
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}/clone"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\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}/clone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strait.dev/v1/jobs/{jobID}/clone")
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 \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"endpoint_url": "<string>",
"id": "<string>",
"max_attempts": 123,
"name": "<string>",
"paused": true,
"project_id": "<string>",
"slug": "<string>",
"timeout_secs": 123,
"updated_at": "2023-11-07T05:31:56Z",
"version": 123,
"$schema": "https://api.strait.dev/schemas/Job.json",
"allowed_tools": [
"<string>"
],
"backwards_compatible": true,
"batch_max_size": 123,
"batch_window_secs": 123,
"blocked_tools": [
"<string>"
],
"created_by": "<string>",
"cron": "<string>",
"cron_overlap_policy": "<string>",
"debounce_window_secs": 123,
"dedup_window_secs": 123,
"default_run_metadata": {},
"description": "<string>",
"dlq_alert_threshold": 123,
"environment_id": "<string>",
"execution_mode": "<string>",
"execution_window_cron": "<string>",
"fallback_endpoint_url": "<string>",
"group_id": "<string>",
"image_uri": "<string>",
"machine_preset": "<string>",
"max_concurrency": 123,
"max_concurrency_per_key": 123,
"max_iterations_per_run": 123,
"max_tokens_per_run": 123,
"max_tool_calls_per_run": 123,
"on_complete_payload_mapping": "<unknown>",
"on_complete_trigger_job": "<string>",
"on_complete_trigger_workflow": "<string>",
"on_failure_payload_mapping": "<unknown>",
"on_failure_trigger_job": "<string>",
"on_failure_trigger_workflow": "<string>",
"pause_reason": "<string>",
"paused_at": "2023-11-07T05:31:56Z",
"payload_schema": "<unknown>",
"poison_pill_threshold": 123,
"preferred_regions": [
"<string>"
],
"queue_depth_alert_threshold": 123,
"rate_limit_keys": [
{
"max": 123,
"name": "<string>",
"window_secs": 123
}
],
"rate_limit_max": 123,
"rate_limit_window_secs": 123,
"region": "<string>",
"result_schema": "<unknown>",
"retry_delays_secs": [
123
],
"retry_priority_boost": 123,
"retry_strategy": "<string>",
"run_ttl_secs": 123,
"tags": {},
"timezone": "<string>",
"updated_by": "<string>",
"version_id": "<string>",
"version_policy": "<string>",
"webhook_url": "<string>"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
API key passed as Bearer token
Path Parameters
Response
OK
A URL to the JSON Schema for this object.
Example:
"https://api.strait.dev/schemas/Job.json"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Clone a job
curl --request POST \
--url https://api.strait.dev/v1/jobs/{jobID}/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>"
}
'import requests
url = "https://api.strait.dev/v1/jobs/{jobID}/clone"
payload = {
"name": "<string>",
"slug": "<string>"
}
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({name: '<string>', slug: '<string>'})
};
fetch('https://api.strait.dev/v1/jobs/{jobID}/clone', 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}/clone",
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>',
'slug' => '<string>'
]),
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}/clone"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\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}/clone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strait.dev/v1/jobs/{jobID}/clone")
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 \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"endpoint_url": "<string>",
"id": "<string>",
"max_attempts": 123,
"name": "<string>",
"paused": true,
"project_id": "<string>",
"slug": "<string>",
"timeout_secs": 123,
"updated_at": "2023-11-07T05:31:56Z",
"version": 123,
"$schema": "https://api.strait.dev/schemas/Job.json",
"allowed_tools": [
"<string>"
],
"backwards_compatible": true,
"batch_max_size": 123,
"batch_window_secs": 123,
"blocked_tools": [
"<string>"
],
"created_by": "<string>",
"cron": "<string>",
"cron_overlap_policy": "<string>",
"debounce_window_secs": 123,
"dedup_window_secs": 123,
"default_run_metadata": {},
"description": "<string>",
"dlq_alert_threshold": 123,
"environment_id": "<string>",
"execution_mode": "<string>",
"execution_window_cron": "<string>",
"fallback_endpoint_url": "<string>",
"group_id": "<string>",
"image_uri": "<string>",
"machine_preset": "<string>",
"max_concurrency": 123,
"max_concurrency_per_key": 123,
"max_iterations_per_run": 123,
"max_tokens_per_run": 123,
"max_tool_calls_per_run": 123,
"on_complete_payload_mapping": "<unknown>",
"on_complete_trigger_job": "<string>",
"on_complete_trigger_workflow": "<string>",
"on_failure_payload_mapping": "<unknown>",
"on_failure_trigger_job": "<string>",
"on_failure_trigger_workflow": "<string>",
"pause_reason": "<string>",
"paused_at": "2023-11-07T05:31:56Z",
"payload_schema": "<unknown>",
"poison_pill_threshold": 123,
"preferred_regions": [
"<string>"
],
"queue_depth_alert_threshold": 123,
"rate_limit_keys": [
{
"max": 123,
"name": "<string>",
"window_secs": 123
}
],
"rate_limit_max": 123,
"rate_limit_window_secs": 123,
"region": "<string>",
"result_schema": "<unknown>",
"retry_delays_secs": [
123
],
"retry_priority_boost": 123,
"retry_strategy": "<string>",
"run_ttl_secs": 123,
"tags": {},
"timezone": "<string>",
"updated_by": "<string>",
"version_id": "<string>",
"version_policy": "<string>",
"webhook_url": "<string>"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"$schema": "https://api.strait.dev/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}