List preview environments | Pipelines | Northflank API docs
v1
Double column
API
CLI
JS Client

Pipelines /

List preview environments

Get a list of active preview environments for a template

Required permission

Account > Templates > General > Read

Path parameters

    • projectId

      string required

      ID of the project

    • pipelineId

      string required

      ID of the pipeline

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.

      • previewEnvironments

        [array] required

        A list of currently available preview environments for the template.

        • {object}
          • id

            string required

            Identifier for the preview template environment

          • vcsData

            {object} required

            Data about the version control action that triggered environment creation

            • repoUrl

              string required
          • createdAt

            string

            time of creation

          • updatedAt

            string

            time of update

    • 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}/pipelines/{pipelineId}/preview-envs/previews

Example response

200 OK

A list of preview environments for the template.

JSON

{
  "data": {
    "previewEnvironments": [
      {
        "id": "clean-step"
      }
    ]
  },
  "pagination": {
    "hasNextPage": false,
    "count": 1
  }
}

© 2024 Northflank Ltd. All rights reserved.