Get all Confluence pages that have JIRA links on them
Asked by Markus:

Is there a way to find all Confluence pages that have JIRA links on them?

I can easily enough find all JIRA issues that have link to a Confluence page (via JIRA REST api) but is there a way to do it other way round?


Answers:
author: Shannon S
body: Hi Markus,

You can use Confluence Search to find any pages with the Jira issues macro included on it.

* [Confluence Search Syntax \> Searching for Macros](https://confluence.atlassian.com/doc/confluence-search-syntax-158720.html#ConfluenceSearchSyntax-Searchingformacros)
* [Jira Issues Macro](https://confluence.atlassian.com/doc/jira-issues-macro-139380.html) (scroll down to the *Notes* \> *Wiki Markup Example* section to see the name of the macro)

Thus:
>
> Searching for macros {#toc-hId-1796277885}
> ------------------------------------------
>
> You can search Confluence content to find where a macro is used. Start your search string with `macroName:` and type the macro name after the colon. For example, to search for all excerpt-include macros:  
>
>     macroName:excerpt-include*
>
> For more information about `macroName` and other search fields, see [Confluence Search Fields](https://confluence.atlassian.com/doc/confluence-search-fields-161188.html).

Example:  

    macroName:jiraissues*

Let me know if you have any trouble!

Regards,

Shannon

comments: author: Markus
body: Hi,

Thanks but that does not really answer my question fully. If I create a link to a Confluence page in Jira, I do not add Jira macro to the page. I see there is a REST call to get Jira links from a page.

```
/rest/jira-metadata/1.0/metadata?pageId=
```

But is there a way to get all the pages that have Jira links on them?


author: Shannon S
body: Markus,

For that, you can search the database. Have a look here:

* [How to perform a Confluence site search for keywords and links through the database](https://confluence.atlassian.com/confkb/how-to-perform-a-confluence-site-search-for-keywords-and-links-through-the-database-830284252.html)

That should get you a list of pages that include a link to a specific domain (such as your Jira domain).

Regards,

Shannon


author: Markus
body: Hi,

That's not really what I'm after. I have a project in Jira that has an issue (e.g. TST-1) that has a link (link type: Confluence Page) to a Confluence page.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/22850i86DC359D84D974D5/image-size/large?v=v2&px=999 "image.png")

When I open the page in Confluence, I see there is a Jira issue linked to it.![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/22851i5A6F3AAAE6EF7ED2/image-size/large?v=v2&px=999 "image.png")

I want to find ALL the pages that have one or more Jira issues linked to them.


author: Shannon S
body: Markus,

Thank you for clarifying that. Can you try this and see if that gives you the results you need?

* [How to obtain a list of all pages and spaces integrated with JIRA](https://confluence.atlassian.com/confkb/how-to-obtain-a-list-of-all-pages-and-spaces-integrated-with-jira-779302426.html)

Regards,

Shannon


Tags: confluence-server

jira

jira-server

server