projectdoc Toolbox

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

Example

cURL Call
curl -n 
  -s "https://example.com/confluence/rest/projectdoc/1/document.json?select=Name&from=SPACEKEY&where=%24%3CDokumenttyp%3E%3D%5Bit-service%5D" | jq .
 

Using curl -n assumes you are using a .netrc file to authenticate. Please see REST Login to Confluence with cURL for more options.

 

Using cURL it is necessary that the strings of the Query-part of an URL are correctly urlencoded.

e.g. ?where=$<Dokumenttyp>=[it-service] is not a valid query string

So the string following the equal sign must be urlencoded e.g using the linux-urlencode command:

myuser@home ~ # urlencode "$<Dokumenttyp>=[it-service]"
%24%3CDokumenttyp%3E%3D%5Bit-service%5D

This results to the following complete query string:

?where=%24%3CDokumenttyp%3E%3D%5Bit-service%5D
Response
{
  "size": 63,
  "start-index": 0,
  "max-result": 63,
  "id-list": "6291527,6291530,8520652,8520665,7308961,6295008,6295086,6295038,...,6291777,6291781,6291783",
  "document": [
    {
      "id": 6291527,
...

The value for id-list may be used to patch this set of documents.

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.