Jobs /
Run job
Required permission
Project > Jobs > General > Read
Path parameters
projectId
string requiredID of the projectjobId
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 absolutedockerSecretMounts
{object}Docker secret mount contents as JSON object, encrypted at rest. Must be a valid Docker secret mount identifierbilling
{object}deploymentPlan
stringThe ID of the deployment plan override to use.min length3max length100pattern^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$deployment
(multiple options: oneOf)Override the job run deployment source.- {object}Optional: Override the run to use a previously built commit
docker
{object}Allows for customization of docker runtimeconfigType
string requiredType of entrypoint & command override configurationone ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where `configType` is `customEntrypoint` or `customEntrypointCustomCommand`customCommand
stringCustom command which should be used. Required in case where `configType` is `customCommand` or `customEntrypointCustomCommand`buildpack
{object}Allows for customization of buildpack runtimeconfigType
string requiredType of buildpack run configurationone ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where `configType` is `customProcess`customEntrypoint
stringCustom entrypoint which should be run. Required in case where `configType` is `customEntrypointCustomCommand`customCommand
stringCustom command which should be run. Required in case where `configType` is `customCommand`, `customEntrypointCustomCommand` or `originalEntrypointCustomCommand`storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBone of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800, 256000, 307200, 409600, 512000min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shmone of64, 128, 256, 512, 1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 143360min64max61440internal
{object}Optional: Specify the commit to runid
stringID of the build service to deploymin length3max length54pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$branch
stringBranch to deploybuildSHA
(multiple options: oneOf)Commit SHA to deploy, or 'latest' to deploy the most recent commit- stringA commit sha.min length40max length40
- stringLatest commit.one 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 runtimeconfigType
string requiredType of entrypoint & command override configurationone ofdefault, customEntrypoint, customCommand, customEntrypointCustomCommandcustomEntrypoint
stringCustom entrypoint which should be used. Required in case where `configType` is `customEntrypoint` or `customEntrypointCustomCommand`customCommand
stringCustom command which should be used. Required in case where `configType` is `customCommand` or `customEntrypointCustomCommand`buildpack
{object}Allows for customization of buildpack runtimeconfigType
string requiredType of buildpack run configurationone ofdefault, customProcess, customCommand, customEntrypointCustomCommand, originalEntrypointCustomCommandcustomProcess
stringCustom process which should be run. Required in case where `configType` is `customProcess`customEntrypoint
stringCustom entrypoint which should be run. Required in case where `configType` is `customEntrypointCustomCommand`customCommand
stringCustom command which should be run. Required in case where `configType` is `customCommand`, `customEntrypointCustomCommand` or `originalEntrypointCustomCommand`storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MBone of1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 153600, 204800, 256000, 307200, 409600, 512000min1024max204800shmSize
integerConfigures the amount of available memory-backed disk space available to /dev/shmone of64, 128, 256, 512, 1024, 2048, 5120, 10240, 20480, 30720, 40960, 51200, 61440, 81920, 102400, 122880, 143360min64max61440external
{object}Optional: Specify the external image to runimagePath
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 runrunName
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"}},"dockerSecretMounts":{"example-secret-mount_1":{"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"
}
}