Jump to content

RESTful APIs


Drongo_III

Recommended Posts

Hi Guys

 

I'm about to start a project building a lot of APIs.  I've built basic REST APIs in the past but I mostly made up the standards for the API.

 

I want to do this project properly from the start but I don't know whether there is an official  'standard' you should follow when creating a REST APIs?  Like JavaScript has ECMA but I can't seem to find an api governing body as such and to be honest I've never known of one even after many years being a dev.

 

Alternatively if that doesn't exist can anyone recommend good websites which highlight best practice?

 

Thanks,

 

Drongo

Link to comment
Share on other sites

There isn't one.

 

Understand the basic HTTP verbs:

- GET is for retrieving content without any other actions or side effects

- POST is for making changes

- PUT is also for making changes but "feels" more like putting or replacing content than causing it to be changed by some action; using POST for this stuff is fine too

There's also

- DELETE (obvious) which can be handled by POST

- others most people don't use

 

Then understand the HTTP status codes of which there are too many for me to list here.

 

Then try looking at other REST APIs to see what they do.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.