Retrieve custom fields via Alfresco 5.2 search API

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

Retrieve custom fields via Alfresco 5.2 search API

We are using Alfresco Community Edition 5.2. We are building a front-end layer on top of Alfresco for searching and downloading documents. For searching, we are using the POST Search RESTful API available in v5.2.

We are also creating a custom field for 'Creation Date', since we want to show the date a document was created, rather than uploaded to the system.

I could not find this in the documentation - but is there a way to retrieve our custom date field using the RESTful API? How can this be done?

3 Replies
jpotts
Professional

Re: Retrieve custom fields via Alfresco 5.2 search API

If you can share the exact URL you are POSTing to that would be helpful.

In general, you should be getting back node references which you can then use to get all of the properties.

If you want to get properties back that are not included in the out-of-the-box search response, you can either extend the web script to include your custom properties in the response or you can implement your own search end point using a custom web script and return exactly what you need.

janv
Alfresco Employee

Re: Retrieve custom fields via Alfresco 5.2 search API

Hi Sanket,

Have you tried setting "include": ["properties"] ?

You can use the include JSON body parameter to return additional information. This works in the same way as in the /nodes/{nodeId}/children method in the core API. For example:

"include": ["aspectNames", "properties", "isLink"]

Regards,

Jan

Anonymous
Former Member

Re: Retrieve custom fields via Alfresco 5.2 search API

Am looking for same anwser