The rest api will return all fields. Of course u can just display what you want.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/0bae1eea-690f-47f6-ab0b-0188ea9d8534%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1810411f-197c-48c2-9e10-64516b4cb826%40googlegroups.com.
You could easily write your own RESTful api to return only the fields specified.
Add a URL param /include-fields/Article.publishDate
Intercept that in the options and then modify the output accordingly.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/1810411f-197c-48c2-9e10-64516b4cb826%40googlegroups.com.
It literally only took about 15 minutes. J You’ll need at least 3.x to use the built-in REST core libraries.
Where the magic happens -> https://github.com/nkeiter/generic-dotCMS-plugin-code-examples/blob/master/dotcms4.0.1/osgi/org.example.nkeiter.contentlet.rest.light/src/main/java/org/example/nkeiter/contentlet/rest/light/service/ContentletRestServiceLight.java#L66-L69
Keep in mind you might have to be logged in (as usual) depending on Content Type permissions.
Tested using Advanced REST client (Chrome app)
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Benefits Advisory Council Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/79c7bb840909425d98424775798749f6%40exch13b.ms.gettysburg.edu.
Actually, it might work on 2.x now. I had to get a little creative with it and I don’t have an environment to test this in. You’ll probably have to update your exported packages list in the OSGI admin panel to get this to work.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/7f256808cc654ae7a3f446fe875238d6%40exch13b.ms.gettysburg.edu.