Examples
https://www.example.com/api/v1/topics
https://www.example.com/api/v1/users
https://www.example.com/api/v1/articles
Examples
https://www.example.com/api/v1/users/topics
https://www.example.com/api/v1/createTopic
https://www.example.com/api/v1/articles/new
Use HTTP methods as verbs for actions together with correct HTTP status response codes.
Action Method example URL Response
-----------------------------------------------
Create POST /articles 201 CREATED + Location header with /articles/{id}
Read GET /articles/{id} 200 OK
Update PUT /articles/{id} 200 OK
Delete DELETE /articles/{id} 205 NO CONTENT
Partial update PATCH /articles/{id} 200 OK
400 Bad Request with detailed error message in response body
401 Unauthorized
403 Forbidden
404 Not Found
415 Unsupported Media Type
Use JSON wherever you can in requests and response content, thus content type should be:
Content-type: application/json; charset=utf-8
Date values should be formatted in ISO 8601 zulu time or Unix time in milliseconds since 1. Jan 1970 UTC.
YYYY-MM-DD
YYYY-MM-DDThh:mm:ss.SSSZ