"Unexpected response body" in API call to /pipelines/{uuid}/steps

Adam Leppek November 22, 2021

GET Calls to the API method /2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/ fail with a 400 for the following reason: 

{"error": {"message": "Bad request", "detail": "Unexpected response body", "data": {"key": "unexpected.response.body", "arguments": {}}}}

I have verified that my workspace, repo_slug, and pipeline_id are correct, twice. 

The message of this error also doesn't seem to refer to anything you'd use in a GET call. 

Please let me know what you can.

1 answer

1 accepted

1 vote
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 23, 2021

Hi @Adam Leppek

Just to confirm did you use the bracket for the pipelines UUID? It needs the bracket to works otherwise you'll receive the error.

An example call:

https://api.bitbucket.org/2.0/repositories/<workspacek>/<reponame>pipelines/{53d53b0c-9a68-4fbb-b6b5-81bd5e2946a0}/steps/

Let me know if it's still failing after you added the bracket for the pipeline UUID.

Cheers,
Syahrul

Adam Leppek November 24, 2021

Hi @Syahrul! Yes, I did use brackets around the UUID.

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2021

Hi @Adam Leppek


Noted, I am leaning towards the URL encoding. Can you try removing the bracket in the URL and replacing it with the following encoding:

{ = %7B
} = %7D

As an example below:

curl --request GET --url https://api.bitbucket.org/2.0/repositories/api-public-test/api-test/pipelines/%7B1fdc2f3b-d421-41d3-ae75-f43dea9524e4%7D/steps/

 I hope this helps.

Cheers,
Syahrul

Like # people like this
Adam Leppek November 30, 2021

@Syahrul I replaced the brackets with the encoded version, and everything now works. Thanks a lot for helping out with this. 

Like Syahrul likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events