API Development in ASP.NET Core

Paths

API Development in ASP.NET Core

Authors: Shawn Wildermuth, Kevin Dockx, Roland Guijt

APIs are at the heart of today's connected applications. ASP.NET Core offers a multitude of choices for developing APIs. This path will help you learn about all of the choices,... Read more

What you will learn

  • REST principals
  • Building RESTful APIs using ASP.NET Core
  • Documenting APIs with OpenAPI/Swagger
  • Designing and building asynchronous APIs
  • Creating GraphQL APIs in ASP.NET Core

Pre-requisites

Knowledge of C# and ASP.NET Core MVC

Beginner

APIs are one of the most important building blocks of modern applications, and in this section, you will learn everything you need to know to build a successful RESTful API in ASP.NET Core.

Designing RESTful Web APIs

by Shawn Wildermuth

Aug 5, 2019 / 2h 7m

2h 7m

Start Course
Description

Too many APIs are just built on an as-needed basis. In this course, Designing RESTful Web APIs, you will design your API to meet your needs before you embark on implementing the service. First, you will explore the design philosophies of creating an API on top of REST without the dogma. Next, you will discover how to design APIs to take URIs, verbs, message bodies, versioning and security into account. Finally, you will examine how creating an API can stand up to the test of time instead of extending your proof of concept into a supported API you can't get rid of. By the end of this course, you will have complete understanding and knowledge to produce useful APIs for your project.

Table of contents
  1. Course Overview
  2. What Is REST?
  3. Designing a RESTful API
  4. Handling More Complex Scenarios in Your API
  5. Versioning Your API
  6. Locking Down Your API

Building a RESTful API with ASP.NET Core 3

by Kevin Dockx

Oct 10, 2019 / 5h 2m

5h 2m

Start Course
Description

In this course, you'll learn how to build a RESTful API with ASP.NET Core 3. Creating a truly RESTful API is quite different from creating a regular web API, but in this course, Building a RESTful API with ASP.NET Core 3 , you’ll learn how. You'll start by exploring how to interact with your API using the correct HTTP methods and status codes, and what method safety and idempotency are all about. Next, you'll learn how to validate input that’s sent to the API, and how to implement common features like filtering and searching. By the end this course, you’ll know all about REST constraints, what the advantages are, and how to implement them when building your API with ASP.NET Core 3.

Table of contents
  1. Course Overview
  2. Getting Started with REST
  3. Structuring and Implementing the Outer Facing Contract
  4. Getting Resources
  5. Filtering and Searching
  6. Creating Resources
  7. Validating Data and Reporting Validation Errors
  8. Updating Resources
  9. Deleting Resources

Implementing Advanced RESTful Concerns with ASP.NET Core 3

by Kevin Dockx

Oct 10, 2019 / 3h 52m

3h 52m

Start Course
Description

In this course, Implementing Advanced RESTful Concerns with ASP.NET Core 3, you'll learn how to implement advanced RESTful concerns with ASP.NET Core 3. Implementing these will lead to a better, more evolvable API. You'll learn how improve your API with paging, sorting, and data shaping. You'll also learn how to make your API more evolvable and robust with HATEOAS and advanced content negotiation, and how to deal with caching and concurrency. By the end this course, you’ll know all about REST constraints and you’ll end up with a level 3 RESTful API, which is the highest possible level of maturity.

Table of contents
  1. Course Overview
  2. Supporting Paging for Collection Resources
  3. Sorting Resource Collections
  4. Shaping Data
  5. Learning and Implementing HATEOAS
  6. Improving Reliability with Advanced Content Negotiation
  7. Getting Started with Caching Resources
  8. Supporting HTTP Cache for ASP.NET Core APIs
  9. Supporting Concurrency

Intermediate

Learn how to document your API for other developers with the course on OpenAPI/Swagger in this section. Then, learn how you can make sure your API is using asynchronous methods when you building your API.

Documenting an ASP.NET Core API with OpenAPI / Swagger

by Kevin Dockx

Feb 27, 2019 / 2h 51m

2h 51m

Start Course
Description

Documenting an API is often regarded as a tedious yet essential task. By using OpenAPI / Swagger, which integrates nicely with ASP.NET Core, you can take on this task. In this course, Documenting an ASP.NET Core API with OpenAPI / Swagger, you will gain the ability to document your API. First, you will learn how to add documentation for your API and add a UI that allows testing the API. Next, you will discover how to use attributes and conventions to improve the generated OpenAPI specification. Finally, you will explore how to deal with authentication, versioning and UI customization. When you are finished with this course, you will have the skills and knowledge of OpenAPI needed to correctly document your ASP.NET Core API.

Table of contents
  1. Course Overview
  2. Getting Started with OpenAPI / Swagger
  3. Documenting Your First API with OpenAPI / Swagger
  4. Using and Overriding Conventions for OpenAPI Generation
  5. Generating OpenAPI Specifications for Advanced Input and Output Scenarios
  6. Dealing with Different Versions and Protecting the Documentation
  7. Improving Your Documentation with Advanced Customization

Building an Async API with ASP.NET Core

by Kevin Dockx

Aug 14, 2018 / 2h 42m

2h 42m

Start Course
Description

Coding an asynchronous API comes with its own set of challenges. In this course, Building an Async API with ASP.NET Core, you will gain the ability to increase the scalability and performance of your API by writing async code. First, you will learn how asynchronous code actually works and what the advantages can be. Next, you will discover how to consume an EF Core data store asynchronously, how to expose that data via an API, and how to call into a service asynchronously. Finally, you will explore how to avoid common pitfalls when writing async code. When you’re finished with this course, you will have the skills and knowledge of asynchronous code needed to build a fully async API with ASP.NET Core.

Table of contents
  1. Course Overview
  2. Understanding the Power of Async
  3. Starting at the Bottom with Your Data Access Layer
  4. Asynchronously Reading Resources
  5. Asynchronously Manipulating Resources
  6. Understanding How to Integrate with External Services Using Async
  7. Avoiding Common Pitfalls

Using OpenAPI/Swagger for Testing and Code Generation in ASP.NET Core

by Kevin Dockx

Apr 12, 2019 / 1h 21m

1h 21m

Start Course
Description

Testing an API improves its reliability. Generating client-side code helps with getting started fast when building a client that consumes your API. OpenAPI can help with both. In this course, Using OpenAPI/Swagger for Testing and Code Generation in ASP.NET Core, you will gain the ability to test an API and generate code from it. First, you will learn what OpenAPI (Swagger) is. Next, you will discover how it can help with code generation. Finally, you will explore how to test your API, from manual to automated and command-line testing. When you’re finished with this course, you will have the skills and knowledge of .NET Core and OpenAPI needed to test your API and generate client-side code from it.

Table of contents
  1. Course Overview
  2. Getting Started with OpenAPI/Swagger
  3. Generating Client-side Code from an OpenAPI Specification
  4. Using OpenAPI to Test an API

Advanced

GraphQL is an exciting new alternative to RESTful APIs, and in this section, you will learn how you can build GraphQL APIs in ASP.NET Core.

Building GraphQL APIs with ASP.NET Core

by Roland Guijt

Jan 17, 2019 / 1h 23m

1h 23m

Start Course
Description

Having an API that doesn't use REST, and contains just one endpoint which has the ability to return data in a form that exactly suits the data-consuming application is very powerful. After watching this practical course, Building GraphQL APIs with ASP.NET Core, you’ll be ready to implement GraphQL in your ASP.NET Core API and write queries against it. First, you will explore how using GraphQL has lots of benefits compared to REST or SOAP. Next, you will very quickly understand the basic principles of GraphQL and shortly after, you can start building your own GraphQL endpoint in ASP.NET Core. Finally, you will discover how schemas provide metadata to clients, how queries are written for data retrieval and mutations. By the end of this course, you will be amazed by the ability that your GraphQL endpoint has to actively contact the client when changes occur with subscriptions.

Table of contents
  1. Course Overview
  2. Starting with GraphQL
  3. Creating a GraphQL API
  4. Consuming a GraphQL API
  5. Mutating Data with GraphQL
  6. Working with Subscriptions