Get all JobRuns for a Job.
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();{
"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,
"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",
"category": "billing",
"details": "<unknown>",
"correlationId": "123e4567-e89b-12d3-a456-426614174000",
"retirable": false,
"doc_url": "https://intunedhq.com/docs/main/support/errors"
},
"reason": {
"type": "terminated",
"message": "<string>",
"details": "<unknown>",
"doc_url": "https://intunedhq.com/docs/main/support/reasons#no-valid-output-received"
}
}
],
"totalCount": 150
}API Key used to authenticate your requests. How to create one.
Your workspace ID. How to find it?
The name you assigned when creating the Project.
The ID you assigned when creating the Job.
Number of items per page (defaults to 10)
"10"
Page number for pagination (defaults to 0)
"0"
Sorting parameter in format 'column,order/column2,order2'. Order can be 'asc' or 'desc'
"start_time,desc/status,asc"
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();{
"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,
"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",
"category": "billing",
"details": "<unknown>",
"correlationId": "123e4567-e89b-12d3-a456-426614174000",
"retirable": false,
"doc_url": "https://intunedhq.com/docs/main/support/errors"
},
"reason": {
"type": "terminated",
"message": "<string>",
"details": "<unknown>",
"doc_url": "https://intunedhq.com/docs/main/support/reasons#no-valid-output-received"
}
}
],
"totalCount": 150
}