Atlassian Marketplace API - Sales Reporting
This query fetches sales information for a specific vendor and a specific plugin.
We at Scandio use a query like this to provide an overview about our current Atlassian Marketplace sales for all of our colleagues - without depending on whether they have direct access to our Marketplace account or not.
Datasource
Datasource type | REST Basic |
---|---|
Datasource URL |
CODE
|
Datasource Test URL |
CODE
|
Datasource User | (Technical) User that is allowed to access the vendor account |
Datasource Password | Password of the (technical) user |
Query
Query URL |
CODE
|
---|
Converter Example
function convert(json) {
var result = [];
var parsedJsonObject = JSON.parse(json);
var current, index;
for (index in parsedJsonObject.sales) {
// only continue if this property is not inherited
if (parsedJsonObject.hasOwnProperty(index)) {
current = parsedJsonObject[index];
result.push({
'Date': current.date,
'Invoice': current.invoice,
'Organisation Name': current.organisationName,
'TechnicalContactName': current.technicalContact.name,
'License Size': current.licenseSize,
'Purchase Price': '$' + current.purchasePrice,
'TechnicalContactMail': current.technicalContact.email
});
}
}
return result;
}
Template Example
<table class="aui confluenceTable pocketquery-table">
<thead>
<tr>
#foreach ($column in $columns)
#if(!$column.equals("TechnicalContactMail"))
<th>$!column</th>
#end
#end
</tr>
</thead>
<tbody>
#foreach ($row in $result)
<tr>
#foreach ($column in $row)
#if($velocityCount == 4)
<td>
<a href="mailto:$row.TechnicalContactMail">
$!column
</a>
</td>
#elseif($velocityCount < 7)
<td>$!column</td>
#end
#end
</tr>
#end
</tbody>
</table>