Skip to content

feat: add optional REST/JSON API with Bearer token authentication#62

Merged
houdaslassi merged 2 commits intomainfrom
feature/vantage-json-api
Apr 15, 2026
Merged

feat: add optional REST/JSON API with Bearer token authentication#62
houdaslassi merged 2 commits intomainfrom
feature/vantage-json-api

Conversation

@houdaslassi
Copy link
Copy Markdown
Collaborator

Adds optional HTTP endpoints that return JSON, for dashboards, scripts, and integrations. Naming reflects REST-style resources where it fits (/jobs, /jobs/{id}), plus a few action-style routes (stats, queue-depths, retry). This is not the JSON:API specification; responses use a simple { "data": …, "meta": … } shape.
Authentication is a Bearer token (vantage.api.token), separate from the Blade dashboard viewVantage Gate and session auth.

Expose JSON over HTTP for dashboards and integrations when
`vantage.api.enabled` is true, separate from the Blade dashboard Gate.
@houdaslassi houdaslassi requested a review from ansezz April 13, 2026 23:42
- Update env() baseline count from 13 to 16 to account for the three
  new calls added by the API config section
- Replace deprecated $request->get() with $request->query() throughout
  VantageApiController (Symfony 7.4 deprecation)
- Add @Property VantageJob|null $retriedFrom to VantageJob docblock
  so PHPStan can resolve the relationship property
- Remove redundant is_string() guard in retry() — job_class is already
  typed as string so the check always evaluates to true
@houdaslassi houdaslassi merged commit 0afdb12 into main Apr 15, 2026
10 checks passed
@houdaslassi houdaslassi self-assigned this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants