Hi,
I have created a CT with different fields (title, body, image, link, reference, file) and if I open a URL like http://myurl/node/2.json I can see everything. If I decide to see the list of all my nodes with all their fields with http://myurl/node.json I can see only some fields (nid, created, ...), but there are not my custom fields. Can you give me any suggestion?
Thank you very much.

Stefano

Comments

steva1982 created an issue. See original summary.

tyler.frankenstein’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

This is possible with a patch. There are two related issues to this:

With the patch you can retrieve a fully loaded entity via the index resource. Then you just need to specify that you'd like "infinite" results to be available:

drush vset services_node_index_page_size 0

Obviously be careful with this, because if someone were to try to load ALL nodes/comments/etc, you could easily run out of memory.

steva1982’s picture

Hi,
thank you for you suggestion. I have just applied the patch: https://github.com/signalpoint/services/commit/b3b0ebe7a26467c91d785c1e1...
Just a question: can you give me an example of the URL I should type? I can see the same output with all my custom fields with:
http://myurl/node.json?parameters[type]=page&pagesize=10&options[entity_...
http://myurl/node.json?parameters[type]=page&pagesize=10&options[entity_...
http://myurl/node.json?parameters[type]=page&pagesize=10&options[entity_...
...
and I don't understand if what is the value of "&options[entity_load]".
Thank you again.

Stefano

tyler.frankenstein’s picture

http://example.com/api/node.json?options[entity_load]=true

steva1982’s picture

ok, thank you for everything.

Stefano

tyler.frankenstein’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
mirakolous’s picture

StatusFileSize
new1.74 KB

Not resurrecting old issue, but the github repo moved so 404's for the patch. Uploading the patch here.

mirakolous’s picture

StatusFileSize
new3.81 KB

Ignore the last patch as it is completely irrelevant on this project and wrongfully uploaded. I grabbed the patch from github and re-rolled onto the latest stable branch.