projectdoc Toolbox

Supports queries on projectdoc documents.

Parent
Type
Extension
Since
1.0
Path
rest/projectdoc/1/document

The documents service allows to run queries to fetch document identifiers and information from projectdoc documents.

The result can be requested in different media types.

Media TypeContent TypeExtensionNotes
CSVtext/csv.csvRequires the select parameter to be specified to define the order of columns.
JSONapplication/json.jsonNo special requirements.
Microsoft
Excel
application/vnd.ms-excel.xlsRequires the select parameter to be specified to define the order of columns. The file will be written with a filename extension of .csv (since the document is a specialized version of CSV that is recognized with Excel).
XMLapplication/xml.xmlNo special requirements.

Specify the content type with the accept HTTP header or add the extension to the request URL.

Parameters

The parameters allow to specify a query on projectdoc documents. This is similar to the Display Table Macro, but instead of rendering the result list in a table right in the Confluence page, the REST service returns a representation of the list in the specified media format.

select

The comma-separated names of properties to select from matching documents.

from

The comma-separate space keys to select documents from.

 

A value for this parameter is required. Otherwise a query on all spaces will be executed which is heavily consuming resources.

If you really need to query on all spaces, use the @all keyword.

where

The constraints to filter documents from selected spaces.

See Search Tips.

sort-by

The comma-separated list or properties to sort the documents that are part of the result set.

max-hit-count

The maximum number of hits. This is the max count of hits in the result set.

expand

Define if properties and/or sections should be expanded. Select from property and section. This parameter refers to the representation returned on the request.

If properties and sections should be expanded, do not use blanks in this value (property,section).

 

This parameter is supported since Web API version 1.1. Prior to this version the value of this parameter is ignored.

property-filter

A regular expression to match property names of the documents in the result set. Only properties with matching names will be returned as properties of the documents.

The parameter is available since version 1.1.

start-index

The zero-based index of the first hit in the result set to return. Defaults to zero (0).

max-result

The maximum number of hits returned. Defaults to ten (10).

 

While max-hit-count limits the size of the result list, the max-result only limits the size of the expanded documents. Think of max-result as a page size. Move the start-index up by steps of max-result until all documents have been returned.

If start-index and max-result are not specified, all documents of the result set are expanded.

id-list

A list of document (aka page) identifiers to return. If empty the query is executed, if non-empty, start-index and max-result define the range of documents whose details are returned.

 

It is not required to run a query. If the identifiers for the documents to fetch information from is known in advance, simply specify them with the id-list parameter.

resource-mode

Controls how properties are rendered. Valid values are html,value, and storage (default). This parameter refers to the representation returned on the request.

The parameter is available since version 1.1.

Examples

Examples on using the get service.

Fetching Document IDs
Specify a query to fetch document IDs. Pass this list of IDs to other service calls (e.g. to patch properties or sections).

Resources

Related information on using REST APIs (with cURL) to integrate with remote information systems.

REST Login to Confluence with cURL
To access Confluence via its REST API with cURL you typically need to authenticate. Learn how to login with cURL and avoid some common security pitfalls.
Accessing projectdoc Properties with cURL
Learn how to access projectdoc properties via REST API with cURL.
projectdoc Bulk Changes to Documents
The Web API Extension for the projectdoc Toolbox can be employed to make bulk changes to documents. Since there is no safety net, these actions need to be take with care. This tip introduces a way to conduct this task.
Confluence as the Information Hub
Tools from the projectdoc Toolbox to import from and export to other information systems.
Import Resource
Provides services to import information from Maven artifacts into Confluence.