Get information and results for a specific job run.
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?
Your project name. It is the name you provide when creating a project.
Your job ID. It is the ID of the job you provide when creating it.
The job run ID. This can be obtained from the get job runs endpoint or from the result of the trigger endpoint for a job.
Job run information and results
Show child attributes
Unique identifier for the job run
"123e4567-e89b-12d3-a456-426614174000"
Timestamp when the job run started
"2024-01-01T00:00:00Z"
Timestamp when the job run ended (null if still running)
"2024-01-01T00:30:00Z"
UUID of the workspace this job run belongs to
"123e4567-e89b-12d3-a456-426614174000"
UUID of the project this job run belongs to
"123e4567-e89b-12d3-a456-426614174000"
ID of the job this run belongs to
"job-123e4567-e89b-12d3"
Timestamp when the job run was created
"2024-01-01T00:00:00Z"
Timestamp when the job run was last updated
"2024-01-01T00:00:00Z"
Type of the job run
MANUAL, SCHEDULED "SCHEDULED"
Current status of the job run
CANCELED, PENDING, PAUSED, PAUSING, RESUMING, SUCCESS, FAILURE, TERMINATED, COMPLETED "SUCCESS"
Total number of payloads in the job run
100
Number of successful API calls in the job run
95
Number of failed API calls in the job run
5
Snapshot of job configuration at the time of the job run
Show child attributes
Job configuration settings
Show child attributes
The retry policy of the job. Configure how many retries and the delay between them for each payload.
Show child attributes
Maximum number of attempts to retry the run in case of failure
x >= 13
{ "maximumAttempts": 3 }The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time.
1 <= x <= 25Timeout for the API request in seconds. Default is 10 minutes (600 seconds).
600
Optional sink configuration for the job. Can be a webhook or S3 Compatible sink.
Show child attributes
webhook The URL to which the webhook will send the data.
"https://example.com/webhook"
If true, the webhook will not be sent if the API execution fails.
List of API names to be sent to the webhook. If not provided, all APIs will be sent.
1["api1", "api2"]Authentication session information for the job
Show child attributes
Number of attempts to check the validity of the auth session before recreating it.
3
Number of attempts to create a new auth session if the current one is invalid or expired.
3
{ "id": "auth-session-123" }Error information if the job run failed, stored as JSONB
Show child attributes
Error message describing the failure
"An error occurred while executing the job"
Optional error code for more specific error identification
internal-server-error, insufficient-resource-credits "internal-server-error"
billing, infrastructure Optional correlation ID for tracking the error
"123e4567-e89b-12d3-a456-426614174000"
Optional documentation URL for more information
"https://docs.intunedhq.com/docs/support/errors"
Reason for job run state change, stored as JSONB
Show child attributes
terminated, user-request, auth-session-not-found, auth-session-invalid-mid-job, auth-session-validate-dependency-failed, auth-session-locked, another-job-run-active, insufficient-resource-credits, s3-sink-error Optional documentation URL for more information
"https://docs.intunedhq.com/docs/support/reasons#no-valid-output-received"
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>"
}
}