Workflows /
Get workflow
Required permission
Project > Workflows > General > Read
Path parameters
projectId
string requiredID of the projectworkflowId
string requiredID of the workflow
Response body
- {object}Response object.
data
{object} requiredResult data.apiVersion
string requiredThe version of the Northflank API to run the template against.one ofv1.2arguments
{object}A set of arguments that can be referenced in a template using '${args.argumentName}'.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-]+)|([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 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 requiredThe name of the branch to use.filePath
string requiredThe 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
stringname
string requiredmin length3max length100pattern^[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*$description
stringmax length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$spec
(multiple options: oneOf)A node representing an action to be performed as part of the template.richInputs
[array]An array of rich UI override inputs for the workflow.- (multiple options: oneOf)A node representing a rich UI override for the Release Flow template.
- {object}BranchCommitSelector input
kind
string requiredThe kind of input.one ofBranchCommitSelectorspec
{object} requiredThe specification for the BranchCommitSelector input.- {object}BuildSelector input
kind
string requiredThe kind of input.one ofBuildSelectorspec
{object} requiredThe specification for the BuildSelector input.options
{object}Options regarding how the template is run.autorun
booleanIf true, the template will run automatically whenever a change is made to it.concurrencyPolicy
stringDefines the concurrency behaviour of the template with respect to parallel runs.one ofallow, queue, forbidargumentOverrides
{object}A set of arguments that can be referenced in a template using '${args.argumentName}'.stageId
(multiple options: oneOf)- stringmin length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$
- stringpattern.*\${.*}.*
triggers
[array]- (multiple options: anyOf)
- {object}
kind
string requiredone ofvcs-pushspec
{object} requiredref
stringA reference that can be used to access the output of this trigger in the template.id
string- {object}
kind
string requiredone ofvcs-prspec
{object} requiredref
stringA reference that can be used to access the output of this trigger in the template.id
string- {object}
kind
string requiredone ofwebhookspec
{object} requiredref
stringA reference that can be used to access the output of this trigger in the template.id
string- {object}
kind
string requiredone ofvcs-releasespec
{object} requiredref
stringA reference that can be used to access the output of this trigger in the template.id
string- {object}
kind
string requiredone ofvcs-pr-labelspec
{object} requiredref
stringA reference that can be used to access the output of this trigger in the template.id
stringconcurrencyPolicy
stringDefines the concurrency behaviour of the template with respect to parallel runs.one ofallow, queue, forbidstatus
string requiredStatus of the template runone ofpending, running, success, failure, aborted, aborting, queued, unknown, skipped, waiting, retrying, async_wait, approval_waitpaused
boolean requiredWhether triggers are paused for this workflow. If `true`, Git triggers and webhook triggers will not run the workflow.createdAt
string requiredTimestamp the template was created at.updatedAt
string requiredTimestamp the template was last updated at.
OR
OR
OR
OR
OR
OR
GET /v1/projects/{projectId}/workflows/{workflowId}
Example response
200 OK
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"
},
"richInputs": [
{
"kind": "BranchCommitSelector",
"spec": {
"required": false,
"inputs": {
"source": "build-service"
},
"outputs": {
"branch": "TARGET_BRANCH",
"buildSha": "TARGET_COMMIT"
}
}
}
],
"options": {
"autorun": false,
"concurrencyPolicy": "allow"
},
"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"
}
}