Skip to main content
GET
/
v1
/
jobs
/
{jobId}
Get a Job
curl --request GET \
  --url https://api.ctrlplane.dev/api/v1/jobs/{jobId}
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "successful",
  "externalId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "startedAt": "2023-11-07T05:31:56Z",
  "completedAt": "2023-11-07T05:31:56Z",
  "jobAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "jobAgentConfig": {},
  "message": "<string>",
  "reason": "<string>",
  "links": {},
  "metadata": {},
  "release": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "version": "<string>",
    "config": {},
    "jobAgentConfig": {},
    "deploymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "metadata": {}
  },
  "version": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "tag": "<string>",
    "config": {},
    "jobAgentConfig": {},
    "deploymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "metadata": {},
    "dependencies": [
      {
        "deploymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "versionSelector": {}
      }
    ],
    "status": "building"
  },
  "deployment": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "slug": "<string>",
    "description": "<string>",
    "systemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "jobAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "jobAgentConfig": {},
    "retryCount": 123,
    "timeout": 123
  },
  "runbook": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "systemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "jobAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "resource": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "version": "<string>",
    "kind": "<string>",
    "identifier": "<string>",
    "config": {},
    "metadata": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z",
    "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "providerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "variables": {},
    "relationships": {}
  },
  "environment": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "systemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "policyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "resourceSelector": {},
    "directory": "my/env/path",
    "createdAt": "2023-11-07T05:31:56Z",
    "metadata": {},
    "policy": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>",
      "priority": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "enabled": true,
      "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "targets": [
        {
          "deploymentSelector": {},
          "environmentSelector": {},
          "resourceSelector": {}
        }
      ],
      "denyWindows": [
        {
          "timeZone": "<string>",
          "rrule": {},
          "dtend": "2023-11-07T05:31:56Z"
        }
      ],
      "deploymentVersionSelector": {
        "name": "<string>",
        "deploymentVersionSelector": {},
        "description": "<string>"
      },
      "versionAnyApprovals": {
        "requiredApprovalsCount": 123
      },
      "versionUserApprovals": [
        {
          "userId": "<string>"
        }
      ],
      "versionRoleApprovals": [
        {
          "roleId": "<string>",
          "requiredApprovalsCount": 123
        }
      ],
      "concurrency": 2,
      "environmentVersionRollout": {
        "positionGrowthFactor": 123,
        "timeScaleInterval": 123,
        "rolloutType": "linear"
      },
      "maxRetries": 2
    }
  },
  "variables": {},
  "approval": {
    "id": "<string>",
    "status": "pending",
    "approver": {
      "id": "<string>",
      "name": "<string>"
    }
  }
}

Path Parameters

jobId
string
required

The job ID

Response

OK

id
string<uuid>
required
status
enum<string>
required
Available options:
successful,
cancelled,
skipped,
in_progress,
action_required,
pending,
failure,
invalid_job_agent,
invalid_integration,
external_run_not_found
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
jobAgentConfig
object
required

Configuration for the Job Agent

variables
object
required
externalId
string | null

External job identifier (e.g. GitHub workflow run ID)

startedAt
string<date-time> | null
completedAt
string<date-time> | null
jobAgentId
string<uuid>
message
string
reason
string
metadata
object
release
object
version
object
deployment
object
runbook
object
resource
object
environment
object
approval
object | null