Use Rest API to retrieve custom schema results with Page Provider

I'm trying to retrieve document custom schema properties via a REST call. I am only able to pull basic document details. I would like to pull the custom schema fields for my document type via rest. Is this possible, and if so how can it be done?

What's returned Example:


What I'm trying to pull :

“dc:source”: null,

"dc:publisher": null,
"ps_shipto:shiptp_effstatus": "A",
"ps_shipto:shipto_customer": "0060182404",
"ps_shipto:shipto_product": "1092",
"ps_shipto:shipto_oper_unit": "5915",
"ps_shipto:shipto_bu": "80152",
"ps_shipto:shipto_department": "6200"

Page Provider table layout ShipToPageProvider.PNG

0 votes

2 answers




I am not sure if you want to know how to search by using the custom schema properties, or if you want to get those properties in the results object. Anyway, I'll explain how to do both:

1) Search by using custom schema properties:

If you have defined your Page Provider using Nuxeo Studio, then, by default, you will have a “Named Parameter” page provider. I mean, you will have something like this:

So if you want to use the REST API, you can add the parameters after the “execute”. For example: GET http://NUXEO_SERVER/nuxeo/api/v1/search/pp/pp_PP_ShipTo/execute?ps_shipto_shipto_effstatus=A&ps_shipto_shipto_customer=0060182404

The name “ps_shipto_shipto_customer” is the same you can see in the Table layout changin the “:” to a low bar.

2) Retrieve custom schema properties:

In this case, you will need to add the “properties” header in your request. Check this:


2 votes

As Rodri suggested, you need to add in your HTTP headers the schemas which should be returned. In your case, what matters is the properties attribute which should be set to dublincore,ps_shipto for example.

1 votes