v1
Double column
API
CLI
JS Client

Templates /

List template runs

Get a list of template runs

Required permission

Account > Templates > General > Read

Path parameters

    • templateId

      string required

      ID of the template

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.

      • templateRuns

        [array] required

        An array of template run objects.

        • {object}
          • id

            string required

            ID of the template run.

          • createdAt

            date required

            Timestamp of when the run was initiated.

          • updatedAt

            date required

            Timestamp of when the run was last updated.

          • template

            {object} required

            Details about the template being run.

            • id

              string required

              ID of the template

            • name

              string required

              The name of the template

          • content

            {object} required

            Details about the template run.

            • name

              string required

              Name of the template.

              min length
              3
              max length
              20
              pattern
              ^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$
            • description

              string

              Description of the template.

              max length
              200
              pattern
              ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$
            • apiVersion

              string required

              The version of the Northflank API to run the template against.

              one of
              v1
          • status

            string required

            Status of the template run.

            one of
            waiting, failure, retrying, success, unknown
    • 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/templates/{templateId}/runs

Example response

200 OK

A list of template runs.

JSON

{
  "data": {
    "templateRuns": [
      {
        "id": "501c1e03-a021-4659-9048-85f8f6ee2bc7",
        "createdAt": "2022-06-14 15:10:42.842Z",
        "updatedAt": "2022-06-14 15:10:42.842Z",
        "template": {
          "id": "example-template",
          "name": "Example Template"
        },
        "content": {
          "name": "Example Template",
          "description": "This is a sample template.",
          "apiVersion": "v1"
        },
        "status": "success"
      }
    ]
  },
  "pagination": {
    "hasNextPage": false,
    "count": 1
  }
}

© 2022 Northflank Ltd. All rights reserved.