Jobs
Create Job
Create a new Job for a Project.
POST
/
{workspaceId}
/
projects
/
{projectName}
/
jobs
createJob
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.create(
"my-project",
{
id: "123e4567-e89b-12d3-a456-426614174000",
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.create(
project_name="my-project",
body=models.JobsCreateRequestBody(
id="123e4567-e89b-12d3-a456-426614174000",
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,
},
],
},
proxy="http://username:password@proxy.example.com:8080",
),
)
print(res)curl --request POST \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "my-awesome-job",
"configuration": {
"retry": {
"maximumAttempts": 3
}
},
"payload": [
{
"apiName": "my-awesome-api",
"parameters": {
"param1": "value1",
"param2": 42,
"param3": true
}
}
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'my-awesome-job',
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', 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",
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([
'id' => 'my-awesome-job',
'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"
payload := strings.NewReader("{\n \"id\": \"my-awesome-job\",\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("POST", 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.post("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"my-awesome-job\",\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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"my-awesome-job\",\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": "created"
}{
"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?
Body
application/json
Job creation input schema
⌘I
createJob
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.create(
"my-project",
{
id: "123e4567-e89b-12d3-a456-426614174000",
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.create(
project_name="my-project",
body=models.JobsCreateRequestBody(
id="123e4567-e89b-12d3-a456-426614174000",
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,
},
],
},
proxy="http://username:password@proxy.example.com:8080",
),
)
print(res)curl --request POST \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "my-awesome-job",
"configuration": {
"retry": {
"maximumAttempts": 3
}
},
"payload": [
{
"apiName": "my-awesome-api",
"parameters": {
"param1": "value1",
"param2": 42,
"param3": true
}
}
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'my-awesome-job',
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', 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",
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([
'id' => 'my-awesome-job',
'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"
payload := strings.NewReader("{\n \"id\": \"my-awesome-job\",\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("POST", 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.post("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"my-awesome-job\",\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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"my-awesome-job\",\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": "created"
}{
"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>"
}