Get macro usage details in Confluence Cloud using CQL, Postman, and JSON-to-CSV conversion
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Learn how to get the macro usage details via CQL with Postman and convert JSON to CSV.
Solution
CQL API
Use the below CQL API call via Postman as a workaround:
https://YOUR_INSTANCE.atlassian.net/wiki/rest/api/content/search?cql=type=page AND macro in ('macro_name1','macro_name2')&limit=10000&start=0Postman files to import
CQL macro usage
{
"info": {
"_postman_id": "cb1b578c-9174-4647-9c49-7ef317d9b7ca",
"name": "CQL macro usage",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "25367731"
},
"item": [
{
"name": "macro usage",
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{api-token}}",
"type": "string"
},
{
"key": "username",
"value": "{{username}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://{{site-name}}/wiki/rest/api/content/search?cql=type=page AND macro in ('{{macro-name}},{{macro-name}}')&limit=10000&start=0",
"protocol": "https",
"host": [
"{{site-name}}"
],
"path": [
"wiki",
"rest",
"api",
"content",
"search"
],
"query": [
{
"key": "cql",
"value": "type=page AND macro in ('{{macro-name}},{{macro-name}}')"
},
{
"key": "limit",
"value": "10000"
},
{
"key": "start",
"value": "0"
}
]
}
},
"response": []
}
]
}MacroUsage
{
"id": "db7351f4-90b2-44f4-b7c6-c75cc23db291",
"name": "MacroUsage",
"values": [
{
"key": "site-name",
"value": "Your site's base URL",
"type": "default",
"enabled": true
},
{
"key": "username",
"value": "Your email address",
"type": "default",
"enabled": true
},
{
"key": "api-token",
"value": "Your API token",
"type": "default",
"enabled": true
},
{
"key": "macro-name",
"value": "macro-name (Case sensitive)",
"type": "default",
"description": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2025-08-28T05:12:17.498Z",
"_postman_exported_using": "Postman/11.60.3"
}Steps
Copy and save both JSONs above.
Import the JSON files to Postman.
Export the CQL response JSON.
Import JSON to Excel via Power Query.
In the Get Data selection, select the JSON option. This launches a local file browser where you can select your JSON file.
Select Open to open the file.

Loading the JSON file automatically launches the Power Query editor. Power Query uses automatic table detection to flatten the JSON data into a table seamlessly. You can continue to transform the data from the editor if you want, or you can close and apply. More information: Automatic table detection from JSON files.

Then you can get the detailed macro report for the specific macro usage and save it to CSV.
Feature requests
To improve upon this situation, we have outlined the following feature requests to address these issues:
Was this helpful?