Pipelines /
Get preview template run
Required permission
Account > Templates > General > Read
Path parameters
projectId
string requiredID of the project
pipelineId
string requiredID of the pipeline
templateRunId
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 ofv1arguments
{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-hostedselfHostedVcsId
stringIf projectType is self-hosted, the ID of the self-hosted vcs to use.
pattern^[A-Za-z0-9-]+\/[A-Za-z0-9-]+$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.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,}))+?$branchRestrictions
[array]- stringpattern^[a-zA-Z/*0-9%\-.#_!'();,&=+]*$
prRestrictions
[array]- stringpattern^[a-zA-Z/*0-9%\-.#_!'();,&=+]*$
pathIgnoreRules
[array]- stringmax length260
ciIgnoreFlags
[array]- stringmax length72
ciIgnoreFlagsEnabled
booleanisAllowList
booleantype
stringType of trigger
one ofgitmanualOnly
booleanShould the git trigger only be triggered manually?
spec
(multiple options: oneOf) requiredA node representing an action to be performed as part of the PreviewEnvTemplate.
refs
{object}id
string requiredIdentifier for the template run
templateId
string requiredIdentifier for the template
status
string requiredStatus of the template run
one ofpending, running, success, failurecreatedAt
stringtime of creation
updatedAt
stringtime of update
GET /v1/projects/{projectId}/pipelines/{pipelineId}/preview-envs/runs/{templateRunId}
Example response
200 OK
JSON
{
"data": {
"apiVersion": "v1",
"arguments": {
"ARGUMENT_1": "value_1",
"ARGUMENT_2": "value_2"
},
"triggers": [
{
"vcsService": "github",
"accountLogin": "github-user",
"repoUrl": "https://github.com/northflank-examples/remix-postgres-redis-demo",
"branchRestrictions": [
null
],
"prRestrictions": [
null
],
"pathIgnoreRules": [
null
],
"ciIgnoreFlags": [
null
]
}
],
"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": "pending"
}
}