The API allows to execute queries similar to the Display Table Macro. Code Block |
---|
language | text |
---|
title | Query Request |
---|
| https://username:secret@example.com/confluence/rest/api/projectdoc/1/document.xml?
select=Name,Short%20Description&
from=SPACEKEY&
where=Doctype=blank |
The result is a representation that provides a list of all document IDs. In this example, three documents are returned. Code Block |
---|
language | xml |
---|
title | Returned Representation |
---|
| <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<documents
id-list="753671,753673,753675"
max-result="3"
start-index="0"
size="3">
<document id="753671">
<property>
<name>Name</name>
<value>Blank 1</value>
</property>
<property>
<name>Short Description</name>
<value>Short description 1.</value>
</property>
</document>
<document id="753673">
<property>
<name>Name</name>
<value>Blank 2</value>
</property>
<property>
<name>Short Description</name>
<value>Short description 2.</value>
</property>
</document>
<document id="753675">
<property>
<name>Name</name>
<value>Blank 3</value>
</property>
<property>
<name>Short Description</name>
<value>Short description 3.</value>
</property>
</document>
</documents> |
If max-result=1 is added as parameter to the request, only the first hit in the result set is returned. Clients may then forward the id-list and select the documents to return. There are also links in the HTTP header to request the next (rel=next ) or previous (rel=prev ) hit. Note Box |
---|
If the ID list is specified in the request, no query is executed. Only the select parameter will be taken into account to select on the returned document properties. |
|