Jobs /
Run job
Required permission
Project > Jobs > General > Read
Path parameters
projectId
string requiredID of the project
jobId
string requiredID of the job
Request body
- {object}
runtimeEnvironment
{object}An object containing the environment variables overrides to use when running the job. Keys may only contain letters, numbers, hyphens, forward slashes and dots.
runtimeFiles
{object}Secret files as JSON object, encrypted at rest. File path must be absolute
billing
{object}deploymentPlan
stringThe ID of the deployment plan override to use.
pattern^[A-Za-z0-9-]+$deployment
(multiple options: oneOf)- {object}
Optional: Override the run to use a previously built commit
docker
{object}Allows for customization of docker runtime
configType
string requiredType of entrypoint & command override configuration
one ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where
configType
iscustomEntrypoint
orcustomEntrypointCustomCommand
customCommand
stringCustom command which should be used. Required in case where
configType
iscustomCommand
orcustomEntrypointCustomCommand
buildpack
{object}Allows for customization of buildpack runtime
configType
string requiredType of buildpack run configuration
one ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where
configType
iscustomProcess
customEntrypoint
stringCustom entrypoint which should be run. Required in case where
configType
iscustomEntrypointCustomCommand
customCommand
stringCustom command which should be run. Required in case where
configType
iscustomCommand
,customEntrypointCustomCommand
ororiginalEntrypointCustomCommand
storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MB
one of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shm
one of64, 128, 256, 512, 1024, 2048, 5120, 10240min64max10240internal
{object}Optional: Specify the commit to run
id
stringID of the build service to deploy
pattern^[A-Za-z0-9-]+$branch
stringBranch to deploy
buildSHA
(multiple options: oneOf)Commit SHA to deploy, or 'latest' to deploy the most recent commit
- stringmin length40max length40
- stringone oflatest
buildId
stringID of the build that should be deployed
- {object}
Optional: Override the run to use an external image
docker
{object}Allows for customization of docker runtime
configType
string requiredType of entrypoint & command override configuration
one ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where
configType
iscustomEntrypoint
orcustomEntrypointCustomCommand
customCommand
stringCustom command which should be used. Required in case where
configType
iscustomCommand
orcustomEntrypointCustomCommand
buildpack
{object}Allows for customization of buildpack runtime
configType
string requiredType of buildpack run configuration
one ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where
configType
iscustomProcess
customEntrypoint
stringCustom entrypoint which should be run. Required in case where
configType
iscustomEntrypointCustomCommand
customCommand
stringCustom command which should be run. Required in case where
configType
iscustomCommand
,customEntrypointCustomCommand
ororiginalEntrypointCustomCommand
storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MB
one of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shm
one of64, 128, 256, 512, 1024, 2048, 5120, 10240min64max10240external
{object}Optional: Specify the external image to run
imagePath
string requiredImage to be deployed. When not deploying from Dockerhub the URL must be specified.
pattern^(?:(?:https?:\/\/)?([a-zA-Z0-9\-]+\.[a-zA-Z0-9\.\-]+)(\/v1)?)?(?:\/)?([a-zA-Z/-9\.\-_]+)(?:\:([a-zA-Z/-9\.\-_\:]+)|\@([a-zA-Z/-9\.\-_\:]+))$credentials
stringID of the saved credentials to use to access this external image.
pattern^[A-Za-z0-9-]+$
OR
OR
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredThe ID of the job run
runName
string requiredThe name of the job run
POST /v1/projects/{projectId}/jobs/{jobId}/runs
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"runtimeEnvironment":{"VARIABLE_1":"abcdef","VARIABLE_2":"12345"},"runtimeFiles":{"/dir/fileName":{"data":"VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=","encoding":"utf-8"}},"billing":{"deploymentPlan":"nf-compute-20"},"deployment":{"docker":{"configType":"default"},"storage":{"ephemeralStorage":{"storageSize":1024}},"internal":{"id":"example-build-service","branch":"master","buildId":"premium-guide-6393"}}}' \
https://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/runs
Example response
200 OK
JSON
{
"data": {
"id": "d34582a4-35bd-4c71-8e7c-e36999b88723",
"runName": "example-job-5fcf67bc56e1913e21d49504"
}
}