I need to generate a list of all pages on which a certain macro is used (LucidChart). I can do this in the Administration UI with Macro Usage, but I've got hundreds of pages using the macro, and the UI isn't that easy to work with for a large number of pages.
How can I export the results of this into a form that is easier to work with - ideally a .csv that I can turn into a spreadsheet that I can sort, etc.?
Thanks very much
Louise
Do you mean this "macro usage"?
If yes, here you only see how many times a macro was used.
Or do you want a list of all pages which uses a special macro?
Perhaps you can share an example of the head row in the .csv (what you would like to have)
Regards, Dominic
Sorry - thought I replied, but now I don't see what I wrote.....
Thanks very much for your response.
Yes - I mean the "macro usage" in your screenshot. Specifically for LucidChart macro, but something general-purpose where I could specify the name of the macro would be ideal.
Columns I need in the .csv are:
space_name, space_key, page_id, page_title, page_url
where page_url can be used in a browser.
Extra credit for including last modified_by, last_modified_date
I need this to identify pages using the LucidChart macro, because we are migrating our Confluence content to a new instance (Cloud to Server, after an acquisition) and LucidChart does not support that migration path. The prospect of manually fixing all those links is daunting enough, and is nearly impossible unless we know which pages need fixing.
Thanks
Louise
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And yes - you are correct that the page in your screenshot lists only the number of times the macro is used, but if you click on that, you get a list of the pages. Unfortunately, I cannot find a way to export those results, and the UI is not friendly - especially when I have nearly 400 pages with the LucidChart macro!
L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are two possible solutions:
REST API
In the REST documentation you can see, that you can search with a CQL: Content Search
Which means, you can search with:
<<URL>>/rest/api/content/search?cql=macro+%3D+%22LucidChart%22&limit=1000
This gives you 500 (max is 500) pages. You can create a second call with the "start" parameter:
<<URL>>/rest/api/content/search?cql=macro+%3D+%22LucidChart%22&limit=1000&start=500
This gives you the results from 500.
From there you can generate a CSV with a converter like https://json-csv.com/
User Macro
You could possibly write an user macro. But I want to see if the first option is okay for you, before we look to deep in the user macro option.
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.