Confluence Server REST API: given a list of ids, how to get their metadata in one query?

Hello everyone, we make extensive use of confluence server REST API and, currently, need to solve the following problem:

Given a list of page ids, how to get each page’s properties?

Currently, our solution simply iterates through this list and retrieves the properties of each page by leveraging:




Where {id} is the id of a page.

This results in poor perfomance and creates a ton of connections.

What I am looking for is something like:



Where {list_of_ids} is a comma-separated list of pages.

But, currently, this functionality is unfortunately missing, is there any other way to get the desired outcome?

Technical details about our setup:
Confluence server:
Version: 7.4.11
BuildNumber: 11943

As for page ids, they belong to different spaces and generally have almost nothing in common, except that they are hosted on one confluence server.

Hi @GustawBobowski

you can use search content API -

URL/rest/api/content/search?cql=id = 123 or id = 456 or id = 789&expand=expand=metadata.labels,body.view


1 Like

Thank you!

This seems to be what I need:
cql=id in (id1,id2,...idN)

However, are there any limits to how many elements can be in the list?

The default is 25, but you can get more results when you add &limit=100

The maximum is probably 500 but you can verify it in the API response itself


1 Like