Web API Best Practices - .NET Framework

Web API Best Practices

STEVE SMITH | @ARDALIS | STEVE@

Learn More After Today

1) DevIQ

Core Quick Start

DEVINTFALL17 20% OFF!

2) Microsoft FREE eBook/Sample App

eShopOnWeb eCommerce Sample



3) Weekly Dev Tips Podcast / Newsletter



4) Contact me for mentoring/training for your company/team



Web API Design

Representational State Transfer (REST)

"An architectural style for building distributed systems based on hypermedia" Open standards-based Technology-agnostic Client issues a request to a URI that represents a resource;

Request verb that indicates the operation to perform on the resource. Request body includes the data required for the operation.

REST-based APIs are stateless; each request may be handled by a different server-side resource



URI Design Considerations

URI values should correspond to nouns

E.g. /customers, /authors, /orders

URI values should typically be plural (when referring to collections)

Again, /customers, /authors, /orders

Requests for individual resources should append an identifier:

Example: /customers/1, /orders/00234

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download