Jobs
Get Job Runs
Get all JobRuns for a Job.
GET
/
{workspaceId}
/
projects
/
{projectName}
/
jobs
/
{jobId}
/
runs
getJobRuns
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.runs.all(
{
projectName: "my-project",
jobId: "my-sample-job",
pageSize: "10",
pageNumber: "0",
sortBy: "start_time,desc/status,asc",
},
);
console.log(result);
}
run();from intuned_client import IntunedClient
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.jobs.runs.list(
project_name="my-project",
job_id="my-sample-job",
page_size="10",
page_number="0",
sort_by="start_time,desc/status,asc",
)
print(res)curl --request GET \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs', 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}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"jobRuns": [
{
"id": "jr_abc123def456ghi789xyz",
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-01T00:30:00Z",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"job_id": "job-123e4567-e89b-12d3",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"type": "SCHEDULED",
"status": "SUCCESS",
"payloads": 100,
"successful_runs": 95,
"failed_runs": 5,
"job_configuration_snapshot": {
"configuration": {
"retry": {
"maximumAttempts": 3
},
"maxConcurrentRequests": 13,
"requestTimeout": 600,
"maxRuns": 2,
"proxy": "http://username:password@proxy.example.com:8080"
},
"sink": {
"type": "webhook",
"url": "https://example.com/webhook",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token"
},
"skipOnFail": false,
"apisToSend": [
"api1",
"api2"
]
},
"auth_session": {
"id": "auth-session-123"
},
"proxy": {
"version": "v1",
"url": "<string>"
},
"notifications": [
{
"type": "webhook",
"url": "https://example.com/webhook",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token"
}
}
]
},
"error": {
"message": "An error occurred while executing the job",
"code": "internal-server-error",
"details": "<unknown>",
"correlationId": "123e4567-e89b-12d3-a456-426614174000",
"retirable": false,
"doc_url": "https://intunedhq.com/docs/main/support/errors"
},
"reason": {
"message": "<string>",
"details": "<unknown>",
"doc_url": "https://intunedhq.com/docs/main/support/reasons#no-valid-output-received"
}
}
],
"totalCount": 150
}{
"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.
Query Parameters
Number of items per page (defaults to 10)
Example:
"10"
Page number for pagination (defaults to 0)
Example:
"0"
Sorting parameter in format 'column,order/column2,order2'. Order can be 'asc' or 'desc'
Example:
"start_time,desc/status,asc"
⌘I
getJobRuns
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.runs.all(
{
projectName: "my-project",
jobId: "my-sample-job",
pageSize: "10",
pageNumber: "0",
sortBy: "start_time,desc/status,asc",
},
);
console.log(result);
}
run();from intuned_client import IntunedClient
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.jobs.runs.list(
project_name="my-project",
job_id="my-sample-job",
page_size="10",
page_number="0",
sort_by="start_time,desc/status,asc",
)
print(res)curl --request GET \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs', 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}/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/jobs/{jobId}/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"jobRuns": [
{
"id": "jr_abc123def456ghi789xyz",
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-01T00:30:00Z",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"job_id": "job-123e4567-e89b-12d3",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"type": "SCHEDULED",
"status": "SUCCESS",
"payloads": 100,
"successful_runs": 95,
"failed_runs": 5,
"job_configuration_snapshot": {
"configuration": {
"retry": {
"maximumAttempts": 3
},
"maxConcurrentRequests": 13,
"requestTimeout": 600,
"maxRuns": 2,
"proxy": "http://username:password@proxy.example.com:8080"
},
"sink": {
"type": "webhook",
"url": "https://example.com/webhook",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token"
},
"skipOnFail": false,
"apisToSend": [
"api1",
"api2"
]
},
"auth_session": {
"id": "auth-session-123"
},
"proxy": {
"version": "v1",
"url": "<string>"
},
"notifications": [
{
"type": "webhook",
"url": "https://example.com/webhook",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer token"
}
}
]
},
"error": {
"message": "An error occurred while executing the job",
"code": "internal-server-error",
"details": "<unknown>",
"correlationId": "123e4567-e89b-12d3-a456-426614174000",
"retirable": false,
"doc_url": "https://intunedhq.com/docs/main/support/errors"
},
"reason": {
"message": "<string>",
"details": "<unknown>",
"doc_url": "https://intunedhq.com/docs/main/support/reasons#no-valid-output-received"
}
}
],
"totalCount": 150
}{
"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>"
}