Metadata REST API (v 3.0)
/rest/communardo/metadata/latest/filter/{pagenumber}Â GET
Search for Confluence content and its metadata. You can search with Confluence query language (CQL) or Lucene query language or combine them.
Â
parameter | Â | required | default | possible values / type |
---|---|---|---|---|
pagenumber | the pagenumber of the result list | Â | INTEGER greater 0 | |
query | Lucene query | Either the query parameter or the cql parameter has to be defined | Â | Â |
cql | Confluence query language | Either the query parameter or the cql parameter has to be defined | Â | Â |
sort | column to sort by | Â | STRING the name of the column
  | |
sortdirection | sort direction | Â |
| |
pagesize | Result entries per result page | Â | INTEGER greater 0 | |
fields | narrow down the list of displayed fields per result | Â | all metadata fields of the content results will be shown | A comma separated list of fields. Example: metadatafield.status,metadatafield.contactperson |
Â
Example Request with JavaScript
Â
jQuery.get( contextPath + "/rest/communardo/metadata/latest/filter/1" , { query: "global.metadatafield.contactperson:admin", pagesize:10, sortdirection:"DESCENDING", sort:"content-name-untokenized", fields: "global.metadatafield.contactperson" }, function(data) { console.log(data); });
Please note: latest/filter/1 displays the first page of the results. If you have more than 10 results, you will either need to raise the pagesize or go to page 2
Example Response
Â
{ "pageNo": "1", "self": "https://wiki.company.de/rest/communardo/metadata/latest/filter", "searchResults": [{ "pageTitle": "Example", "pageUrl": "/display/~admin/Example", "pageId": 1234567, "contentType": "page", "values": [{ "id": 80, "key": "global.metadatafield.contactperson", "title": "Contact Person", "content": "<a class=\"confluence-userlink user-mention current-user-mention\" data-username=\"admin\" href=\"https://wiki.company.de/display/~admin\" data-linked-resource-id=\"25624936\" data-linked-resource-version=\"1\" data-linked-resource-type=\"userinfo\" data-base-url=\"https://wiki.company.de\">Administrator</a>" }, { "id": 81, "key": "global.metadatafield.pagestatus", "title": "Page Status", "content": "Approved" }, { "id": 82, "key": "global.metadatafield.pagestatusmessage", "title": "Page Status Message", "content": "nothing to do here" }] }], "pager": { "currentPage": 1, "pageCount": 1, "elementsPerPage": 10, "totalElementsCount": 1 } }