Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Im sorry this is so frustrating for you. Im the maintainer for services module and were really working on the documentation but I thought I would answer here to just get you moving along.</p> <p>The reason you are not getting any of the data you want is because the parameters you are passing are wrong.</p> <p>If you look at user_resource.inc index is defined as follows</p> <pre><code> 'index' =&gt; array( 'file' =&gt; array('type' =&gt; 'inc', 'module' =&gt; 'services', 'name' =&gt; 'resources/user_resource'), 'callback' =&gt; '_user_resource_index', 'args' =&gt; array( array( 'name' =&gt; 'page', 'optional' =&gt; TRUE, 'type' =&gt; 'int', 'description' =&gt; 'The zero-based index of the page to get, defaults to 0.', 'default value' =&gt; 0, 'source' =&gt; array('param' =&gt; 'page'), ), array( 'name' =&gt; 'fields', 'optional' =&gt; TRUE, 'type' =&gt; 'string', 'description' =&gt; 'The fields to get.', 'default value' =&gt; '*', 'source' =&gt; array('param' =&gt; 'fields'), ), array( 'name' =&gt; 'parameters', 'optional' =&gt; TRUE, 'type' =&gt; 'array', 'description' =&gt; 'Parameters', 'default value' =&gt; array(), 'source' =&gt; array('param' =&gt; 'parameters'), ), ), 'access arguments' =&gt; array('access user profiles'), 'access arguments append' =&gt; FALSE, ), </code></pre> <p>Notice the third argument, parameters. You can do all sorts of fun stuff with the index query as long as it is turned on, but what you havnt tried is ?parameters[name]=user Example below</p> <p>When I make a request to <a href="http://test/api/user?parameters[name]=gdsfgsdfgsdfg&amp;fields=name,uid" rel="nofollow noreferrer">http://test/api/user?parameters[name]=gdsfgsdfgsdfg&amp;fields=name,uid</a> I get returned </p> <pre><code>[ { "name":"gdsfgsdfgsdfg", "uid":"36", "uri":"http:\/\/test\/api\/user\/36" } ] </code></pre> <p>Notice i also added some fields, uid and name. Obviously these are optional but it shows you the power of the index query. The same applies to nodes.</p> <p>I hope this helps. <img src="https://i.stack.imgur.com/42i6v.jpg" alt="Fetcher"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload