This section discusses rules relating to the design of meaningful URI paths (scheme "://" authority "/" path [ "?" query ] [ "#" fragment ]) portion of the REST API URIs.
The following are the rules about URI paths:
- Use singular nouns for document names, for example, https://api-test.lufthansa.com/v1/profiles/customers/memberstatus.
- Use plural nouns for collections and stores:
- As controller names represent an action, use a verb or verb phrase for controller resources. An example would be https://api-test.lufthansa.com/v1/profiles/customers/memberstatus/reset.
- Do not use CRUD function names in URIs:
- Correct URI example: DELETE /users/1234
- Incorrect URIs: GET /user-delete?id=1234, GET /user-delete /1234, DELETE /user-delete /1234, and POST /users/1234/delete