Overview
If you find that when passing in API parameters while triggering a new pipeline the parameters do not appear to be applying to your build, make sure to pass in the content-type header for JSON.
Solution
An example of how to do this can be found below:
Content-Type: application/json
If using cURL to post the API data you can use the -H argument to set the header directly:
curl ... "https://circleci.com/api/v2/..." -H "Content-Type: application/json" ...
Outcome
The API parameters should now be added successfully when triggering the pipeline. See the API v2 documentation for details: Trigger Pipeline Endpoint
Comments
Article is closed for comments.