Skip to main content

api.ListJobsResponse

items object[]

The actual items

  • Array [
  • idstring

    ID is a unique identifier assigned to this job. It helps to distinguish jobs with the same name after they have been deleted and re-created. The ID is generated by the server and should not be set directly by the client.

    spec object

    Spec contains all user-provided fields (desired state)

    config object

    Config contains type-specific configuration for the workload. The structure depends on the job type (e.g., pipeline config, query parameters).

    property name*any

    Config contains type-specific configuration for the workload. The structure depends on the job type (e.g., pipeline config, query parameters).

    deployment object

    Deployment defines how to deploy the job

    auto_promoteboolean

    Auto-promote canary deployments

    canary_countinteger

    Canary-specific settings

    canary_percentinteger

    Percentage of canary nodes

    health_check object

    HealthCheck defines health check configuration (required for rolling/canary, ignored for immediate)

    deadlinestring

    Deadline is the maximum time to wait for an execution to become healthy (required) Example: "5m", "30s"

    max_error_ratenumber

    MaxErrorRate is the maximum error rate allowed during health checks (optional, default: 0.10) Example: 0.10 = 10% error rate

    min_healthy_timestring

    MinHealthyTime is the minimum continuous healthy duration required (optional, default: "30s") Example: "30s", "1m"

    max_failed_nodesinteger

    MaxFailedNodes is the maximum number of failed nodes before stopping (optional, default: 10)

    max_failed_nodes_percentnumber

    MaxFailedNodesPercent is the maximum percentage of failed nodes before stopping (optional, default: 10.0)

    max_parallelinteger

    MaxParallel is the maximum number of nodes to update in parallel (0 = all at once)

    no_auto_rollbackboolean

    NoAutoRollback disables automatic rollback on deployment failure (default: false = auto-rollback enabled)

    strategytypes.DeploymentStrategyType (string)

    Strategy: immediate|rolling|canary

    Possible values: [immediate, rolling, canary]

    descriptionstring

    Description is an optional human-readable description of the job.

    labels object

    Labels is used to associate arbitrary labels with this job. Labels can be used for filtering and selection.

    property name*string
    meta object

    Meta is used to associate arbitrary metadata with this job. Keys with the prefix "expanso.io/" are reserved for system use.

    property name*string
    namestring

    Name is the logical name of the job used to refer to it. Submitting a job with the same name as an existing job will result in an update to the existing job.

    namespacestring

    Namespace is the namespace this job is running in.

    priorityinteger

    Priority defines the scheduling priority of this job. Higher values indicate higher priority.

    selector object

    Selector defines which nodes to run the job on

    match_expressionsstring[]

    MatchExpressions selects nodes using label selector expression strings. Each expression is evaluated independently and all must match (AND logic). Supported syntax:

    • Equality: "key=value" or "key==value"
    • Inequality: "key!=value"
    • Set inclusion: "key in (value1,value2,...)"
    • Set exclusion: "key notin (value1,value2,...)"
    • Existence: "key"
    • Non-existence: "!key" Examples:
    • "region=us-east"
    • "tier in (premium,standard)"
    • "environment!=prod"
    • "gpu"
    • "!debug"
    match_idsstring[]

    MatchIDs selects specific nodes by their IDs. If specified, the job will only run on nodes whose ID is in this list.

    match_labels object

    MatchLabels selects nodes with labels that exactly match all specified key-value pairs. All labels must match (AND logic). Example: {"region": "us-east", "tier": "compute"}

    property name*string
    timeouts object

    Timeouts defines timeout configurations for the job

    execution_timeoutinteger

    ExecutionTimeout is the maximum amount of time a task is allowed to run in seconds. Zero means no timeout, such as for a daemon task.

    queue_timeoutinteger

    QueueTimeout is the maximum amount of time a task is allowed to wait in the orchestrator queue in seconds before being scheduled. Zero means no timeout.

    total_timeoutinteger

    TotalTimeout is the maximum amount of time a task is allowed to complete in seconds. This includes the time spent in the queue, the time spent executing and the time spent retrying. Zero means no timeout.

    typestring

    Type specifies what kind of workload this job runs (e.g. "pipeline", "query", "update", "config"). The scheduling behavior is derived from this type.

    status object

    Status contains all system-managed fields (observed state)

    created_atstring

    CreatedAt is the time when the job was created

    deployment_idstring

    DeploymentID is the ID of the active deployment for this job. Empty if there is no active deployment.

    revisioninteger

    Revision is a per-job monotonically increasing revision number that is incremented on each update to the job's state or specification. This includes both user-initiated changes (which also increment Version) and system-initiated changes (status updates, state transitions, etc.). Revision >= Version always.

    state object

    State represents the current state of the job

    details object

    Details is a map of additional details about the state.

    property name*string
    messagestring

    Message is a human readable message describing the state.

    state_typetypes.JobStateType (string)

    StateType is the current state of the object.

    Possible values: [``, pending, queued, running, completed, failed, stopped, deleted]

    updated_atstring

    UpdatedAt is the time when the job was last updated

    versioninteger

    Version is a per-job monotonically increasing version number that is incremented on each job specification update. Version tracks changes to the job specification (user-defined fields like runtime, deployment settings, etc.). Compare with Revision which tracks ANY change including status updates.

  • ]
  • next_tokenstring

    Token for next page

    api.ListJobsResponse
    {
    "items": [
    {
    "id": "job-abc123xyz",
    "spec": {
    "config": {
    "input": {
    "file": {
    "paths": [
    "/var/log/app/*.log"
    ]
    }
    },
    "output": {
    "stdout": {}
    },
    "pipeline": {
    "processors": [
    {
    "mapping": "root = this\nroot.processed_at = now()\n"
    }
    ]
    }
    },
    "description": "Processes application logs from edge nodes",
    "labels": {
    "env": "production",
    "region": "us-west"
    },
    "name": "log-processor",
    "namespace": "production",
    "priority": 50,
    "selector": {
    "match_labels": {
    "env": "production"
    }
    },
    "type": "pipeline"
    },
    "status": {
    "created_at": "2025-01-15T10:30:00Z",
    "revision": 3,
    "state": {
    "message": "Job running on 5 nodes",
    "state_type": "running"
    },
    "updated_at": "2025-01-15T10:35:00Z",
    "version": 1
    }
    }
    ],
    "next_token": "string"
    }