Skip to main content
POST
/
v1
/
job-recipes
/
{uuid}
/
fork
Fork Job Recipe
curl --request POST \
  --url https://api.dispersed.com/v1/job-recipes/{uuid}/fork \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
import requests

url = "https://api.dispersed.com/v1/job-recipes/{uuid}/fork"

payload = {
"name": "<string>",
"description": "<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>', description: '<string>'})
};

fetch('https://api.dispersed.com/v1/job-recipes/{uuid}/fork', 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.dispersed.com/v1/job-recipes/{uuid}/fork",
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>',
'description' => '<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://api.dispersed.com/v1/job-recipes/{uuid}/fork"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\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.dispersed.com/v1/job-recipes/{uuid}/fork")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dispersed.com/v1/job-recipes/{uuid}/fork")

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 \"description\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "object": "job_recipe",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "description": "<string>",
  "payload": {
    "title": "<string>",
    "parameters": {
      "parameters": {
        "allowed_ips": [
          "<string>"
        ],
        "env": {},
        "host": "<string>",
        "image": "<string>",
        "imagesrc": "<string>",
        "ports": [
          123
        ],
        "secret": "<string>",
        "sshkey": "<string>",
        "tag": "<string>",
        "user": "<string>",
        "volumes": [
          {
            "image": "<string>",
            "mount": "<string>",
            "registry": "<string>",
            "secret": "<string>",
            "tag": "<string>",
            "user": "<string>"
          }
        ]
      },
      "type": "docker"
    },
    "min_vram_gb": 123,
    "min_ram_gb": 123,
    "min_storage_gb": 123,
    "cpu_count": 4,
    "gpu_count": 1,
    "description": "<string>",
    "max_timeout_assign_ms": 123,
    "max_timeout_run_ms": 123,
    "max_timeout_start_ms": 123,
    "gpu_name": "RTX 3090",
    "gpu_registry_uuid": "01234567-89ab-cdef-0123-456789abcdef",
    "image_size_bytes": 2147483648,
    "max_node_count": 123,
    "max_retry_count": 123,
    "allowed_region_codes": []
  },
  "is_official": true,
  "last_used_at": "2023-11-07T05:31:56Z",
  "uuid": "<string>",
  "quickstart_md": "<string>",
  "input_schema": [
    {
      "key": "<string>",
      "label": "<string>",
      "required": true,
      "description": "<string>",
      "placeholder": "<string>",
      "default_value": "<string>",
      "options": [
        {
          "label": "<string>",
          "value": "<string>"
        }
      ]
    }
  ],
  "thumbnail_url": "<string>",
  "is_owner": true,
  "forked_from_recipe_uuid": "<string>"
}
{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}
{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}

Path Parameters

uuid
string
required

Body

application/json
name
string
Required string length: 1 - 100
description
string
Maximum string length: 500

Response

Job recipe forked successfully

object
enum<string>
required
Available options:
job_recipe
created_at
string<date-time> | null
required
updated_at
string<date-time> | null
required
name
string
required
description
string | null
required
visibility
enum<string>
required
Available options:
ARCHIVED,
PRIVATE,
PUBLIC,
UNLISTED
payload
object
required
is_official
boolean
required
last_used_at
string<date-time> | null
required
uuid
string | null
quickstart_md
string | null
input_schema
object[] | null
thumbnail_url
string<uri> | null
is_owner
boolean
forked_from_recipe_uuid
string | null