-
Type:
Suggestion
-
Resolution: Fixed
-
Component/s: Core - Content REST APIs
-
2
As an administrator I would like to use the Confluence REST APIs to search for pages that have been deleted (moved to Space Trash), but not yet purged. This is currently not available in the core API as a defined field and is not exposed to CQL, but the status does exist.
Desired Behavior
I would like to do something like the following curl request to retrieve all pages that have been put into the Space Trash for the space key titled "FOO":
curl -u admin:admin -G "http://localhost:6743/c743/rest/api/content/search" \ --data-urlencode "cql=(type=page and space=FOO and status=deleted) OR (creator=admin and type=blogpost)"
The "status" constraint (or similar field) should map to "deleted" or "current", or perhaps "deleted" should be the field with a boolean value.
The response should be as any other CQL response done from API.
Research Notes
Currently we do have SQL that allows for us to search for deleted pages at the database layer, per the following KB article: link.
Our REST API docs do not currently define a field for page status: link
Previously before 6.7 there was a bug which had indexed deleted content in search results, which was resolved with the 6.7.0 release: CONFSERVER-40833
Temporary workaround
Using content REST API will return trashed items
curl -u admin:password -G "http://localhost:8090/rest/api/content?spaceKey=TEST&status=trashed"
- mentioned in
-
Page Loading...