Update Job
Update a Job by ID.
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await client.projects.jobs.update(
"my-project",
"my-sample-job",
{
payload: [
{
parameters: {
"param1": "value1",
"param2": 42,
"param3": true
},
requestTimeout: 600,
retry: {
"maximumAttempts": 3
},
apiName: "value",
},
],
configuration: {
retry: {
"maximumAttempts": 3
},
maxConcurrentRequests: 1,
requestTimeout: 600,
maxRuns: 1,
proxy: "http://username:password@proxy.example.com:8080",
},
},
);
console.log(result);
}
run();from intuned_client import IntunedClient
from intuned_client import models
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.jobs.update(
project_name="my-project",
job_id="my-sample-job",
body=models.JobsUpdateRequestBody(
payload=[
{
"parameters": {
"param1": "value1",
"param2": 42,
"param3": True,
},
"apiName": "my-awesome-api",
"requestTimeout": 600,
},
],
configuration={
"retry": {
"maximumAttempts": 3,
},
"maxConcurrentRequests": 1,
},
schedule={
"jitter": 1,
"intervals": [
{
"every": 1,
},
],
},
sink={
"type": "webhook",
"url": "https://example.com/webhook",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token",
},
},
proxy="http://username:password@proxy.example.com:8080",
),
)
print(res)curl --request PUT \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"configuration": {
"retry": {
"maximumAttempts": 3
}
},
"payload": [
{
"apiName": "my-awesome-api",
"parameters": {
"param1": "value1",
"param2": 42,
"param3": true
}
}
]
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {retry: {maximumAttempts: 3}},
payload: [
{
apiName: 'my-awesome-api',
parameters: {param1: 'value1', param2: 42, param3: true}
}
]
})
};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}', 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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configuration' => [
'retry' => [
'maximumAttempts' => 3
]
],
'payload' => [
[
'apiName' => 'my-awesome-api',
'parameters' => [
'param1' => 'value1',
'param2' => 42,
'param3' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}"
payload := strings.NewReader("{\n \"configuration\": {\n \"retry\": {\n \"maximumAttempts\": 3\n }\n },\n \"payload\": [\n {\n \"apiName\": \"my-awesome-api\",\n \"parameters\": {\n \"param1\": \"value1\",\n \"param2\": 42,\n \"param3\": true\n }\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"retry\": {\n \"maximumAttempts\": 3\n }\n },\n \"payload\": [\n {\n \"apiName\": \"my-awesome-api\",\n \"parameters\": {\n \"param1\": \"value1\",\n \"param2\": 42,\n \"param3\": true\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"retry\": {\n \"maximumAttempts\": 3\n }\n },\n \"payload\": [\n {\n \"apiName\": \"my-awesome-api\",\n \"parameters\": {\n \"param1\": \"value1\",\n \"param2\": 42,\n \"param3\": true\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"message": "updated job successfully"
}{
"id": "<string>",
"message": "updated job successfully"
}{
"code": "bad-request",
"category": "user",
"message": "<string>",
"retirable": false,
"correlationId": "<string>",
"details": "<unknown>"
}{
"code": "unauthorized",
"category": "user",
"message": "<string>",
"retirable": false,
"correlationId": "<string>",
"details": "<unknown>"
}{
"code": "not-found",
"category": "user",
"message": "<string>",
"retirable": false,
"correlationId": "<string>",
"details": "<unknown>"
}Authorizations
API Key used to authenticate your requests. How to create one.
Path Parameters
Your workspace ID. How to find it?
The name you assigned when creating the Project.
The ID you assigned when creating the Job.
Body
Job update input schema
Input schema for updating an existing job
Array of API calls to be executed
Show child attributes
Show child attributes
Job configuration settings
Show child attributes
Show child attributes
Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time.
Show child attributes
Show child attributes
Optional sink configuration for the job. Can be a webhook or S3 Compatible sink.
- Webhook Sink Configuration
- S3 Sink Configuration
Show child attributes
Show child attributes
Proxy configuration for the job
"http://username:password@proxy.example.com:8080"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await client.projects.jobs.update(
"my-project",
"my-sample-job",
{
payload: [
{
parameters: {
"param1": "value1",
"param2": 42,
"param3": true
},
requestTimeout: 600,
retry: {
"maximumAttempts": 3
},
apiName: "value",
},
],
configuration: {
retry: {
"maximumAttempts": 3
},
maxConcurrentRequests: 1,
requestTimeout: 600,
maxRuns: 1,
proxy: "http://username:password@proxy.example.com:8080",
},
},
);
console.log(result);
}
run();from intuned_client import IntunedClient
from intuned_client import models
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.jobs.update(
project_name="my-project",
job_id="my-sample-job",
body=models.JobsUpdateRequestBody(
payload=[
{
"parameters": {
"param1": "value1",
"param2": 42,
"param3": True,
},
"apiName": "my-awesome-api",
"requestTimeout": 600,
},
],
configuration={
"retry": {
"maximumAttempts": 3,
},
"maxConcurrentRequests": 1,
},
schedule={
"jitter": 1,
"intervals": [
{
"every": 1,
},
],
},
sink={
"type": "webhook",
"url": "https://example.com/webhook",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token",
},
},
proxy="http://username:password@proxy.example.com:8080",
),
)
print(res)curl --request PUT \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"configuration": {
"retry": {
"maximumAttempts": 3
}
},
"payload": [
{
"apiName": "my-awesome-api",
"parameters": {
"param1": "value1",
"param2": 42,
"param3": true
}
}
]
}
'const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {retry: {maximumAttempts: 3}},
payload: [
{
apiName: 'my-awesome-api',
parameters: {param1: 'value1', param2: 42, param3: true}
}
]
})
};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}', 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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configuration' => [
'retry' => [
'maximumAttempts' => 3
]
],
'payload' => [
[
'apiName' => 'my-awesome-api',
'parameters' => [
'param1' => 'value1',
'param2' => 42,
'param3' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}"
payload := strings.NewReader("{\n \"configuration\": {\n \"retry\": {\n \"maximumAttempts\": 3\n }\n },\n \"payload\": [\n {\n \"apiName\": \"my-awesome-api\",\n \"parameters\": {\n \"param1\": \"value1\",\n \"param2\": 42,\n \"param3\": true\n }\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"retry\": {\n \"maximumAttempts\": 3\n }\n },\n \"payload\": [\n {\n \"apiName\": \"my-awesome-api\",\n \"parameters\": {\n \"param1\": \"value1\",\n \"param2\": 42,\n \"param3\": true\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"retry\": {\n \"maximumAttempts\": 3\n }\n },\n \"payload\": [\n {\n \"apiName\": \"my-awesome-api\",\n \"parameters\": {\n \"param1\": \"value1\",\n \"param2\": 42,\n \"param3\": true\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"message": "updated job successfully"
}{
"id": "<string>",
"message": "updated job successfully"
}{
"code": "bad-request",
"category": "user",
"message": "<string>",
"retirable": false,
"correlationId": "<string>",
"details": "<unknown>"
}{
"code": "unauthorized",
"category": "user",
"message": "<string>",
"retirable": false,
"correlationId": "<string>",
"details": "<unknown>"
}{
"code": "not-found",
"category": "user",
"message": "<string>",
"retirable": false,
"correlationId": "<string>",
"details": "<unknown>"
}