Webservice
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4
Back to this add-on's main page
View Other Add-ons From Rein de Vries
Getting specific field data without all EE meta
Support (Resolved)
wuwongy
|
Posted: 30 April 2015 07:32 AM |
|
|
|
Hi Rein,
I hope your well. This is a great add-on and working well. I have a question regarding the data returned in JSON via a REST request. The JSON contains a lot of Expression Engine meta (i.e.: allow_comments, sticky etc) also player relationships contain a lot of fields with empty field ids (i.e.: field_ft_12) is there a way to just specify exactly which field data we wish to receive in JSON (i.e.: title, entry_id, entry_date, some_custom_field etc). This would be massively useful to us.
Many thanks
Marc
|
|
|
Reinos
|
Posted: 06 May 2015 11:52 AM |
# 1
|
|
Developer
|
Hi Marc,
In version 4.2 this will be fixed.
You can use output_fields=“field_name|field_name2|etc”
Version 4.2 will be released today.
Best,
Rein
|
|
|
wuwongy
|
Posted: 12 May 2015 04:43 AM |
# 2
|
|
|
Thanks Rein, your a star!
|
|
|
wuwongy
|
Posted: 12 May 2015 12:05 PM |
# 3
|
|
|
Hi Rein, I don’t seem to be able to get this working :( please could you post and example of reading an entry via REST with output_fields? I have been trying this:
http://localhost/index.php/api/rest/search_entry/json?auth[api_key]=XXXXXX&data;[channel]=venues&output;_fields=“title|entry_id”
This just returns the same JSON as though I wasn’t using output_fields
Cheers
Marc
|
|
|
wuwongy
|
Posted: 12 May 2015 12:07 PM |
# 4
|
|
|
Its ok I figured it out, I needed this:
http://localhost/index.php/api/rest/search_entry/json?auth[api_key]=XXXXXX&data;[channel]=venues&data;[output_fields]=“title|entry_id”
|
|
|
wuwongy
|
Posted: 12 May 2015 12:08 PM |
# 5
|
|
|
hhmm, the forum seems to be adding unneccasary semi-colons ; to my post above.
|
|
|
swapacomm
|
Posted: 27 May 2015 01:41 PM |
# 6
|
|
|
How can I get this to output categories as well?
|
|
|
swapacomm
|
Posted: 27 May 2015 01:41 PM |
# 7
|
|
|
Specifically if I wanted to show cat names
|
|
|
Reinos
|
Posted: 28 May 2015 01:29 PM |
# 8
|
|
Developer
|
By default it output a category element with all the categories that are assigned to the entry
Best,
Rein
|
|
|
wuwongy
|
Posted: 02 June 2015 04:43 AM |
# 9
|
|
|
Hi Rein, how do we select output fields on parsed relationship data?
Thanks!
|
|
|
Reinos
|
Posted: 02 June 2015 12:57 PM |
# 10
|
|
Developer
|
Good question, suggestion?
|
|
|