I am attempting to update a pipeline variable using the REST API.
When I run the below GET curl command I receive a 200 response:
curl "https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/pipelines_config/variables/{UUID}" \
-H "authorization: Basic <token>" The response indicates I have the right scope (pipeline:variable)
X-OAuth-Scopes: pipeline:variable, webhook, snippet:write, wiki, issue:write, pullrequest:write, repository:delete, repository:admin, project:write, team:write, account:write
However when I run either of the following PUT statement I receive a 404
curl "https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/pipelines_config/variables/{UUID}" \
-X PUT \
-d "{\"key\": \"VERSION\", \"value\": \"2\"}" \
-H "{'Content-Type': 'application/json'}" \
-H "authorization: Basic <token>"
curl "https://api.bitbucket.org/2.0/repositories/{workspace}/{repository}/pipelines_config/variables/{UUID}" \
-X PUT \
-d "{\"uuid\": \"{e0432975-d630-43a6-ae1f-fc763e225d9e}\", \"key\": \"VERSION\", \"value\": \"2\", \"secured\": false}" \
-H "{'Content-Type': 'application/json'}" \
-H "authorization: Basic <token>"
Given I receive a 200 and the object I am struggling to understand why I receive a 404 when I perform a PUT.
Does anyone have any suggestions? I believe I am sending everything detailed in the documentation:
https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines_config/variables/%7Bvariable_uuid%7D?_ga=2.9386805.1498113289.1591731597-564959769.1588164046#put