v1
Double column
API
CLI
JS Client
API
CLI
JS Client

POST /v1/projects/{projectId}/services/{serviceId}/build-options

Example request

Request body

Build from a Dockerfile

curl
curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
  --request POST \
  --data '{"dockerfile":{"buildEngine":"kaniko","dockerFilePath":"/Dockerfile","dockerWorkDir":"/"},"prRestrictions":["feature/*"],"branchRestrictions":["feature/*"]}' \
  https://api.northflank.com/v1/projects/{projectId}/services/{serviceId}/build-options

OR

Build from a Buildpack

curl
curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
  --request POST \
  --data '{"buildpack":{"builder":"HEROKU_20","buildpackLocators":["https://buildpack-registry.heroku.com/cnb/mars/create-react-app"],"buildContext":"/"},"prRestrictions":["feature/*"],"branchRestrictions":["feature/*"]}' \
  https://api.northflank.com/v1/projects/{projectId}/services/{serviceId}/build-options

Example response

200 OK

The operation was performed successfully.

JSON

{
  "data": {}
}

© 2021 Northflank Ltd. All rights reserved.