By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,913 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,913 IT Pros & Developers. It's quick & easy.

Looking for advices for REST API

P: 1
I'm working on a web application and designing an API as REST API (However, sticking to the REST rules exactly isn't mandatory).

The application has a customers list.

My questions:

1. How to deal with several GET methods for one resource? For example, I have the address api/customers, and the API clients want to receive different information from it every time. A regular GET request to api/customers will get the customers list, but what if they want other information? List name, list status...?

2. Which HTTP method should I use for advancing to the next customer? Since this action is not idempotent, I can't use PUT. Would POST be a good way to do it? Or PATCH? Should it be in a different address? Such as api/customers/next, and then a POST method to this address will advance to the next customer?

Thank you
Apr 13 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.