Harmont docs

Jobs

A job is the unit of execution within a build — one node in the build's DAG, corresponding to a single command step. Jobs carry their own state, step_key, command, exit_code, and depends_on edges.

These endpoints read a single job within a build and list a job's artifacts. Jobs are planned by the executor in topological order; you cannot create or cancel a job directly — operate on its Build instead.

List a build's jobs

GET
/api/v0/organizations/{org}/pipelines/{pipeline}/builds/{number}/jobs
AuthorizationBearer <token>

A Harmont session bearer token.

In: header

Path Parameters

org*string

The organization slug.

pipeline*string

The pipeline slug.

number*integer

The build number.

Response Body

application/json

application/json

curl -X GET "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds/0/jobs"
{
  "data": [
    {
      "command": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "depends_on": [
        "4fa62244-2190-4adc-9535-9ca1ad31cd77"
      ],
      "error_code": "string",
      "error_message": "string",
      "exit_code": 0,
      "finished_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "retry_policy": {},
      "soft_fail_policy": {},
      "soft_failed": true,
      "started_at": "2019-08-24T14:15:22Z",
      "state": "pending",
      "step_key": "string"
    }
  ]
}
{
  "error": {
    "code": "string",
    "doc_url": "string",
    "message": "string",
    "request_id": "string",
    "type": "string"
  }
}

Get a job

GET
/api/v0/organizations/{org}/pipelines/{pipeline}/builds/{number}/jobs/{job_id}
AuthorizationBearer <token>

A Harmont session bearer token.

In: header

Path Parameters

org*string

The organization slug.

pipeline*string

The pipeline slug.

number*integer

The build number.

job_id*string

The job id.

Response Body

application/json

application/json

curl -X GET "https://api.harmont.dev/api/v0/organizations/string/pipelines/string/builds/0/jobs/string"
{
  "command": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "depends_on": [
    "4fa62244-2190-4adc-9535-9ca1ad31cd77"
  ],
  "error_code": "string",
  "error_message": "string",
  "exit_code": 0,
  "finished_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "retry_policy": {},
  "soft_fail_policy": {},
  "soft_failed": true,
  "started_at": "2019-08-24T14:15:22Z",
  "state": "pending",
  "step_key": "string"
}
{
  "error": {
    "code": "string",
    "doc_url": "string",
    "message": "string",
    "request_id": "string",
    "type": "string"
  }
}