Best Practice / Standard for API calls

rsummerell

Ross Summerell

Posted on August 31, 2018

Best Practice / Standard for API calls

Good day all,

I've been brain storming an issue I have and thought maybe someone could point out the best practice for my situation.

I have build a .Net Core 2 Restful API. Its still being pieced together but I am running into a 'issue' which I am not sure of which is the best solution.

When calling my https://apiURL.com/AddressBook

I then can sent through an array of parameters from

PageSize
PageNumber
SearchFor & SearchBy ( these go hand in hand as its the field to search by what value but will have a default )

EG: https://apiURL.com/AddressBook?pageNumber=1&Pagesize=500

I am extending this list

OrderBy

Filterfor & FilterBy

The problem is I don't know how to add these to the URL as well, as you can order by more then one column at once, as well as add multiple filters.

Would anyone have some suggestions?

💖 💪 🙅 🚩
rsummerell
Ross Summerell

Posted on August 31, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related