API Platform Con 2021: join us in Lille (France) or online on September 10 for our 1st international conference.
API Platform Con 2021: join us in Lille (France) or online on September 10 for our 1st international conference.
API Platform Con 2021: join us in Lille (France) or online on September 10 for our 1st international conference.

API Platform Documentation

The Distribution: Create Powerful APIs with Ease

  1. Getting Started With API Platform: Create Your API and Your Jamstack Site
    1. Introduction
    2. A Bookshop API
    3. Installing the Framework
    4. It's Ready
    5. Bringing your Own Model
    6. Plugging the Persistence System
    7. Validating Data
    8. Adding GraphQL Support
    9. The Admin
    10. A Next.js Web App
    11. Hooking Your Own Business Logic
    12. Other Features
    13. Screencasts
  2. Testing the API
    1. Creating Data Fixtures
    2. Writing Functional Tests
    3. Writing Unit Tests
    4. Additional and Alternative Testing Tools
    5. Using the API Platform Distribution for End-to-end Testing
  3. Debugging
    1. Xdebug
    2. Add a Development Stage to the Dockerfile
    3. Configure Xdebug with Docker Compose Override
    4. Troubleshooting

The API Component

  1. The API Platform Core Library
    1. Features
    2. Screencasts
  2. Getting started
    1. Installing API Platform Core
    2. Before Reading this Documentation
    3. Mapping the Entities
  3. General Design Considerations
  4. Extending API Platform
    1. Doctrine Specific Extension Points
    2. Leveraging the Built-in Infrastructure Using Composition
  5. Testing Utilities
    1. The Test HttpClient
    2. API Test Assertions
    3. HTTP Test Assertions
  6. Operations
    1. Enabling and Disabling Operations
    2. Configuring Operations
    3. Prefixing All Routes of All Operations
    4. Expose a model without any routes
  7. GraphQL Support
    1. Enabling GraphQL
    2. Changing Location of the GraphQL Endpoint
    3. GraphiQL
    4. GraphQL Playground
    5. Modifying or Disabling the Default IDE
    6. Request with application/graphql Content-Type
    7. Operations
    8. Queries
    9. Mutations
    10. Subscriptions
    11. Workflow of the Resolvers
    12. Events
    13. Filters
    14. Pagination
    15. Security
    16. Serialization Groups
    17. Exception and Error
    18. Name Conversion
    19. Custom Types
    20. Modify the Extracted Types
    21. Changing the Serialization Context Dynamically
    22. Export the Schema in SDL
    23. Handling File Upload
    24. Change Default Descriptions
  8. Data Providers
    1. Custom Collection Data Provider
    2. Custom Item Data Provider
    3. Injecting the Serializer in an ItemDataProvider
    4. Injecting Extensions (Pagination, Filter, EagerLoading etc.)
    5. Community Data Providers
  9. Data Persisters
    1. Creating a Custom Data Persister
    2. Decorating the Built-In Data Persisters
    3. Calling multiple DataPersisters
  10. Filters
    1. Doctrine ORM and MongoDB ODM Filters
    2. Elasticsearch Filters
    3. Serializer Filters
    4. Creating Custom Filters
    5. ApiFilter Annotation
  11. Subresources
    1. Using Serialization Groups
    2. Using Custom Paths
  12. The Serialization Process
    1. Overall Process
    2. Available Serializers
    3. The Serialization Context, Groups and Relations
    4. Using Serialization Groups
    5. Using Serialization Groups per Operation
    6. Embedding Relations
    7. Property Normalization Context
    8. Calculated Field
    9. Changing the Serialization Context Dynamically
    10. Changing the Serialization Context on a Per-item Basis
    11. Name Conversion
    12. Decorating a Serializer and Adding Extra Data
    13. Entity Identifier Case
    14. Embedding the JSON-LD Context
    15. Collection Relation
  13. Validation
    1. Validating Submitted Data
    2. Using Validation Groups
    3. Using Validation Groups on Operations
    4. Dynamic Validation Groups
    5. Sequential Validation Groups
    6. Error Levels and Payload Serialization
    7. Validation on Collection Relations
    8. Open Vocabulary Generated from Validation Metadata
    9. Specification property restrictions
  14. Security
    1. Executing Access Control Rules After Denormalization
    2. Hooking Custom Permission Checks Using Voters
    3. Configuring the Access Control Error Message
    4. Filtering Collection According to the Current User Permissions
    5. Disabling Operations
    6. Changing Serialization Groups Depending of the Current User
  15. Content Negotiation
    1. Configuring Formats Globally
    2. Configuring PATCH Formats
    3. Configuring Error Formats
    4. Configuring Formats For a Specific Resource or Operation
    5. Supporting Custom Formats
  16. Pagination
    1. Disabling the Pagination
    2. Changing the Number of Items per Page
    3. Changing Maximum Items Per Page
    4. Partial Pagination
    5. Cursor-Based Pagination
    6. Controlling The Behavior of The Doctrine ORM Paginator
    7. Custom Controller Action
  17. Deprecating Resources and Properties (Alternative to Versioning)
    1. Deprecating Resource Classes, Operations and Properties
    2. Setting the Sunset HTTP Header to Indicate When a Resource or an Operation Will Be Removed
  18. Overriding Default Order
  19. Performance and Cache
    1. Enabling the Built-in HTTP Cache Invalidation System
    2. Setting Custom HTTP Cache Headers
    3. Enabling the Metadata Cache
    4. Using PPM (PHP-PM)
    5. Doctrine Queries and Indexes
    6. Profiling with Blackfire.io
  20. Extensions
    1. Custom Doctrine ORM Extension
    2. Custom Doctrine MongoDB ODM Extension
    3. Custom Elasticsearch Extension
  21. Symfony Messenger Integration: CQRS and Async Message Processing
    1. Installing Symfony Messenger
    2. Dispatching a Resource through the Message Bus
    3. Registering a Message Handler
    4. Accessing the Data Returned by the Handler
    5. Detecting Removals
    6. Using Messenger with an Input Object
  22. Using Data Transfer Objects (DTOs)
    1. Specifying an Input or an Output Data Representation
    2. Updating a Resource with a Custom Input
    3. Disabling the Input or the Output
    4. Per Operation input and output
    5. Input/Output Metadata
    6. Using Objects As Relations Inside Resources
    7. Validating Data Transfer Objects
  23. OpenAPI Specification Support (formerly Swagger)
    1. Using the OpenAPI Command
    2. Overriding the OpenAPI Specification
    3. Using the OpenAPI and Swagger Contexts
    4. Changing the Name of a Definition
    5. Changing Operations in the OpenAPI Documentation
    6. Changing the Location of Swagger UI
    7. Using a custom Asset Package in Swagger UI
    8. Overriding the UI Template
    9. Compatibility Layer with Amazon API Gateway
    10. OAuth
    11. Info Object
  24. JSON Schema Support
    1. Generating a JSON Schema
    2. Generating a JSON Schema Programmatically
    3. Testing
  25. Creating Async APIs using the Mercure Protocol
    1. Installing Mercure Support
    2. Pushing the API Updates
    3. Dispatching Private Updates (Authorized Mode)
    4. Available Options
  26. Pushing Related Resources Using HTTP/2
  27. Errors Handling
    1. Converting PHP Exceptions to HTTP Errors
    2. Message Scope
  28. Using External Vocabularies
  29. Operation Path Naming
    1. Configuration
    2. Create a Custom Operation Path Resolver
  30. URL Generation Strategy
  31. Extending JSON-LD AND Hydra Contexts
    1. JSON-LD
    2. Hydra
  32. Identifiers
    1. Custom Identifier Normalizer
    2. Changing Identifier in a Doctrine Entity
    3. Supported Identifiers
  33. MongoDB Support
    1. Overview
    2. Enabling MongoDB Support
    3. Creating Documents
    4. Filtering
    5. Creating Custom Extensions
    6. Adding Execute Options
  34. Elasticsearch Support
    1. Overview
    2. Enabling Reading Support
    3. Creating Models
    4. Filtering
    5. Creating Custom Extensions
  35. Creating Custom Operations and Controllers
    1. Using Serialization Groups
    2. Retrieving the Entity
    3. Alternative Method
  36. The Event System
    1. Built-in Event Listeners
    2. Custom Event Listeners
  37. Handling File Upload
    1. Installing VichUploaderBundle
    2. Uploading to a Dedicated Resource
    3. Uploading to an Existing Resource with its Fields
  38. JWT Authentication
    1. Installing LexikJWTAuthenticationBundle
    2. Configuring the Symfony SecurityBundle
    3. Documenting the Authentication Mechanism with Swagger/Open API
    4. Testing
  39. Accept application/x-www-form-urlencoded Form Data
    1. Create your DeserializeListener Decorator
    2. Creating the Service Definition
  40. AngularJS Integration
    1. Restangular
    2. ng-admin
  41. FOSUserBundle Integration
    1. ⚠️ Deprecated: this integration is deprecated and will be removed in API Platform 3
    2. Installing the Bundle
    3. Enabling the Bridge
    4. Creating a User Entity with Serialization Groups
  42. NelmioApiDocBundle Integration
  43. Bootstraping the core library
  44. Configuration
    1. Global Resources Defaults

The Schema Generator Component

  1. The Schema Generator
    1. What Is Schema.org?
    2. Why Use Schema.org Data to Generate a PHP Model?
    3. Documentation
  2. Getting Started
    1. Installation
    2. Model Scaffolding
    3. Cardinality Extraction
  3. Configuration
    1. Customizing PHP Namespaces
    2. Forcing a Field Range
    3. Forcing a Field Cardinality
    4. Forcing a Relation Table Name
    5. Forcing (or Disabling) a Class Parent
    6. Forcing a Class to be Abstract
    7. Forcing a Nullable Property
    8. Forcing a Unique Property
    9. Making a Property Read-Only
    10. Making a Property Write-Only
    11. Forcing a Property to be in a Serialization Group
    12. Forcing an Embeddable Class to be Embedded
    13. Author PHPDoc
    14. Disabling Generators and Creating Custom Ones
    15. Skipping Accessor Method Generation
    16. Disabling the id Generator
    17. Generating UUIDs
    18. User submitted UUIDs
    19. Generating Custom IDs
    20. Disabling Usage of Doctrine Collections
    21. Changing the Field Visibility
    22. Generating @Assert\Type Annotations
    23. Forcing Doctrine Inheritance Mapping Annotation
    24. Interfaces and Doctrine Resolve Target Entity Listener
    25. Custom Schemas
    26. Checking GoodRelation Compatibility
    27. PHP File Header
    28. Full Configuration Reference

The Admin Component

  1. The API Platform Admin
    1. Features
  2. Getting Started
    1. Installation
    2. Creating the Admin
  3. Handling Relations
    1. Embedded Relations
    2. Display a Field of an Embedded Relation
    3. Using an Autocomplete Input for Relations
  4. Using the Schema.org Vocabulary
    1. Displaying Related Resource's Name Instead of its IRI
    2. Emails, URLs and Identifiers
  5. Validation
    1. Client-side Validation
    2. Server-side Validation
  6. Authentication Support
  7. Handling File Upload
  8. Performance
    1. Retrieve All Relations in One Request
  9. Customizing the Admin
    1. Customizing the Admin's Main Page and the Resource List
    2. Customizing the List View
    3. Customizing the Show View
    4. Customizing the Create Form
    5. Customizing the Edit Form
    6. Going Further
  10. Components
    1. Resource Components
    2. Page Components
    3. Hydra
    4. Other Components

The Client Generator Component

  1. The API Platform Client Generator
    1. Generated React and React Native Apps, Updated in Real Time
    2. Features
  2. Next.js Generator
    1. Install
    2. Generating Routes
    3. Starting the Project
    4. Screenshots
  3. Nuxt.js Generator
    1. Install
    2. Updating nuxtjs config
    3. Generating Routes
    4. Updating default layout
    5. Starting the Project
    6. Screenshots
  4. Vuetify Generator
    1. Install with Docker
    2. Install without Docker
    3. Generating the VueJS Web App
  5. Quasar Framework Generator
  6. React Generator
    1. Install
    2. Generating a Progressive Web App
    3. Screenshots
  7. React Native generator
    1. Install
    2. Generating a Native App
    3. Screenshots in iOS Simulator
  8. Vue.js Generator
  9. TypeScript Interfaces
    1. Example
  10. Troubleshooting
    1. Self-Signed TLS Certificate
    2. Authenticated API
    3. ApiDocumentation doesn't exist
    4. Cannot read property '@type'
    5. Dereferencing a URL did not result in a JSON object
    6. Docker distribution on Windows and hot-reloading

Deployment

  1. Deploying API Platform Applications
  2. Deploying with Docker Compose
    1. Deploying for Production
    2. Building and Pushing the Docker Images
    3. Pulling the Docker Images and Running the Services
  3. Deploying to a Kubernetes Cluster
    1. Preparing Your Cluster and Your Local Machine
    2. Creating and Publishing the Docker Images
    3. Deploying
    4. Initializing the Database
    5. Tiller RBAC Issue
  4. Deploying to Minikube
    1. Install Minikube
    2. Building and Pushing Docker Images
    3. Deploying
  5. Deploying an API Platform App on Heroku
  6. Implement Træfik Into API Platform Dockerized
    1. Basic Implementation
    2. Known Issues
    3. Going Further
    4. Multiple Instances
    5. More Generic Approach

General Information

  1. API Platform's Philosophy
  2. The Release Process
  3. API Platform for Enterprise
    1. Enterprise-ready open source software—managed for you
  4. Security Policy
    1. Reporting a Security Issue
    2. Resolving Process
    3. Security Updates With Tidelift
    4. Issue Severity
    5. Credits
  5. Troubleshooting
    1. Using Docker
    2. Using API Platform and JMS Serializer in the same project
    3. "upstream sent too big header while reading response header from upstream" NGINX 502 Error
  6. Contribution guides
  7. Contributor Code of Conduct
    1. Our Pledge
    2. Our Standards
    3. Our Responsibilities
    4. Scope
    5. Enforcement
    6. Attribution