PHPackages                             codysseydev/argus-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. codysseydev/argus-api

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

codysseydev/argus-api
=====================

JSON HTTP API exposing the codysseydev/argus queue-observability query service.

v0.2.0(1mo ago)04MITPHPPHP ^8.5CI passing

Since Jun 28Pushed 1mo agoCompare

[ Source](https://github.com/codysseydev/argus-api)[ Packagist](https://packagist.org/packages/codysseydev/argus-api)[ Docs](https://github.com/codysseydev/argus-api)[ RSS](/packages/codysseydev-argus-api/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)Dependencies (16)Versions (4)Used By (0)

Argus API (`codysseydev/argus-api`)
===================================

[](#argus-api-codysseydevargus-api)

[![Packagist Version](https://camo.githubusercontent.com/80cc0f01b1ac124d13f83ba2d7f920d9ce4edf0f03f76715167ae3ebfe29ca7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6479737365796465762f61726775732d617069)](https://packagist.org/packages/codysseydev/argus-api)[![Packagist Downloads](https://camo.githubusercontent.com/cc6af50ef461ea24344701d431a0d19757d8fab96f711c5724a0df3524d55aa8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6479737365796465762f61726775732d617069)](https://packagist.org/packages/codysseydev/argus-api)[![License](https://camo.githubusercontent.com/e131f6dfa866f947960d8a037e87fb30d0906bf63a8836d48f6ec32e47627b03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f6479737365796465762f61726775732d617069)](LICENSE)[![Tests](https://github.com/codysseydev/argus-api/actions/workflows/tests.yml/badge.svg)](https://github.com/codysseydev/argus-api/actions/workflows/tests.yml)

A JSON HTTP API over the [`codysseydev/argus`](../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
------------

[](#installation)

```
composer require codysseydev/argus-api
php artisan vendor:publish --tag=argus-api-config
```

Optionally publish an editable authorization provider:

```
php artisan vendor:publish --tag=argus-api-authorization
# then register App\Providers\ArgusApiAuthorizationServiceProvider
```

Authentication and authorization
--------------------------------

[](#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 setting `argus-api.authorization.allow_by_default` to `false`, or by defining the gates in your own provider (see the published stub).

Envelope
--------

[](#envelope)

Success:

```
{ "data": , "meta": { } }
```

Error:

```
{ "error": { "type": "validation|forbidden|not_found|unauthenticated", "message": "...", "details": { } } }
```

Lists are always arrays; an empty result is `data: []` with `200`.

Endpoints
---------

[](#endpoints)

Full reference: [docs/api.md](docs/api.md).

All paths are relative to the configured prefix (default `argus-api`).

### `POST /search` (gate: `view-jobs`)

[](#post-search-gate-view-jobs)

Body: a filter object (see Filter below). Returns current-state jobs.

```
{ "data": [ JobSummary, ... ], "meta": { "total": 42, "limit": 100, "offset": 0 } }
```

### `GET /jobs/{jobUuid}/history` (gate: `view-jobs`)

[](#get-jobsjobuuidhistory-gate-view-jobs)

Ordered lifecycle of one job. Unknown uuid → `404`.

```
{ "data": [ TransitionRecord, ... ], "meta": { "jobUuid": "...", "count": 3 } }
```

### `POST /failures` (gate: `view-failures`)

[](#post-failures-gate-view-failures)

Body: a filter object. Returns failures grouped by exception fingerprint.

```
{ "data": [ FailureGroup, ... ], "meta": { "count": 5 } }
```

### Saved searches (gate: `manage-saved-searches`; `results` is `view-jobs`)

[](#saved-searches-gate-manage-saved-searches-results-is-view-jobs)

MethodPathBodyReturnsGET`/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`)

[](#alert-rules-gate-manage-alerts)

MethodPathBodyReturnsGET`/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
------------

[](#status-codes)

`200` reads/updates · `201` create · `204` delete · `403` gate denial · `404`unknown id/uuid · `422` validation.

TypeScript contract (Phase 5)
-----------------------------

[](#typescript-contract-phase-5)

```
export type Iso8601 = string;
export type TransitionType = "queued" | "processing" | "processed" | "failed" | "released";
export type AlertState = "ok" | "breaching";

export interface Filter {
  jobClass?: string | null;
  queue?: string | null;
  tenantId?: string | null;
  status?: TransitionType | null;
  attemptMin?: number | null;
  attemptMax?: number | null;
  since?: Iso8601 | null;
  until?: Iso8601 | null;
  correlationKey?: string | null;
  correlationValue?: string | null;
  limit?: number;
  offset?: number;
}

export interface JobSummary {
  jobUuid: string;
  jobClass: string;
  queue: string;
  tenantId: string | null;
  status: string;
  attempts: number;
  dispatchedAt: Iso8601 | null;
  finishedAt: Iso8601 | null;
  durationMs: number | null;
  exceptionFingerprint: string | null;
  inFlight: boolean;
}

export interface TransitionRecord {
  jobUuid: string;
  sequence: number;
  transition: TransitionType;
  attempt: number;
  occurredAt: Iso8601;
  durationMs: number | null;
  exceptionFingerprint: string | null;
  exceptionMessage: string | null;
}

export interface FailureGroup {
  fingerprint: string;
  representativeMessage: string | null;
  count: number;
  firstSeen: Iso8601;
  lastSeen: Iso8601;
}

export interface SavedSearch {
  id: string;
  name: string;
  filter: Filter;
  createdAt: Iso8601;
  updatedAt: Iso8601;
}

export interface AlertRule {
  id: string;
  savedSearchId: string;
  name: string;
  threshold: number;
  windowSeconds: number;
  cooldownSeconds: number;
  sinks: string[];
  enabled: boolean;
  state: AlertState;
  lastNotifiedAt: Iso8601 | null;
  lastResultCount: number | null;
  lastEvaluatedAt: Iso8601 | null;
  createdAt: Iso8601;
  updatedAt: Iso8601;
}

export interface Envelope { data: T; meta: Record; }
export interface ApiError { error: { type: string; message: string; details: Record; }; }
```

Development
-----------

[](#development)

```
composer install
./vendor/bin/phpunit
./vendor/bin/pint
```

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):

```
composer config repositories.argus path ../argus
composer update codysseydev/argus
```

See [CONTRIBUTING.md](CONTRIBUTING.md) and [RELEASING.md](RELEASING.md) for full details. Related packages: [`codysseydev/argus`](../argus) (core), [`codysseydev/argus-ui`](../argus-ui) (React UI).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e34e2945fd77ef9892b864322166a5b4f06525d35495e970e15a1dca5ce5987?d=identicon)[davorminchorov](/maintainers/davorminchorov)

---

Top Contributors

[![davorminchorov-givebutter](https://avatars.githubusercontent.com/u/52748964?v=4)](https://github.com/davorminchorov-givebutter "davorminchorov-givebutter (28 commits)")[![davorminchorov](https://avatars.githubusercontent.com/u/6518995?v=4)](https://github.com/davorminchorov "davorminchorov (1 commits)")

---

Tags

apilaravelmonitoringqueuejobsobservability

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/codysseydev-argus-api/health.svg)

```
[![Health](https://phpackages.com/badges/codysseydev-argus-api/health.svg)](https://phpackages.com/packages/codysseydev-argus-api)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M218](/packages/laravel-mcp)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M158](/packages/laravel-cashier)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
