Post environment variables via REST API


#1

I’m trying to trigger builds with the below curl command:

curl --user ${CIRCLE_TOKEN}: \
    --request POST \
    --form revision=xxx\
    --form config=@config.yml \
    --form notify=false \
    --form build_parameters='{"key":"value"}' \
        https://circleci.com/api/v1.1/project/bitbucket/xx/yyy/tree/master

but end up getting the error in response:

{
  "message" : "Invalid build_parameters value: must be a map"
}

problem is in the the build_parameters line:

–form build_parameters=’{“key”:“value”}’ \

what is the correct way of passing build_parameters variables as map?


#2

Hmm, not sure. I wonder, can you omit that line temporarily? Usually this error is associated with a YAML problem.


#3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.