The imperative mood expresses a command or instruction. In API naming, action verbs such as Create, Delete, and Archive tell the service what to do. section 3.3.2
REST standard verbs use the imperative mood. Non-RESTful or resource-oriented APIs can name actions as StandardVerb<Noun>, while indicative names ask about a resource instead of commanding a service. section 3.3.2
Use imperative action names when the API performs work:
- Name standard actions with forms such as CreateBook. section 3.3.2
- Treat names such as isValid() cautiously: they can appear local or stateless even when they trigger a remote call. section 3.3.2
- Recognize that question-like names also leave the response shape unclear, such as whether isValid() returns a Boolean or validation errors. section 3.3.2
