Get template run | Templates | Northflank API docs
v1
Double column
API
CLI
JS Client

Templates /

Get template run

Get information about the given template run.

Required permission

Account > Templates > General > Read

Path parameters

    • templateId

      string required

      ID of the template

    • templateRunId

      string required

      ID of the template run

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • name

        string required

        Name of the template.

        min length
        3
        max length
        39
        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
      • project

        (multiple options: oneOf) required

        Details of the project the template will run in.

        • {object}

          Use an existing project

          • id

            string required

            The ID of the project to use.

            pattern
            ^[A-Za-z0-9-]+$

          OR

        • {object}

          Create a new project

          • spec

            (multiple options: oneOf) required
      • arguments

        {object}

        A set of arguments that can be referenced in a template using '${args.argumentName}'.

        • spec

          (multiple options: oneOf) required

          A node representing an action to be performed as part of the template.

        • refs

          {object}
          • id

            string required

            Identifier for the template run

          • templateId

            string required

            Identifier for the template

          • status

            string required

            Status of the template run

            one of
            pending, running, success, failure, aborted, aborting
          • concluded

            boolean required

            Whether the run has concluded (aborted, success, failed)

          • createdAt

            string required

            Timestamp the run was created at.

          • updatedAt

            string required

            Timestamp the run was last updated at.

      API
      CLI
      JS Client

      GET /v1/templates/{templateId}/runs/{templateRunId}

      Example response

      200 OK

      Details about the template run.

      JSON

      {
        "data": {
          "name": "Example Template",
          "description": "This is a sample template.",
          "apiVersion": "v1",
          "arguments": {
            "ARGUMENT_1": "value_1",
            "ARGUMENT_2": "value_2"
          },
          "spec": {
            "settings": {
              "maxAttempts": 3,
              "backoff": {
                "type": "fixed",
                "delay": 60
              }
            },
            "kind": "Workflow",
            "response": {
              "status": "success",
              "retries": {
                "attempts": 1,
                "maxAttempts": 3,
                "timestamp": 1657296265
              }
            }
          },
          "id": "3dd592f6-ce63-45ee-acf8-13dc5ec5235c",
          "templateId": "example-template",
          "status": "success",
          "concluded": true,
          "createdAt": "2021-01-01 12:00:00.000Z",
          "updatedAt": "2021-01-01 12:00:00.000Z"
        }
      }

      © 2024 Northflank Ltd. All rights reserved.