Example API introduction

I have a build a simple example API at example.phpsx.org with PSX. This API should showcase some features and help you to get started. The source is also available on GitHub. With this post i want to cover the functionality of the example.

Functionality

So basically the API is build around an simple database schema. There we have two API endpoints:

The first endpoint returns an collection of population entries and the second returns a single entry. You can also modify an entry through sending an POST, PUT or DELETE request to the collection endpoint. The example does not actually persist or modifies database entries but it returns an success message if the request format was valid. The documentation contains the schema format for each API endpoint and also request examples.

The example has also an REST console wherewith you can discover all available API endpoints.