Skip to main content
The Stratos Core API is a phpVMS 7 module that exposes the endpoints the Stratos desktop client needs: pilot authentication, reference data, and the flight lifecycle (start → update → complete → cancel). It’s required by every Stratos integration: everything else (the Stratos Logbook API and future modules) builds on top of it.

What it adds

The module mounts these endpoints under /api/stratos on your phpVMS install. All require a Bearer token (the pilot’s users.api_key) except the handshake and the credentials sign-in.
Every endpoint is pure phpVMS-native: pilots in users, flights in flights and acars, PIREPs in pireps, custom metadata in pirep_field_values. The module owns zero tables of its own: uninstalling it leaves your phpVMS database exactly as it was.

Install

You’ll need a working phpVMS 7 install with admin access.
1

Download the module

Grab the latest module.zip from the releases page.
2

Upload via the admin UI

In your phpVMS admin, navigate to Admin → Modules → Add New Module. Upload the module.zip you just downloaded. phpVMS will extract it into your modules/StratosCore/ directory automatically.
3

Enable the module

Back on the Modules list, find StratosCore and click Enable.
4

Clear caches (before phpVMS 7.0.10)

phpVMS 7.0.10 and newer flush the module caches when you install or enable a module, so skip this step.On an older phpVMS 7 release, the new module’s routes only appear once the module manifest cache’s 6-hour TTL expires. Flush it from Admin → Maintenance → Clear all caches, or from a shell on your phpVMS server:
5

Verify

Hit your handshake endpoint in a browser or with curl:
You should get a JSON response like:
If you get a 404 or the phpVMS welcome page, the caches are stale: use Admin → Maintenance → Clear all caches (or php artisan route:clear && php artisan optimize:clear) and check again.

Point your airline at it

In the Skyvex Software portal, open your airline’s Settings → Connection:
  • Stratos endpoint URL: your phpVMS URL plus /api/stratos, for example https://crew.yourva.com/api/stratos. Click Verify: Skyvex Software checks the handshake endpoint, and the address only goes live for pilots once it passes.
  • Sign-in: pilots use their phpVMS username and password by default. To use OAuth instead, fill in OAuth set-up and pass Test sign-in (see OAuth on your phpVMS install).
New airlines do this in the Connect step of the set-up journey.

Pilot authentication

Pilots authenticate to the Core API with their phpVMS-issued api_key. The flow is:
  1. Pilot signs into your phpVMS site, generates an API key on their profile page (or your VA does it for them on first onboarding).
  2. The Stratos desktop client either prompts the pilot for that key directly (credentials mode), or completes an OAuth flow that returns it (OAuth mode: recommended, see OAuth Setup).
  3. Every subsequent Stratos API call sends the key as Authorization: Bearer <api_key>.
The StratosAuth middleware resolves the key against the users.api_key column and attaches the user to the request. Downstream Stratos modules (such as the Stratos Logbook API) reuse the same middleware: pilots authenticate once.

Troubleshooting

Class "Modules\\StratosCore\\Providers\\..." not found after install

phpVMS caches the module manifest in bootstrap/cache/stratos_core_module.php and in Laravel’s main cache under the phpvms-modules key. If you installed the module but those caches are stale, phpVMS will try to instantiate provider classes from a path that doesn’t yet exist on disk. phpVMS 7.0.10 and newer flush them on install and enable, so this mostly affects older releases. Fix: Admin → Maintenance → Clear all caches, or:
If that’s not enough (rare: usually only when the module was previously installed at a different path), also delete bootstrap/cache/stratos_core_module.php manually and re-run the command.

Endpoints return 404 but the module shows as enabled

The route cache hasn’t picked up the new module (most often before phpVMS 7.0.10). Use Admin → Maintenance → Clear all caches, or run:
Then hit the handshake again.

Pilots get 401 with a valid API key

Confirm:
  • The Authorization header is exactly Bearer <key> (case-sensitive scheme, single space, no quotes around the key)
  • The key matches the value in users.api_key for the pilot
  • The pilot’s account is active (users.state = 1)
If the key is correct, check storage/logs/laravel.log for the auth attempt: StratosAuth logs failures with the offending header for diagnosis.

Updating

Releases go out via the GitHub release feed. To update an existing install:
  1. Download the new module.zip.
  2. Admin → Modules → Add New Module: upload it. phpVMS will overwrite the existing files in place; your modules.enabled row is preserved.
  3. Run php artisan optimize:clear.
Migrations (if any ever ship) auto-run on enable; the current release ships zero migrations because Core owns no tables.

Contributing

The repo accepts PRs. Bug reports go in Issues: please include the phpVMS version, PHP version, and a relevant snippet from storage/logs/laravel.log.