Server implementation best practice

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
tantan
User
Posts: 1
Joined: Tue Aug 09, 2016 9:05 am

Server implementation best practice

Post by tantan »

Hi,
I posted my approach for server implementation best practice http://restafar.com/create-new-rest-server/.
to summarize:
- Use flat model and not complex paths, for example instead of /account/househols/user you can assume that user is always belongs to household that always belongs to account, so you can simply use /user.
- HTTP methods - don't use custom methods, just add the action you want to the path, it's more clear and works better with firewalls, for example, instead of PUT /user, you can use POST /user/add.
- Use HTTP error codes only for HTTP errors and return your applicative errors in the response, it will enable partial errors and warnings.

Will be glad for comments on my post.
Post Reply