Configuration overview
An APItoGo project is described by apitogo.config.json at the root of your folder. It has one
section per service. Leave a section out and that service is not part of the project.
apitogo.config.json
apitogo create and apitogo add write this file for you, and apitogo config changes it. You can
also edit it by hand: apitogo check tells you what is wrong before anything is deployed.
Sections
| Section | What it is | Reference |
|---|---|---|
version | Always 2 | |
project | The project's name, and its id once apitogo project create has linked it | Below |
portal | The developer portal: docs pages, home page, footer, logo, theme, console | Portal |
gateway | Your API behind the gateway: where it runs, its OpenAPI files, the rules | Gateway |
identity | Sign-in for the people who use your portal | Sign-in |
plans | The plans people pick, and Stripe for the paid ones | Plans |
The API page of the portal is made from the gateway's OpenAPI files. See API reference.
The folder
Everything the services use, besides the config, lives in the apitogo/ folder:
Code
apitogo/.state/ holds what the CLI generates and what it deployed. It ignores itself in git, and
you never edit it.
project
Code
name: the project's name, used as the portal's name unlessportal.namesays otherwise.id: the platform project this folder deploys to.apitogo project createwrites it, andapitogo project use <id>moves the folder to another project. See CLI commands.
Secrets
The config never holds a secret. Where a service needs one (a Stripe key, an OIDC client secret), it names a project secret:
Code
Store the value with apitogo secrets set STRIPE_API_KEY. Deploy asks for the secrets it needs and
stores them for you. A value written straight into the config is refused.
Check before you deploy
Code
check reads the config and the files it names, and says what is missing or wrong, with a hint for
each problem. deploy runs the same checks first.