How to get cm:title values in post request

cancel
Showing results for 
Search instead for 
Did you mean: 
sunchoudhury
Member II

How to get cm:title values in post request

Dear All,

I am very new to Alfresco. Currently I am posting my alfresco API in postman and getting the values.

I am passing below parameters in POSTMAN.

curl -X POST \
https://api.dev.net/alfresco-services/service/search \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkVCelhJUy1QY0U0NDI5a29fbnU3dThDbWJoZyJ9.eyJhdWQiOiJodHRwczovL2ZzLnRyb3dlMy5jb20vQXBpZ2VlV2ViIiwiaXNzIjoiaHR0cDovL2ZzLnRyb3dlMy5jb20vYWRmcy9zZXJ2aWNlcy90cnVzdCIsImlhdCI6MTU2NzA4NzU0MiwiZXhwIjoxNTY3MDkxMTQyLCJzdWIiOiJ2ZGV2MWEwZTc3MTciLCJlbWFp
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: cef160ca-fdf3-453d-8eb2-866e1c3a520e' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'apikey: hOYZjwPabP9XG479tvJkwh3g0vT5m3KE' \
-d '
{
"stringProps":
[
{
"propertyName": "ibmecm:contentType",
"propertyValues": ["Client Communications/Audit"]
}
],
"dateProps": []
}'

Here I am getting all string properties for the content type Client Communications/Audit.

My requirement is , I need only cm:title for the content type Client Communications/Audit.

How can I pass that one in the body , so that I will get only title values?

1 Reply
abhinavmishra14
Advanced

Re: How to get cm:title values in post request

Can you provide the underlying api call? Ideally repository layer APIs will have this kind of path: <host>:<post>/alfresco/service/<apiURI>

Is the https://api.dev.net/alfresco-services/service is overlaying the  https://api.dev.net/alfresco/service ?

Its not completely clear from the details you have provided, I think this search API : https://api.dev.net/alfresco-services/service/searchis a custom API in your system it seems. Check implementation at your end to see if it can respond as per your need. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)