Terminology
Caller
Caller is the term used to describe an external party, be it person or device, which is making a call to an API resource.
Method
Method is the term used to describe a HTTP method; often referred to as the verb. See accepted HTTP Methods.
Resource
Resource is the term used to describe a single URI exposed by the API. A resource will often be accompanied with other similar resources which vary by parameter. A caller is only able to call a single resource at any one time.
URI Description
A URI description will describe the outcome of a call to a particular resource using a particular method. The descriptions used within the API will always hint at the potential outcome of a valid call. For instance, a call of method GET to the resource /api/v1/cars/1 will have an outcome of the car resource being made available to the caller for the purpose of downloading; most likely in the call response. Such a call combination would have a URI description of "Get by ID". An interesting note to make, here, is that car is left out of the description because the resource is for "cars", thus making it redundant. However, where valid the ID will be prefixed with an appropriate noun.
Table 1. A sample car API
URI Description | HTTP method | Relative URI |
Get all | GET | /api/v1/cars |
Get by ID | GET | /api/v1/cars/id |
Get by manufacture ID | GET | /api/v1/cars/?manufactureId=1 |
Deletes by ID | DELETE | /api/v1/cars/id |
Get by name | GET | /api/v1/cars/?name=Mazda3 |