Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket API create issue

7henry767 June 18, 2017

I want to create an issue with the api (https://api.bitbucket.org/2.0/repositories/.../.../issues). Im sending following data:

title, kind, priority and content. The Dataform value of content seems to create an error, the doc says "You'll need URL encode the content string".

The error from the api is following:

{
"type": "error"
"error":
{
"fields":
{
"content": "expected a dictionary"
}
 
"message": "Bad request"
}
 
}

I have no idea what i do wrong. Please help me.

1 answer

0 votes
Casper Smits November 19, 2018

Perhaps this comes a bit late but today I was also struggling with this issue and I found the solution.

You need to pass the data as JSON (Content-Type: application/json) in the following form:

{
'content': {
'raw': 'Your stuff here'
}
}

Hope this helps someone.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events