0

Hi I am using service module 7.x-3.12. I am able to fetch the node resource in index call on several different parameters and its working fine but I am stuck in a situation where I need to fetch the data in ascending order. But by default I am getting the data in DESC. Is there any way I can fetch the data in ascending order by providing a custom parameter say, sort_by.

2 Answers 2

1

It currently isn't possible. I have an issue and patch filed to make this a possibility. If you use the patch, it is possible using this query string:

?q=endpoint/taxonomy_term.json&fields=tid,name&options[orderby][name]=asc
0

Try Services Views Module

It has currently two features:

  • Create view based resource creating Services display in a view
  • Execute any view of the system via views resource call

With the help of this you can create a view of type service and you can add whatever fields, filters,sorting you need.

2
  • Be warned, despite being 'stable', I've had quite a lot of problems using that module. I've had to patch it up so much it doesn't much resemble the original any more
    – Clive
    Aug 6, 2015 at 13:36
  • @Bipin K Thanks! but I want to that is there any way to achive the same in custom module by altering the query or somethinkg like that Aug 6, 2015 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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