How can I see all parameters for a REST API resource?

Jonathan Ghellere April 25, 2022

Hello,

I'm scripting some bitbucket DC calls to automate some of our work, like for instance the creation and configuration of a repository.

I've found this documentation here https://docs.atlassian.com/bitbucket-server/rest/7.21.0/bitbucket-rest.html#idp175

But I'm having a hard time to find the parameters/options/objects I can use in a request body, for instance, to create a repo I can use the following json body:

{
    "name": "My repo",
    "scmId": "git",
    "forkable": true,
    "defaultBranch": "main"
}

But, there are more parameters than that, right? Like the description.

{
    "name": "My repo",
    "scmId": "git",
    "forkable": true,
    "defaultBranch": "main",
"description": "aaa bbb my desc" }

There's any documentation or some place where I can see all the parameters I can send in a json body?

Thx!

1 answer

0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2022

Hello @Jonathan Ghellere 

What happens when you try to create a new repository while providing the description parameter in the body of the request?

Jonathan Ghellere May 16, 2022

It works.

David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 16, 2022

Then it seems like you've found an omission in the documentation.

Send that feedback to Atlassian to have the description parameter included in the example for that REST API endpoint.

Jonathan Ghellere May 24, 2022

Hye David, thx for you contribution.

Actually we have more parameters that are not there in the documentation. My question is not related to the omission but where I can get a list of all parameters.

Creating the repo is only the beginning, I would like to automate the branch config, groups and other stuff.. 
A complete API documentation would be awesome. There's any anywhere?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events