List job containers | Jobs | Northflank API docs
v1
Double column
API
CLI
JS Client

Jobs /

List job containers

Gets a list of containers for the given job.

Required permission

Project > Jobs > Deployment > View Instance Logs

Path parameters

    • projectId

      string required

      ID of the project

    • jobId

      string required

      ID of the job

Query parameters

    • per_page

      integer

      The number of results to display per request. Maximum of 100 results per page.

    • page

      integer

      The page number to access.

    • cursor

      string

      The cursor returned from the previous page of results, used to request the next page.

    • runId

      string

      If provided, only returns containers for this specific job run.

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • containers

        [array]
        • {object}

          Data about a container.

          • name

            string required

            The name of the container.

          • createdAt

            integer required

            The timestamp the container was created.

            min
            1
          • status

            string required

            The current status of the container.

            one of
            TASK_RUNNING, TASK_STARTING, TASK_STAGING, TASK_KILLING, TASK_KILLED, TASK_FAILED, TASK_FINISHED
          • updatedAt

            integer required

            The timestamp the container was last updated.

            min
            1
      • runId

        string required

        The id of the associated job run.

    • pagination

      {object} required

      Data about the endpoint pagination.

      • hasNextPage

        boolean required

        Is there another page of results available?

      • cursor

        string

        The cursor to access the next page of results.

      • count

        number required

        The number of results returned by this request.

API
CLI
JS Client

GET /v1/projects/{projectId}/jobs/{jobId}/containers

Example response

200 OK

Details about the job's containers.

JSON

{
  "data": {
    "containers": [
      {
        "name": "example-service-78b4d4459d-sbtn8",
        "createdAt": 1611241087,
        "status": "TASK_RUNNING",
        "updatedAt": 1611241087
      }
    ],
    "runId": "00000676-9be8-41dd-b0f7-ba7df935cf27"
  },
  "pagination": {
    "hasNextPage": false,
    "count": 1
  }
}

© 2024 Northflank Ltd. All rights reserved.