Roadmap › ASP.NET Core Web API & REST › Module: REST Fundamentals
Lessons in this course (15)

1. REST principles and resource design

Basic★ Must knowLesson 1 of 15
ActionMethodURISuccess status
ListGET/api/orders?status=open&page=2200
Get oneGET/api/orders/42200 / 404
CreatePOST/api/orders201 + Location header
ReplacePUT/api/orders/42200 / 204
Partial updatePATCH/api/orders/42200 / 204
DeleteDELETE/api/orders/42204
Sub-resourceGET/api/customers/7/orders200

Guidelines: nouns not verbs (/orders, not /getOrders), plural collections, hierarchy for relationships, query string for filtering/sorting/paging, consistent casing (kebab-case paths, camelCase JSON), version the API, use standard status codes.

Idempotent methods give the same result if repeated: GET, PUT, DELETE, HEAD, OPTIONS. Safe methods don't change state: GET, HEAD, OPTIONS. POST is neither; PATCH is not guaranteed idempotent.