Get information and results for a specific JobRun.
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.one(
"my-project",
"my-sample-job",
"jr_abc123def456ghi789xyz",
);
console.log(result);
}
run();{
"jobRun": {
"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"
}
},
"results": {
"signed_url": "<string>",
"format": "<string>",
"signed_url_expiration": "<string>",
"size": 123,
"key": "<string>"
}
}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.
The JobRun ID. Get this from the list JobRuns endpoint or from the trigger Job response.
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.one(
"my-project",
"my-sample-job",
"jr_abc123def456ghi789xyz",
);
console.log(result);
}
run();{
"jobRun": {
"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"
}
},
"results": {
"signed_url": "<string>",
"format": "<string>",
"signed_url_expiration": "<string>",
"size": 123,
"key": "<string>"
}
}