Vincent Amstoutz

API Platform: From Rest & GraphQL APIs to state-of-the-art standards in seconds

What if you could build a full-featured REST and GraphQL API, complete with documentation, in just seconds?

API Platform: From Rest & GraphQL APIs to state-of-the-art standards in seconds
#1about 3 minutes

Introduction to the API Platform framework

API Platform is an open-source PHP framework for Symfony and Laravel that follows semantic versioning and a stable release cycle.

#2about 3 minutes

Creating a simple book API in seconds

A step-by-step demonstration shows how to create a new Symfony project, add an API resource, and generate CRUD endpoints for a book entity.

#3about 4 minutes

Exploring core features and integrated standards

API Platform provides auto-generated documentation via OpenAPI, native GraphQL support, front-end integrations, and a schema generator for migrations.

#4about 3 minutes

How API Platform handles serialization and architecture

The framework uses the Symfony Serializer for data transformation and content negotiation, supporting architectures like CRUD, CQRS, and DDD.

#5about 3 minutes

Understanding supported data and error formats

API Platform supports various structured formats like JSON-LD and JSON API, patch formats like JSON Merge Patch, and standardized error formats like Problem Details.

#6about 1 minute

Adding a new custom data format

You can extend API Platform with unsupported formats by creating custom normalizer and encoder classes using Symfony's serialization component.

#7about 2 minutes

Configuring API Platform at global and local levels

The framework allows for both global configuration for project-wide settings and local configuration to customize specific resources and operations.

#8about 3 minutes

Implementing validation and security for your API

Leverage native validation from Symfony or Laravel and secure operations using roles, custom voters, and standard authentication methods like JWT and OAuth.

#9about 2 minutes

Customizing data retrieval with state providers

Go beyond default data sources like Doctrine or Eloquent by implementing custom state providers to fetch data from external APIs or other sources.

#10about 4 minutes

Customizing data persistence and filtering collections

Use state processors to customize data persistence, map data with DTOs, and apply powerful built-in or custom filters to your resource collections.

#11about 3 minutes

Generating and customizing API documentation

API Platform automatically generates interactive documentation using Swagger UI or Redoc, which can be customized by extending the OpenAPI factory.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles

From learning to earning

Jobs that call for the skills explored in this talk.