# List services on every node

`GET https://api.mailmasker.org/api/v1/admin/agent/status`

Every service each node declares, and whether its agent found it running.

- Who can use it: Site admins
- Area: Fleet and status
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/admin-service-status

One row per service per node, by service name, as each node last reported it. `expected` is 1 for a service the node's packages declare, and `actual` is 1 when the agent found it running (its system service active, or its port answering). For a proxy, `fronts` lists where it passes traffic on to.

## Good to know

- Yes-or-no fields come back as 1 or 0.
- A node that stops checking in keeps its last report, so its services can look fine long after it went quiet. Compare `checked_at` with the time, or see the fleet map, which marks such nodes stale.

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/admin/agent/status' \
  -H "Authorization: Bearer $TOKEN"
```

Perl:

```perl
use Mojo::Base -strict;
use Mojo::UserAgent;

my $ua  = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/admin/agent/status',
    { Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
```

homelab-cli:

```bash
homelab-cli admin fleet status
```

## Response

200 OK:

```json
[
  {
    "hostname": "prod-homelab09",
    "service_name": "pgbouncer",
    "package_name": "homelab-pgbouncer",
    "kind": "pgbouncer",
    "expected": 1,
    "actual": 1,
    "description": "PgBouncer connection pooler in front of the shared homelab database",
    "fronts": null,
    "checked_at": "2026-11-03 21:41:58.907311-06"
  },
  {
    "hostname": "prod-homelab03",
    "service_name": "webproxy-myaccount.example.com",
    "package_name": "homelab-webproxy",
    "kind": "http-proxy-vhost",
    "expected": 1,
    "actual": 1,
    "description": "HTTPS vhost for myaccount.example.com",
    "fronts": ["192.0.2.20:2503", "192.0.2.21:2503"],
    "checked_at": "2026-11-03 21:42:10.123456-06"
  }
]
```
