Building a RESTful API with ASP.NET Core
Building an API is one thing, but building a truly RESTful API is something different. In this course, you'll learn how to build one using ASP.NET Core 1 or 2.
What you'll learn
Hello! My name is Kevin Dockx, and welcome to Building a RESTful API with ASP.NET Core. In this course, you will learn how to build a RESTful API with ASP.NET Core, which is quite different from a regular web API. You will get there by learning about major topics like:
- How to correctly interact with your API by using the correct HTTP methods & status codes
- Method safety and idempotency
- Validation
- Common features like paging, sorting, filtering and data shaping
- Supporting HATEOAS, versioning, caching and concurrency
Before you begin, make sure you are already familiar with C# and know a thing or two about building APIs with ASP.NET Core.
I hope you’ll join me, and I look forward to helping you on your learning journey here at Pluralsight.
Table of contents
- Coming Up 1m
- Structuring Our Outer Facing Contract 8m
- Demo - Implementing the Outer Facing Contract (Part 1) 3m
- Working with Routing 2m
- Interacting with Resources Through HTTP Methods 3m
- Demo - Implementing the Outer Facing Contract (Part 2) 3m
- Outer Facing Model vs. Entity Model 2m
- Demo - Getting a Resource Collection 5m
- Demo - Introducing AutoMapper 4m
- Demo - Getting a Single Resource 3m
- The Importance of Status Codes 5m
- Demo - Returning Correct Status Codes 3m
- Demo - Handling Faults 6m
- Demo - Working with Parent/Child Relationships 10m
- Formatters and Content Negotiation 4m
- Demo - Working with Content Negotiation and Output Formatters 5m
- Summary 3m
- Coming Up 1m
- Method Safety and Method Idempotency 3m
- Demo - Creating a Resource 12m
- Demo - Creating a Child Resource 7m
- Demo - Creating Child Resources Together with a Parent Resource 5m
- Demo - Creating a Collection of Resources 4m
- Demo - Working with Array Keys and Composite Keys 8m
- Demo - Handling POST to a Single Resource 5m
- Demo - Supporting Additional Content-type Values and Input Formatters 2m
- Demo - Deleting a Resource 3m
- Demo - Deleting a Resource with Child Resources 2m
- Deleting Collection Resources 1m
- Summary 3m
- Coming Up 1m
- Demo - Updating a Resource (Part 1) 6m
- The Repository Pattern 3m
- Demo - Updating a Resource (Part 2) 5m
- Updating Collection Resources 1m
- Upserting 3m
- Demo - Upserting with PUT 4m
- Partially Updating a Resource 4m
- Demo - Partially Updating a Resource 7m
- Demo - Upserting with PATCH 3m
- HTTP Method Overview by Use Case 5m
- Summary 2m
- Coming Up 1m
- Paging Through Collection Resources 2m
- The Principle of Deferred Execution 2m
- Demo - Paging Through Collection Resources (Part 1) 8m
- Returning Pagination Metadata 3m
- Demo - Paging Through Collection Resources (Part 2) 11m
- Filtering and Searching 2m
- Demo - Filtering Collection Resources 3m
- Demo - Searching Through Collection Resources 3m
- Summary 1m
- Coming Up 1m
- Sorting Collection Resources 1m
- Demo - Sorting Collection Resources (Part 1) 3m
- Creating a Property Mapping Service 3m
- Demo - Creating a Property Mapping Service 4m
- Demo - Sorting Collection Resources (Part 2) 7m
- Demo - Taking Consumer Errors into Account When Sorting 4m
- Shaping Resources 1m
- Demo - Creating a Method to Shape Resources 5m
- Demo - Shaping Collection Resources 5m
- Demo - Camel-casing Dictionaries When Serializing to JSON 2m
- Demo - Shaping a Single Resource 5m
- Exploring Additional Options 1m
- Summary 1m
- Coming Up 1m
- HATEOAS and Content Negotiation 4m
- Demo - HATEOAS and Content Negotiation 4m
- Demo - Working Towards Self-discoverability with a Root Document 3m
- Revisiting Media Types 3m
- Versioning in a RESTful World 6m
- Demo - Media Types and Versioning 11m
- Supporting Multiple Media Types 3m
- Other Approaches and Options 2m
- Summary 2m
- Coming Up 1m
- Working with Caching 4m
- The Expiration Model 6m
- The Validation Model 8m
- Cache-control Directives 4m
- Supporting Cache Headers 2m
- Demo - Supporting HTTP Cache Headers 8m
- Cache Stores 3m
- Demo - Adding a Cache Store 2m
- Dealing with Concurrency in a RESTful World 3m
- Demo - Dealing with Concurrency 3m
- Summary 1m
- Coming Up 1m
- Rate Limiting and Throttling 2m
- Demo - Rate Limiting and Throttling 7m
- Demo - Testing our API with Postman 6m
- Automated Testing and Continuous Integration 2m
- Documenting our API 3m
- Working with OPTIONS 1m
- Demo - Supporting the OPTIONS Method 2m
- Working with HEAD 0m
- Demo - Supporting the HEAD Method 2m
- Summary 2m
Course FAQ
REST stands for "Representational State Transfer". To make an application program interface (API) RESTful means to use the correct HTTP methods and status codes for getting, updating, creating, and deleting resources.
You will learn:
- Validation and logging
- Creating or Updating
- Paging, sorting, filtering, data shaping
- To ensure our API is HATEOAS-enabled
- How to correctly use media types
- Versioning, caching, and handling concurrency
- Protecting and documenting the API
- And more
The biggest advantage of REST APIs is the amount of flexibility it provides in allowing us to take advantage of existing protocols, and it can be used for almost any protocol, especially HTTP.
This is precisely what we will be talking about in this course, so you'll just want to jump into the tutorial to start learning how.
You don't need to know anything about REST yet, but you should have a good knowledge of C# and some knowledge of ASP.NET Core. If you're not familiar with ASP.NET Core then you should check out this course on ASP.NET Core fundamentals.