Grapic dots

API Platform

Mike Milano

API Platform is a Symfony based framework for API-driven projects.

With a minimal amount of configuration after installation, you can have a fully functional REST server with an OpenAPI based Swagger front-end for exploring the API.

As if that wasn’t enough, with a few more lines of config, you expose your data with a GraphQL API, including a UI for self-discovery and testing queries.

Configuration

For configuration, you have a choice between: - Annotation (in the Model classes) - YAML - XML

While it’s easy to get started, complex requirements will demand complicated configuration.

Features

Besides the REST and GraphQL APIs, other features include:

  • Native support for JSON-LD, GraphQL, JSONAPI, HAL, raw JSON, XML, YAML and CSV
  • Granular control over filters and sorting
  • Symfony-based access control for an entire resource, or a particular method
  • Pagination
  • Serialization groups: The ability to define property groups so subsets of properties can be requested instead of all properties
  • Advanced error handling
  • Doctrine extension integration for dynamically extending queries
  • FOSUserBundle integration
  • JWT Authentication (Including the ability to view Swagger UI based on a specific token)
  • Data Transfer Objects (DTO) for custom operations

Conclusion

Without spending a significant amount of time evaluating the platform, developers may think their API project is too complicated for anything but a custom build. I know I did. The truth is, however, that highly customized specs have been accounted for and API Platform integrates elegantly with the ORM layer and Symfony, preserving the control you have over any custom API you would be building otherwise.

API Platform is mature, stable, well documented, and has a healthy community between Slack and Stackoverflow. If you’re building API driven applications, evaluating API Platform as a solution is a must!

8 Reasons Why Standardizing on Drupal is the Right Choice for Enterprise.
Read about it in this free white paper.

Download for Free Now!