Get information and results for a specific JobRun.
import { IntunedClient } from "@intuned/client";
const intunedClient = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await intunedClient.project.jobs.runs.one("my-project", "my-sample-job", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
console.log(result);
}
run();{
"jobRun": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"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
},
"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>"
}
},
"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://docs.intunedhq.com/docs/support/errors"
},
"reason": {
"type": "terminated",
"message": "<string>",
"details": "<unknown>",
"doc_url": "https://docs.intunedhq.com/docs/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 intunedClient = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await intunedClient.project.jobs.runs.one("my-project", "my-sample-job", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
console.log(result);
}
run();{
"jobRun": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"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
},
"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>"
}
},
"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://docs.intunedhq.com/docs/support/errors"
},
"reason": {
"type": "terminated",
"message": "<string>",
"details": "<unknown>",
"doc_url": "https://docs.intunedhq.com/docs/support/reasons#no-valid-output-received"
}
},
"results": {
"signed_url": "<string>",
"format": "<string>",
"signed_url_expiration": "<string>",
"size": 123,
"key": "<string>"
}
}