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 must only contain letters and numbers separated with underscores, may not start with a number
deployment
(multiple options)- {object}
Optional: Override the run to use a previously built commit
cmdOverride
stringThe CMD override to use when running the job.
storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MB
one of1024, 5120, 10240, 20480min1024max20480internal
{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
Commit SHA to deploy, or 'latest' to deploy the most recent commit
buildId
stringID of the build that should be deployed
- {object}
Optional: Override the run to use an external image
cmdOverride
stringThe CMD override to use when running the job.
storage
{object}ephemeralStorage
{object}storageSize
integerEphemeral storage per container in MB
one of1024, 5120, 10240, 20480min1024max20480external
{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
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"},"deployment":{"cmdOverride":"nginx -g","storage":{"ephemeralStorage":{}},"internal":{"id":"example-build-service","branch":"master","buildSHA":"latest","buildId":"premium-guide-6393"}}}' \
http://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"
}
}