Api Platform conference
Register now

The API-first framework

Choose your favorite stack :

Getting started

API Platform Framework

The easiest way to create your web API

1

Install the framework

Install the API Platform Framework

Install

composer require api-platform/core
composer require api-platform/core
2

Define the resourcesas PHP classes, or using OpenAPI

Define the resources to expose

<?php
 
namespace App\ApiResource;
 
use ApiPlatform\Metadata\ApiResource;
 
#[ApiResource]
class Beer
{
    public int $id;
    public string $name;
}
<?php
 
namespace App\ApiResource;
 
use ApiPlatform\Metadata\ApiResource;
 
#[ApiResource]
class Beer
{
    public int $id;
    public string $name;
}
You get:
  • A stable state-of-the-art REST & GraphQL API

  • Automatic documentation OpenAPI, SwaggerUI, GraphiQL...

  • Support for standards and formats JSON-LD, Hydra, JSON:API

Alternatively, generate the classes from an existing RDF vocabulary.

API Platform automatically exposes production-grade HATEOAS API for you!

3

Plug your business & persistence logic

Plug your logic

class MyProcessor implements ProcessorInterface
{
// …
}
 
class MyProvider implements ProviderInterface
{
// …
}
class MyProcessor implements ProcessorInterface
{
// …
}
 
class MyProvider implements ProviderInterface
{
// …
}

The framework has been designed from the ground up to be usable from Rapid Application Development contexts to Domain-Driven Design or Clean Architecture-like approaches.

You can even mix both approaches!

...or use the native integration with popular persistence libraries!


API Platform can automatically retrieve, persist, paginate and validate data using the most popular database systems thanks to Eloquent or Doctrine.


PostgreSQL, MongoDB, ElasticSearch, SQLite, MySQL, MariaDB, SQL Server and Oracle are supported out of the box.

You can also make your own persistence system!

4

Customize!

Customize every single behavior thanks to our carefully designed extension points.


Client generator

Scaffold client apps

We provide a scaffolding with first-class support for Next.js, but don't want to decide for you which front-end framework you want to work with so skeletons for many other frontend frameworks are supported such as: Nuxt (Vue), Expo (React Native), Quasar, and many more...

Learn more

API Platform admin

Enjoy a beautiful B2B interface

API Platform Admin exposes your data through a beautiful UI.

Entirely customizable

Hydra and OpenAPI compatible

Built on top of Material UI and React Admin

100% no code

Automatic API discovery

Mercure.rocks

Go real time

API Platform automatically leverages the Mercure protocol to send updates made to your resources to all the connected clients. Updates are automatically broadcasted by the API component. The admin and all the generated client skeletons are also natively able to receive the event and update the UI automatically.

Learn more

References

They use API Platform

Free software
SiemensOrange VolvoUS GovernmentCartierBNPArtebeIN SPORTSFrance TVDecathlonRenaultVestiaire collective
See all our references

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2024 Kévin Dunglas

Sponsored by Les-Tilleuls.coop