What are REST resource naming conventions?

Answer

Good resource naming makes an API intuitive and self-documenting. Use nouns, not verbs — resources are things, not actions: /users not /getUsers. Use plural nouns for collections: /posts, /orders. Use hierarchical nesting for relationships: /users/{id}/posts. Use lowercase with hyphens (kebab-case) for multi-word names: /blog-posts, not /blogPosts or /blog_posts. Keep URLs short and meaningful: avoid deep nesting beyond two levels. For actions that do not map cleanly to CRUD (e.g., "publish a post"), use a noun-based sub-resource: POST /posts/{id}/publish. Avoid file extensions (.json) — use the Accept header for content negotiation instead.