Introduction
The power of RESTful APIs
()
What you should know
()
Example API introduction
()
1. REST API Concepts
What is REST?
()
REST vs. RPC
()
Self-documentation and HATEOAS
()
HTTP methods
()
Full and partial updates
()
Returning JSON
()
The Ion hypermedia type
()
2. Build a Basic API
Create a new project
()
Configure MVC
()
Create a root controller
()
Test with Postman
()
Route to controllers with templates
()
Introduction to OpenAPI
()
Add NSwag to the project
()
3. Versioning and Errors
Approaches to API versioning
()
Add versioning support
()
Serialize exceptions as JSON
()
4. Secure the API
Transport security in ASP.NET Core
()
Require HTTPS
()
Test HTTPS locally
()
How CORS works
()
Add CORS middleware
()
5. Represent Resources
Create a resource class
()
Load data from configuration
()
Return data from a controller
()
Set up an in-memory database
()
Create data model classes
()
Seed the database with test data
()
Return a resource from a controller
()
Move data access to a service
()
Map models automatically
()
6. Represent Links
Create a Link class
()
Rewrite Links with a filter
()
Rewrite resource HREFs
()
7. Represent Collections
Create a Collection class
()
Return all resources in a collection
()
Add pagination
()
Paging defaults and validation
()
Add navigation to paged collections
()
8. Sorting Collections
Design collection sort
()
Add sort attributes
()
Validate sort parameters
()
Build sort expressions dynamically
()
Add a default sort term
()
9. Searching Collections
Design collection search
()
Add search attributes
()
Validate search parameters
()
Build search expressions dynamically
()
Extend search to other types
()
Add comparison operators
()
10. Forms and Modifying Data
Forms in Ion
()
Create a POST action
()
Delete a resource
()
Serialize the form metadata
()
Discoverable queries using forms
()
11. Caching and Compression
Compress responses
()
How HTTP caching works
()
Add the Cache-Control header
()
Support the ETag header
()
Add server-side caching
()
12. Authentication and Authorization
How HTTP authentication works
()
Authentication for REST APIs
()
Add Identity
()
Add a test user
()
Create a users collection
()
Create a registration route
()
Add OpenIddict
()
Add a token endpoint
()
Create a UserInfo route
()
More about OpenID Connect
()
Authorization using policies
()
Ex_Files_RESTful_ASP_NET.zip
(5.3 MB)