v1
Double column
API
CLI
JS Client

Jobs /

Edit job build arguments

Sets build arguments for the given job.

Required permission

Project > Jobs > Configuration > Update Build Parameters

Path parameters

    • projectId

      string required

      ID of the project

    • jobId

      string required

      ID of the job

Request body

  • {object}

    A basic example

    • buildArguments

      {object} required

      An object containing the all of the build arguments to set for the service. Keys must only contain letters and numbers separated with underscores, may not start with a number

    OR
    • {object}

      An advanced example using secret files

      • buildArguments

        {object} required

        An object containing the all of the build arguments to set for the service. Keys must only contain letters and numbers separated with underscores, may not start with a number

        • buildFiles

          {object}

          Secret files as JSON object, encrypted at rest. File path must be absolute

        Response body

        • {object}

          Response object.

          • data

            {object} required

            Result data.

          API
          CLI
          JS Client

          POST /v1/projects/{projectId}/jobs/{jobId}/build-arguments

          Example request

          Request body
          A basic example
          curl
          curl --header "Content-Type: application/json" \
            --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
            --request POST \
            --data '{"buildArguments":{"ARGUMENT_1":"abcdef","ARGUMENT_2":"12345"}}' \
            http://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/build-arguments
          OR
          An advanced example using secret files
          curl
          curl --header "Content-Type: application/json" \
            --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
            --request POST \
            --data '{"buildArguments":{"ARGUMENT_1":"abcdef","ARGUMENT_2":"12345"},"buildFiles":{"/dir/fileName":{"data":"VGhpcyBpcyBhbiBleGFtcGxlIHdpdGggYSB0ZW1wbGF0ZWQgJHtOT0RFX0VOVn0gdmFyaWFibGU=","encoding":"utf-8"}}}' \
            http://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/build-arguments

          Example response

          200 OK

          The operation was performed successfully.

          JSON

          {
            "data": {}
          }

          © 2022 Northflank Ltd. All rights reserved.