Download the PHP package codysseydev/argus-api without Composer
On this page you can find all versions of the php package codysseydev/argus-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codysseydev/argus-api
More information about codysseydev/argus-api
Files in codysseydev/argus-api
Package argus-api
Short Description JSON HTTP API exposing the codysseydev/argus queue-observability query service.
License MIT
Homepage https://github.com/codysseydev/argus-api
Informations about the package argus-api
Argus API (codysseydev/argus-api)
A JSON HTTP API over the codysseydev/argus queue-observability
core. It exposes the core's read and management services and nothing else: it holds
no storage knowledge, emits no SQL, and never touches a database. Dependency
direction is one way: React client -> this API -> codysseydev/argus -> storage.
Installation
Optionally publish an editable authorization provider:
Authentication and authorization
- Authentication is the app's job. Routes mount behind the middleware stack in
config('argus-api.middleware'), defaulting to['auth:sanctum']. Replace it with your own guard. Unauthenticated requests are rejected before any controller runs (401). - Authorization is this package's job, via four gates:
view-jobs,view-failures,manage-saved-searches,manage-alerts. Each defaults to allowing any authenticated user. Tighten by settingargus-api.authorization.allow_by_defaulttofalse, or by defining the gates in your own provider (see the published stub).
Envelope
Success:
Error:
Lists are always arrays; an empty result is data: [] with 200.
Endpoints
Full reference: docs/api.md.
All paths are relative to the configured prefix (default argus-api).
POST /search (gate: view-jobs)
Body: a filter object (see Filter below). Returns current-state jobs.
GET /jobs/{jobUuid}/history (gate: view-jobs)
Ordered lifecycle of one job. Unknown uuid → 404.
POST /failures (gate: view-failures)
Body: a filter object. Returns failures grouped by exception fingerprint.
Saved searches (gate: manage-saved-searches; results is view-jobs)
| Method | Path | Body | Returns |
|---|---|---|---|
| GET | /saved-searches |
— | { data: SavedSearch[], meta: { count } } |
| POST | /saved-searches |
{ name, filter } |
201 { data: SavedSearch } |
| GET | /saved-searches/{id} |
— | { data: SavedSearch } (404 if unknown) |
| PUT | /saved-searches/{id} |
{ name, filter } |
{ data: SavedSearch } |
| DELETE | /saved-searches/{id} |
— | 204 |
| GET | /saved-searches/{id}/results |
— | { data: JobSummary[], meta: { savedSearchId, count } } |
Alert rules (gate: manage-alerts)
| Method | Path | Body | Returns |
|---|---|---|---|
| GET | /saved-searches/{id}/alert-rules |
— | { data: AlertRule[], meta: { savedSearchId, count } } |
| POST | /saved-searches/{id}/alert-rules |
rule body | 201 { data: AlertRule } (404 if saved search unknown) |
| GET | /alert-rules |
— | { data: AlertRule[], meta: { count } } |
| GET | /alert-rules/{id} |
— | { data: AlertRule } (404 if unknown) |
| PUT | /alert-rules/{id} |
rule body | { data: AlertRule } |
| DELETE | /alert-rules/{id} |
— | 204 |
Rule body: { name, threshold, windowSeconds, cooldownSeconds, sinks: string[], enabled?: boolean }.
Status codes
200 reads/updates · 201 create · 204 delete · 403 gate denial · 404
unknown id/uuid · 422 validation.
TypeScript contract (Phase 5)
Development
Tests use in-memory fakes for all storage contracts, so no database is required.
A running Redis is required because ArgusServiceProvider opens a Redis buffer
connection at boot.
To develop against an unreleased local checkout of the core, wire a path repository temporarily (do not commit this change):
See RELEASING.md for full
details. Related packages: codysseydev/argus (core),
codysseydev/argus-ui (React UI).
All versions of argus-api with dependencies
codysseydev/argus Version ^0.1
illuminate/contracts Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/routing Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0