Search code examples
apireststandards

Are there any additional granular level standards which can be used with RESTful APIs


I'm working on an HR product and we are building RESTful APIs in the backend to make them public for our partners to connect with the product. We are using REST standards as the architectural style for the APIs.

Recently we identified, some of the filter parameters are different than how it should be. Ex: In our api/employees endpoint, the date filters were implemented differently.

  1. Birth Day Filter accepted two array values such as from and to and it'll return employees who are having birth days between those two dates including from date and to date.

filters[birth_day][from] = 2000-01-01 filters[birth_day][to] = 2001-01-01

  1. Joined Date filter has two separate filters such as joined_date_from and joined_date_to and works similar to the above filter.

filters[joined_date_from] = 2000-01-01 filters[joined_date_from] = 2001-01-01

These type of mismatches are there in pagination and sorting options as well.

Is there any place which defines detailed level standards for ReSTful APIs which can be considered as industry standards.


Solution

  • I recommend 'REST API Design Rulebook' by Mark Masse. It contains a lot of useful info with explanation and examples.