Skip to main content
GET
/
{workspaceId}
/
projects
/
{projectName}
/
jobs
getJobs
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.all("my-project");

  console.log(result);
}

run();
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
    "project_id": "123e4567-e89b-12d3-a456-426614174000",
    "configuration": {
      "retry": {
        "maximumAttempts": 3
      },
      "maxConcurrentRequests": 13,
      "requestTimeout": 600
    },
    "payload": [
      {
        "parameters": {
          "param1": "value1",
          "param2": 42,
          "param3": true
        },
        "apiName": "<string>",
        "requestTimeout": 600,
        "retry": {
          "maximumAttempts": 3
        }
      }
    ],
    "created_at": "2024-01-01T00:00:00Z",
    "state": "ACTIVE",
    "sink": {
      "type": "webhook",
      "url": "https://example.com/webhook",
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer token"
      },
      "skipOnFail": false,
      "apisToSend": [
        "api1",
        "api2"
      ]
    },
    "schedule": {
      "jitter": 1,
      "intervals": [
        {
          "every": 1
        }
      ],
      "calendars": [
        {
          "second": 29,
          "minute": 29,
          "hour": 11,
          "dayOfWeek": "SUNDAY",
          "dayOfMonth": 16,
          "month": "JANUARY",
          "year": 5984,
          "comment": "<string>"
        }
      ]
    },
    "next_run_time": "2024-01-01T00:00:00Z",
    "last_run_time": "2024-01-01T00:00:00Z",
    "auth_session": {
      "id": "auth-session-123"
    },
    "proxy": {
      "version": "v1",
      "url": "<string>"
    },
    "reason": {
      "type": "paused",
      "message": "<string>",
      "details": "<unknown>",
      "timestamp": "2023-11-07T05:31:56Z"
    },
    "schedule_id": "job-run-schedule-123"
  }
]

Authorizations

x-api-key
string
header
required

API Key used to authenticate your requests. How to create one.

Path Parameters

workspaceId
string<uuid>
required

Your workspace ID. How to find it?

projectName
string
required

Your project name. It is the name you provide when creating a project.

Response

List of jobs in the project.

id
string
required

The ID of the job. Has to be a valid URL slug.

Minimum string length: 7
Example:

"123e4567-e89b-12d3-a456-426614174000"

workspace_id
string<uuid>
required

UUID of the workspace this job belongs to

Example:

"123e4567-e89b-12d3-a456-426614174000"

project_id
string<uuid>
required

UUID of the project this job belongs to

Example:

"123e4567-e89b-12d3-a456-426614174000"

configuration
object
required

Job configuration settings

payload
object[]
required

Array of API calls to be executed

created_at
string
required

Timestamp when the job was created

Example:

"2024-01-01T00:00:00Z"

state
enum<string>
required

Current state of the job

Available options:
ACTIVE,
PAUSED
sink
Webhook Sink Configuration · object

Optional sink configuration for the job. Can be a webhook or S3 Compatible sink.

schedule
object

Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time.

next_run_time
string | null

The timestamp of the next scheduled job run. null if the job does not have a schedule.

Example:

"2024-01-01T00:00:00Z"

last_run_time
string | null

Timestamp of the last completed run

Example:

"2024-01-01T00:00:00Z"

auth_session
object

Authentication session information for the job

Example:
{ "id": "auth-session-123" }
proxy
object

Proxy configuration for the job, stored as JSONB

reason
object

Reason for job state change, stored as JSONB

schedule_id
string | null

ID of the temporal schedule associated with this job

Example:

"job-run-schedule-123"