Ghost/core/server/api
2018-09-28 00:03:21 +05:30
..
shared Added empty api v2 + shared folder and README.md (#9920) 2018-09-28 00:03:21 +05:30
v0.1 Updated overrides config for api versions with v0.1 to deprecated (#9921) 2018-09-27 19:34:12 +02:00
v2 Added empty api v2 + shared folder and README.md (#9920) 2018-09-28 00:03:21 +05:30
index.js Moved api controllers into api/v0.1 (#9918) 2018-09-27 16:06:57 +02:00
README.md Added empty api v2 + shared folder and README.md (#9920) 2018-09-28 00:03:21 +05:30

API Versioning

Ghost supports multiple API versions. Each version lives in a separate folder e.g. api/v0.1, api/v2. Next to the API folders there is a shared folder, which the API versions use.

NOTE: v0.1 is deprecated and we won't touch this folder at all. The v0.1 folder contains the API layer which we have used since Ghost was born.

Stages

Each request goes through the following stages:

  • validation
  • input serialisation
  • permissions
  • query
  • output serialisation

The framework we are building pipes a request through these stages depending on the API controller implementation.

API Controller

A controller is no longer just a function, it's a set of configurations.

More is coming soon...