Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.skyvexsoftware.com/llms.txt

Use this file to discover all available pages before exploring further.

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 (Logbook, screenshots, 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 login.
GET    /api/stratos/                          handshake — version + handler
POST   /api/stratos/pilot/login               credentials login
GET    /api/stratos/pilot/verify              authenticated pilot profile
GET    /api/stratos/pilot/statistics          flight hours, average landing rate, etc.
GET    /api/stratos/data/aircraft             fleet list
GET    /api/stratos/data/airports             airport directory
GET    /api/stratos/data/announcements        VA announcements feed
GET    /api/stratos/flights/bookings          pilot's current bids
GET    /api/stratos/flights/search            schedule search
POST   /api/stratos/flights/start             begin tracking a booked flight
POST   /api/stratos/flights/update            position / phase update
POST   /api/stratos/flights/complete          file PIREP
POST   /api/stratos/flights/cancel            cancel active flight
POST   /api/stratos/flights/unbook            drop a bid
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

From a shell on your phpVMS server:
php artisan optimize:clear
This flushes phpVMS’s module manifest cache so the new module’s routes become available immediately rather than after the cache’s 6-hour TTL expires.
5

Verify

Hit your handshake endpoint in a browser or with curl:
curl https://crew.youva.com/api/stratos/
You should get a JSON response like:
{"api_version": "0.1.1", "handler": "Stratos"}
If you get a 404 or the phpVMS welcome page, the cache clear didn’t take — try php artisan route:clear && php artisan cache:clear and check again.

Configure Skyvex to use it

On your Skyvex airline page, under Crew System Integration:
  • Stratos VA API base URL — set this to your phpVMS URL plus /api/stratos. e.g. https://crew.youva.com/api/stratos.
  • Auth method — choose Credentials if pilots will sign in with their phpVMS username + password, or OAuth if you’ve set up OAuth on your phpVMS install.
Save and click Test connection — Skyvex hits the handshake endpoint and reports back.

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 (Logbook, etc.) 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. Fix:
php artisan optimize:clear
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. Run:
php artisan route:clear
php artisan optimize:clear
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.