This example used the deprecated “JSON Path“ and will be updated soon.

Prerequisite is, that the Bitbucket server is configured as Confluence Application Link. In this case you do not need further authentication information.

Datasource

Datasource Type

REST Application Link

Datasource Application Link

Choose Bitbucket link

Datasource Test URL

/rest/api/1.0/projects/DEMO/repos
CODE

Query URL

/rest/api/1.0/projects/:project/repos/
CODE

Query JSON Path

$.values
CODE

Query

Query URL

/rest/api/1.0/projects/:project/repos/
CODE

Query JSON Path

$.values
CODE

Converter

function convert(json) {
    var result = [];
    var parsedJsonObject = JSON.parse(json);
    var current, index;
    for (index in parsedJsonObject) {
        // only continue if this property is not inherited
        if (parsedJsonObject.hasOwnProperty(index)) {
            current = parsedJsonObject[index];
            result.push({
                'ID': current.id,
                'Name': current.name,
                'Slug': current.slug,
                'State': current.state,
                'Public': current.public
            });
        }
    }
    return result;
}
JS