Pipelines /
Get preview template run
Required permission
Account > Templates > General > Read
Path parameters
projectId
string requiredID of the projectpipelineId
string requiredID of the pipelinetemplateRunId
string requiredID of the template run
Response body
- {object}Response object.
data
{object} requiredResult data.apiVersion
string requiredThe version of the Northflank API to run the template against.one ofv1.2options
{object}Options regarding how the template is run.concurrencyPolicy
stringDefines the concurrency behaviour of the template with respect to parallel runs.one ofallow, queue, forbidnameFormat
stringThe format of the automatically generated preview name. This is a parsed ref string.prefixName
booleanIf 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
integermin0max2400endTime
integermin0max2400tue
{object}startTime
integermin0max2400endTime
integermin0max2400wed
{object}startTime
integermin0max2400endTime
integermin0max2400thu
{object}startTime
integermin0max2400endTime
integermin0max2400fri
{object}startTime
integermin0max2400endTime
integermin0max2400sat
{object}startTime
integermin0max2400endTime
integermin0max2400sun
{object}startTime
integermin0max2400endTime
integermin0max2400expiry
{object}Settings regarding the automatic deletion of previews.previewLifetime
integerIf set, preview environments will be automatically deleted after this many minutes since their last update.min1resetOnUpdate
booleanIf `true`, the expiry time for an existing preview will be reset when it is ran again.arguments
{object}A set of arguments that can be referenced in a template using '${args.argumentName}'.triggers
[array]- {object}
ref
stringA reference that can be used to access the output of this trigger in the template.vcsService
string requiredThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.pattern^([A-Za-z0-9-]+\/[A-Za-z0-9-]+)|([0-9a-f]{24})$accountLogin
stringBy 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
stringrepoUrl
string requiredURL of the Git repo that will trigger the template.pattern^(https:\/\/)?((www(\.[a-zA-Z0-9\-]{2,})+\.)?[a-zA-Z0-9\-]{2,})(\.([a-zA-Z0-9\-]{2,}))+(\/([a-zA-Z0-9\-._]{2,}))+?$branchRestrictions
[array]- stringpattern^[a-zA-Z/*0-9%\-.#_!'();,&=+]*$
prRestrictions
[array]- stringpattern^[a-zA-Z/*0-9%\-.#_!'();,&=+]*$
pathIgnoreRules
[array]An array of path ignore rules. A commit will only be built if a file has been changed that does not match any of the ignore rules. Path ignore rules follow `.gitignore` syntax.- stringA path ignore rule, following `.gitignore` syntax. For example, `*.md` will ignore all files ending with `.md`.max length260
ciIgnoreFlags
[array]An array of commit ignore flags. If a commit message contains one or more of these flags, that commit will not be built. Defaults to `["[skip ci]", "[ci skip]", "[no ci]", "[skip nf]", "[nf skip]", "[northflank skip]", "[skip northflank]"]`- stringA commit ignore flag.max length72
ciIgnoreFlagsEnabled
booleanisAllowList
booleanignoreDrafts
booleanIf `true`, draft pull requests from this repo will not trigger the template.type
stringType of triggerone ofgitmanualOnly
booleanShould the git trigger only be triggered manually?gitops
{object}vcsService
string requiredThe VCS provider to use.one ofbitbucket, gitlab, github, self-hosted, azureselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.pattern^([A-Za-z0-9-]+\/[A-Za-z0-9-]+)|([0-9a-f]{24})$accountLogin
stringBy 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
stringLegacy key. Please used accountLogin instead.repoUrl
string requiredURL of the Git repo to sync the template 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 requiredThe name of the branch to use.filePath
string requiredThe file path to the template in the repository. If using an existing template, it should be in JSON format.pattern^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$$schema
stringspec
(multiple options: oneOf) requiredA node representing an action to be performed as part of the PreviewEnvTemplate.refs
{object}id
string requiredIdentifier for the template runtemplateId
string requiredIdentifier for the templatestatus
string requiredStatus of the template runone ofpending, running, success, failurecreatedAt
stringtime of creationupdatedAt
stringtime of update
GET /v1/projects/{projectId}/pipelines/{pipelineId}/preview-envs/runs/{templateRunId}
Example response
200 OK
JSON
{
"data": {
"apiVersion": "v1.2",
"options": {
"concurrencyPolicy": "allow"
},
"triggers": [
{
"vcsService": "github",
"accountLogin": "github-user",
"repoUrl": "https://github.com/northflank-examples/remix-postgres-redis-demo",
"pathIgnoreRules": [
"README.md"
],
"ciIgnoreFlags": [
"[skip ci]"
]
}
],
"gitops": {
"vcsService": "github",
"accountLogin": "github-user",
"repoUrl": "https://github.com/northflank-examples/remix-postgres-redis-demo",
"branch": "main"
},
"spec": {
"settings": {
"maxAttempts": 3,
"backoff": {
"type": "fixed",
"delay": 60
}
},
"kind": "Workflow",
"response": {
"status": "success",
"retries": {
"attempts": 1,
"maxAttempts": 3,
"timestamp": 1657296265
},
"startTime": 1657296265,
"endTime": 1657296265
}
},
"id": "3dd592f6-ce63-45ee-acf8-13dc5ec5235c",
"templateId": "example-template",
"status": "pending"
}
}