v1
Double column
API
CLI
JS Client

Preview Blueprints /

Get preview blueprint

Gets details about a preview blueprint

Required permission

Project > PreviewBlueprints > General > Read

Path parameters

    • projectId

      string required
      ID of the project
    • previewBlueprintId

      string required
      ID of the preview blueprint

Response body

  • {object}
    Response object.
    • data

      {object} required
      Result data.
      • apiVersion

        string required
        The version of the Northflank API to run the template against.
        one of
        v1.2
      • arguments

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

          {object}
          • vcsService

            string required
            The VCS provider to use.
            one of
            bitbucket, gitlab, github, self-hosted, azure
          • selfHostedVcsId

            string
            If projectType is self-hosted, the ID of the self-hosted vcs to use.
            pattern
            ^([A-Za-z0-9-]+)|([0-9a-f]{24})$
          • accountLogin

            string
            By default, if you have multiple version control accounts of the same provider linked, Northflank will pick a linked account that has access to the repository. If `accountLogin` is provided, Northflank will instead use your linked account with that login name.
          • vcsLinkId

            string
            Legacy key. Please used accountLogin instead.
          • repoUrl

            string required
            URL of the Git repo to sync the file with.
            pattern
            ^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$
          • branch

            string required
            The name of the branch to use.
          • filePath

            string required
            The file path in the repository. If using an existing file, it should be in JSON format.
            pattern
            ^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$
        • $schema

          string
        • name

          string required
          min length
          3
          max length
          100
          pattern
          ^[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*$
        • description

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

          (multiple options: oneOf)
          A node representing an action to be performed as part of the PreviewEnvTemplate.
        • options

          {object}
          Options regarding how the template is run.
          • concurrencyPolicy

            string
            Defines the concurrency behaviour of the template with respect to parallel runs.
            one of
            allow, queue, forbid
          • nameFormat

            string
            The format of the automatically generated preview name. This is a parsed ref string.
          • prefixName

            boolean
            If true, the preview name will default to the front of the resource name.
          • schedule

            {object}
            Options regarding which hours preview environments should be active. Only available for BYOC projects.
            • mon

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
            • tue

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
            • wed

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
            • thu

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
            • fri

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
            • sat

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
            • sun

              {object}
              • startTime

                integer
                min
                0
                max
                2400
              • endTime

                integer
                min
                0
                max
                2400
          • expiry

            {object}
            Settings regarding the automatic deletion of previews.
            • previewLifetime

              integer
              If set, preview environments will be automatically deleted after this many minutes since their last update.
              min
              1
            • resetOnUpdate

              boolean
              If `true`, the expiry time for an existing preview will be reset when it is ran again.
          • autorun

            boolean
            If true, the template will run automatically whenever a change is made to it.
        • argumentOverrides

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

            [array]
            • (multiple options: anyOf)
              • {object}
                • kind

                  string required
                  one of
                  vcs-push
                • spec

                  {object} required
                • ref

                  string
                  A reference that can be used to access the output of this trigger in the template.
                • id

                  string

                OR

              • {object}
                • kind

                  string required
                  one of
                  vcs-pr
                • spec

                  {object} required
                • ref

                  string
                  A reference that can be used to access the output of this trigger in the template.
                • id

                  string

                OR

              • {object}
                • kind

                  string required
                  one of
                  webhook
                • spec

                  {object} required
                • ref

                  string
                  A reference that can be used to access the output of this trigger in the template.
                • id

                  string

                OR

              • {object}
                • kind

                  string required
                  one of
                  vcs-release
                • spec

                  {object} required
                • ref

                  string
                  A reference that can be used to access the output of this trigger in the template.
                • id

                  string

                OR

              • {object}
                • kind

                  string required
                  one of
                  vcs-pr-label
                • spec

                  {object} required
                • ref

                  string
                  A reference that can be used to access the output of this trigger in the template.
                • id

                  string
          • concurrencyPolicy

            string
            Defines the concurrency behaviour of the template with respect to parallel runs.
            one of
            allow, queue, forbid
          • status

            string required
            Status of the template run
            one of
            pending, running, success, failure, aborted, aborting, queued, unknown, skipped, waiting, retrying, async_wait, approval_wait
          • paused

            boolean required
            Whether triggers are paused for this preview blueprint. If `true`, Git triggers and webhook triggers will not run the preview blueprint.
          • createdAt

            string required
            Timestamp the template was created at.
          • updatedAt

            string required
            Timestamp the template was last updated at.
      API
      CLI
      JS Client

      GET /v1/projects/{projectId}/preview-blueprints/{previewBlueprintId}

      Example response

      200 OK

      Details about a previewBlueprint.

      JSON

      {
        "data": {
          "apiVersion": "v1.2",
          "gitops": {
            "vcsService": "github",
            "accountLogin": "github-user",
            "repoUrl": "https://github.com/northflank-examples/remix-postgres-redis-demo",
            "branch": "main"
          },
          "spec": {
            "kind": "Workflow",
            "spec": {
              "type": "sequential"
            }
          },
          "options": {
            "autorun": false
          },
          "triggers": [
            {
              "spec": {
                "vcs": {
                  "vcsService": "github",
                  "accountLogin": "github-user",
                  "repoUrl": "https://github.com/northflank-examples/remix-postgres-redis-demo"
                },
                "commitMessageFlags": {
                  "flags": [
                    "[skip ci]"
                  ]
                },
                "filePaths": {
                  "paths": [
                    "README.md"
                  ]
                }
              }
            }
          ],
          "concurrencyPolicy": "allow",
          "status": "success",
          "paused": false,
          "createdAt": "2021-01-01 12:00:00.000Z",
          "updatedAt": "2021-01-01 12:00:00.000Z"
        }
      }

      © 2026 Northflank Ltd. All rights reserved.