Hi,
I am running a http request from a groovy script :
def spn = 'myusertoauthenticate'
def content = 'APPLICATION_JSON'
def url = "https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}
def response = httpRequest authentication: spn, contentType: content, timeout: 20, url: url, validResponseCodes: '200'
I received a 400 bad request.
The POST request is working fine and also when I call the GET function without the {pipeline_uuid} I received all the pipelines, but the issue is when I call with the {pipeline_uuid}, the pipeline uuid that I am using is the pipeline uuid that I received in the POST.
Documentation: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid%7D
Thanks,
Fixed.
I Fixed using the url like this:
def url = "https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/%7Bpipeline_uuid%7D
My issue was related with the {} in the pipeline uuid, so I replaced using %7B and %7D
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.