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:
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.