05-12-2015 09:44 AM
05-12-2015 10:11 AM
DELETE /alfresco/service/api/archive/{store_type}/{store_id}/{id}
curl -u admin:admin -X "DELETE" http://localhost:8080/alfresco/service/api/archive/archive/SpacesStore/8fd584b9-3148-4b13-92ab-70d70...
05-12-2015 10:37 AM
06-14-2016 11:36 AM
"/alfresco/s/api/archive/workspace/SpacesStore/" + nodeId
03-30-2017 08:42 AM
Hello,
I have taken the time to test and debug these since we need to implement a purging mechanic at the company where I work. I'm pretty sure this is meant to be an archive purge service, but can also currently be used to delete a single workspace node. I have included the GET statement since you might need it to read archives before deleting.
Here is the official documentation.
GET archived (deleted) items | Alfresco Documentation
DELETE permanently (purge) a node or nodes from the archive | Alfresco Documentation
There is one caveat to watch out for in this service. For both the GET and DELETE options, you need to specify "workspace" as the store_id when fetching and deleting multiple node, however you must specify "archive" when deleting a single node. In other words, when you specify the noderef, you must use the archive store_id, but when you don't specify a noderef, you must specify the original store_id where the undeleted document was stored. In this case, the code has a map function that obtains the archive store from the workspace store, which is not called when the noderef is specified. This is very misleading and was probably not the original intent, but I don't see them fixing this issue without deprecating this service.
GET:
Obtain one page of deleted documents (store_id = workspace).
/alfresco/service/api/archive/{store_type}/{store_id}?maxItems={maxItems?}&skipCount={skipCount?}
For example, to fetech the first page of 100 documents:
/alfresco/service/api/archive/workspace/SpacesStore?maxItems=100&skipCount=0
DELETE
Purge one page of archived (deleted) documents (one page by default is 1000 - store_id = workspace😞
/alfresco/service/api/archive/{store_type}/{store_id}
For example,
/alfresco/service/api/archive/workspace/SpacesStore
Purge one archived (deleted) document (store_id = archive):
/alfresco/service/api/archive/{store_type}/{store_id}/{id}
For example, to delete node cb59255e-d58f-4691-a299-65326a426e73:
/alfresco/service/api/archive/archive/SpacesStore/cb59255e-d58f-4691-a299-65326a426e73
Hoping this helps someone out!
shaun
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.