# Getting started ## Installing API Platform Core If you are starting a new project, the easiest way to get API Platform up is to install the [API Platform Distribution](../distribution/index.md). It ships with the API Platform Core library integrated with [the Symfony framework](https://symfony.com), [the schema generator](../schema-generator/), [Doctrine ORM](http://www.doctrine-project.org), [NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle) and [Behat](http://behat.org). Basically, it is a Symfony edition packaged with the best tools to develop a REST API and sensible default settings. Alternatively, you can use [Composer](http://getcomposer.org) to install the standalone bundle in an existing Symfony project: `composer require api-platform/core` Then, update your `app/AppKernel.php` file: ```php offers = new ArrayCollection(); // Initialize $offers as an Doctrine collection } // Adding both an adder and a remover as well as updating the reverse relation are mandatory // if you want Doctrine to automatically update and persist (thanks to the "cascade" option) the related entity public function addOffer(Offer $offer): void { $offer->product = $this; $this->offers->add($offer); } public function removeOffer(Offer $offer): void { $offer->product = null; $this->offers->removeElement($offer); } } ``` ```php description="An offer form my shop" iri="http://schema.org/Offer" /> ``` YAML: ```yaml # src/AppBundle/Resources/config/api_resources/resources.yml resources: AppBundle\Entity\Product: ~ AppBundle\Entity\Offer: shortName: 'Offer' # optional description: 'An offer from my shop' # optional iri: 'http://schema.org/Offer' # optional attributes: # optional pagination_items_per_page: 25 # optional ``` **You're done!** You now have a fully featured API exposing your entities. Run the Symfony app (`bin/console server:run`) and browse the API entrypoint at `http://localhost:8000/api`. Interact with the API using a REST client (we recommend [Postman](https://www.getpostman.com/)) or an Hydra aware application (you should give [Hydra Console](https://github.com/lanthaler/HydraConsole) a try). Take a look at the usage examples in [the `features` directory](https://github.com/api-platform/api-platform/tree/master/features).