enter image description here

D7 / Services 3.2

retrieve / create / update / delete are very straightforward, make senses to me that matching 'CRUD', I don't understand what 'index' here does?



'Index' in services module will list out an entity(node, users, taxonomy..) in descending Order of its created time, vid, name etc based on the arguments that are passed. The common arguments for the Index are

  1. page - Page number of results to return (in pages of 20).
  2. fields - The fields you want returned.
  3. parameters - An array containing fields and values used to build a sql WHERE clause indicating items to retrieve. (array)
  4. pagesize - number of items to be returned. (Integer)

    In case of retrieve, it returns the complete entity object of the passed 'entity_id'


Sample URLS for Index is

For documentation you can see Services: An API for remote applications.

  • How do I construct the 'index' argument in uri? e.g page argument. Is it something like: http://<domain>/<endpoint>/<resource>/page/3 ? Is there any documentation on the web? (i am having hard time searching for docs) – gilzero Nov 15 '12 at 5:58
  • @ gilzero I have updated the answer. – Dinesh Kumar Sarangapani Nov 15 '12 at 6:14
  • @DineshKumar Now if I want to create a pagination in js, I will need to know the total count of data. How can I find that? – esafwan Sep 18 '15 at 0:06

services module provides some endpoints with resources. index will return all the nodes depends on the resource you selected. in this case suppose node is a resource and URL looks like this - http://domain/endpoint/node with a GET Request will return all the nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.