Skip to main content
PATCH
/
v1
/
jobs
/
{job_id}
Update Job
curl --request PATCH \
  --url https://sdk.nimbleway.com/v1/jobs/{job_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "<string>",
  "description": "<string>",
  "schedule": {
    "cron": "<string>",
    "enabled": true
  },
  "inputs": {
    "file_path": "<string>",
    "data": [
      {}
    ]
  },
  "destination": {
    "path": "<string>",
    "format": "parquet"
  }
}
'
import requests

url = "https://sdk.nimbleway.com/v1/jobs/{job_id}"

payload = {
"display_name": "<string>",
"description": "<string>",
"schedule": {
"cron": "<string>",
"enabled": True
},
"inputs": {
"file_path": "<string>",
"data": [{}]
},
"destination": {
"path": "<string>",
"format": "parquet"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
display_name: '<string>',
description: '<string>',
schedule: {cron: '<string>', enabled: true},
inputs: {file_path: '<string>', data: [{}]},
destination: {path: '<string>', format: 'parquet'}
})
};

fetch('https://sdk.nimbleway.com/v1/jobs/{job_id}', 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://sdk.nimbleway.com/v1/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'description' => '<string>',
'schedule' => [
'cron' => '<string>',
'enabled' => true
],
'inputs' => [
'file_path' => '<string>',
'data' => [
[

]
]
],
'destination' => [
'path' => '<string>',
'format' => 'parquet'
]
]),
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://sdk.nimbleway.com/v1/jobs/{job_id}"

payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true\n },\n \"inputs\": {\n \"file_path\": \"<string>\",\n \"data\": [\n {}\n ]\n },\n \"destination\": {\n \"path\": \"<string>\",\n \"format\": \"parquet\"\n }\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://sdk.nimbleway.com/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true\n },\n \"inputs\": {\n \"file_path\": \"<string>\",\n \"data\": [\n {}\n ]\n },\n \"destination\": {\n \"path\": \"<string>\",\n \"format\": \"parquet\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sdk.nimbleway.com/v1/jobs/{job_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"description\": \"<string>\",\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true\n },\n \"inputs\": {\n \"file_path\": \"<string>\",\n \"data\": [\n {}\n ]\n },\n \"destination\": {\n \"path\": \"<string>\",\n \"format\": \"parquet\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "name": "<string>",
  "display_name": "<string>",
  "agent_name": "<string>",
  "description": "<string>",
  "schedule": {
    "cron": "<string>",
    "enabled": true
  },
  "inputs": {
    "file_path": "<string>",
    "data": [
      {}
    ]
  },
  "destination": {
    "path": "<string>",
    "format": "parquet"
  },
  "last_run_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

job_id
string
required

Cookies

token
string | null

Body

application/json

Partial update for an existing job; omitted fields are left unchanged.

display_name
string | null

New display name.

description
string | null

New description.

schedule
JobSchedule · object | null

New cron schedule.

inputs
JobInputs · object | null

New input data configuration.

destination
JobDestination · object | null

New output destination.

Response

Successful Response

A configured job: an agent plus its schedule, inputs, and destination.

id
string
required

Unique job identifier (job_).

Pattern: ^job_[1-9][0-9]*$
name
string
required

Job name.

display_name
string | null

Human-friendly job name shown in the UI.

agent_name
string | null

Name of the agent this job runs.

description
string | null

Free-text description of the job.

schedule
JobSchedule · object | null

Cron schedule controlling automatic runs.

inputs
JobInputs · object | null

Input data configuration for the job.

destination
JobDestination · object | null

Where the job writes its results.

last_run_at
string<date-time> | null

Timestamp of the most recent run.

last_run_status
enum<string> | null

Status of the most recent run.

Available options:
PENDING,
RUNNING,
SUCCESS,
FAILED,
CANCELLED,
TIMEOUT,
WARNING
created_at
string<date-time> | null

When the job was created.

updated_at
string<date-time> | null

When the job was last updated.