v1
Double column
API
CLI
JS Client

Services /

List service builds

Lists the builds for the service

Required permission

Project > Services > General > Read

Path parameters

    • projectId

      string required

      ID of the project

    • serviceId

      string required

      ID of the service

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.

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • builds

        [array] required

        An array of builds.

        • {object}
          • id

            string required

            ID of the build.

          • branch

            string

            Name of the branch the built commit belongs to.

          • pullRequestId

            number

            ID of the pull request the commit belongs to.

          • status

            string

            The status of the build.

            one of
            PENDING, STARTING, CLONING, BUILDING, UPLOADING, ABORTED, FAILURE, SUCCESS, CRASHED
          • sha

            string

            The sha of the built commit.

          • concluded

            boolean

            Whether the build has finished.

          • createdAt

            string

            Timestamp of the build initiation.

          • success

            boolean

            Whether the build was successful.

          • message

            string

            Description of the build status.

          • buildConcludedAt

            number

            Timestamp of the build concluding.

    • 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}/services/{serviceId}/build

Example response

200 OK

Returns a list of builds for the given service.

JSON

{
  "data": {
    "builds": [
      {
        "id": "joyous-view-6290",
        "branch": "main",
        "status": "SUCCESS",
        "sha": "12c15e7ee25fd78f567ebf87f9178b8ad70025b3",
        "concluded": true,
        "createdAt": "2021-07-28T15:55:38.296Z",
        "success": true,
        "message": "Image successfully built",
        "buildConcludedAt": 1606237973
      }
    ]
  },
  "pagination": {
    "hasNextPage": false,
    "count": 1
  }
}

© 2022 Northflank Ltd. All rights reserved.