How to get "UI Path" of a document in Search API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 12:52 AM
For the below Search API request, we are not getting Digital workspace UI URL of any document. Its there any way to get it in Search API? Or is there any other API through which we can get UI path.
Request:
{
"query": {
"query": "hr:contractType:'personcontact'"
},
"paging": {
"maxItems": 500,
"skipCount": 0
},
"include": [
"aspectNames",
"properties",
"permissions",
"path"
]
}
Currently we are using Alfresco license version:
Content Services
Edition: Enterprise
Version: 7.2.1.9 (r73c0fd3f-b6765) schema 16100
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 09:20 AM
There is no API to get directly the ADF path to a document, but you can use the REST API to identify the path of a document or folder.
$ curl --location 'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f3bb5d08-9fd1-46da-a94a-97f20f1ef208?include=path'
This will provide an output including the “path” information, for instance:
{ "entry": { ... "path": { "name": "/Company Home/Sites/swsdp/documentLibrary/Meeting Notes", ... }
- If this path name starts with ““/Company Home/Sites”, the document is inside a site
- If this path name starts with “/Company Home/User Homes”, the document is on personal folder
- If this path name starts with “/Company Home/Shared”, the document is on shared folder
