resource naming
The practice of naming API addresses with stable, plural nouns such as /tasks instead of verbs or table names such as /GetTasks.
In more detail
The HTTP method already carries the action, so a verb in the path duplicates it and exposes today’s function name. Keep spelling and case consistent, because many servers treat /Tasks and /tasks as different addresses.
Related terms
- resource — Anything an API gives a name to and lets clients work with, such as one task, a collection of tasks or a job.
- collection resource — A resource that holds a set of similar items, addressed with a plural noun such as /tasks.
- URI — A string that identifies a resource, written with a scheme and usually a path, such as https://api.example.com/tasks/1; every URL is a URI.
Taught in
- Naming Resources And Collections — Modern API Architecture: REST, GraphQL & gRPC