Search macro usage with Confluence REST

RVal
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.
March 8, 2018

Hi

I have a script that communicates to Confluence via REST API. I need to find pages with one macro and replace it with a different macro. How do I create REST URL that searches for all the pages using macro XXX ?

Thank you

2 answers

1 accepted

1 vote
Answer accepted
Stephen Deutsch
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.
March 9, 2018

That would work fine, and also CQL has a keyword for that:

rest/api/search?cql=macro=XXX

https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/#macro

RVal
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.
March 9, 2018

Thank you, yes it is more concise and efficient CQL search 

0 votes
RVal
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.
March 8, 2018

I think I have my answer. It would be something like

rest/api/search?cql=siteSearch ~ "macroName:XXX" 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events