How to get the app usage of LaTeX Math macros through REST API on Confluence cloud

This article explains how to define and execute a search using the advanced search capabilities of the Confluence REST API for LaTeX Math macros in the Confluence Cloud.

Instructions

  1. Use advanced search to find out the pages using the LaTeX Math macros. Replace “your-domain” with your instance’s domain name.

    https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=macro in(unit,mathblock,mathinline,"mathblock-ref","mathblock-table")

    In the above query:

    • unit refers to latex Unit macro.

    • mathblock refers to latex Math Block macro.

    • mathinline refers to latex Math Inline macro.

    • “mathblock-ref“ refers to Math Block Reference macro.

    • “mathblock-table” refers to the LaTex List of Equations (Math Blocks) macro.

  2. To search for the individual macros, use the query below:

    • For Math Block macro:

      https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=macro=mathblock
    • For LaTeX List of Equations macro:

      https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=macro="mathblock-table"

 

For macro names containing special characters (-), enclose them in double quotes during the CQL search; refer to https://developer.atlassian.com/server/confluence/cql-function-reference/#reserved-characters for more information.