Extension, Module

Archived
Forum
(read-only)

Rein de Vries does not actively monitor this forum
(but you can still get help from other EE users).


For official support, visit the official support site »

Webservice

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

You must be logged in to post.

Getting specific field data without all EE meta

Support (Resolved)

wuwongy
wuwongy

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
# 1
Developer
Reinos

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
# 2
wuwongy

Thanks Rein, your a star!

wuwongy
# 3
wuwongy

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
# 4
wuwongy

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
# 5
wuwongy

hhmm, the forum seems to be adding unneccasary semi-colons ; to my post above.

swapacomm
# 6
swapacomm

How can I get this to output categories as well?

swapacomm
# 7
swapacomm

Specifically if I wanted to show cat names

Reinos
# 8
Developer
Reinos

By default it output a category element with all the categories that are assigned to the entry

Best,
Rein

wuwongy
# 9
wuwongy

Hi Rein, how do we select output fields on parsed relationship data?
Thanks!

Reinos
# 10
Developer
Reinos

Good question, suggestion?