# List the services

`GET https://api.mailmasker.org/api/v1/registry`

Every registered service, with its address, port and what it does.

- Who can use it: Any signed-in account
- Area: Services
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/list-services

Sorted by name. A service registered at more than one address appears once for each, the one heard from most recently first. `health_check_url` is the path at that address that says whether the service is up.

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/registry' \
  -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/registry',
    { 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 registry list
```

## Response

200 OK:

```json
[
  {
    "feature_name": "homelab-audit",
    "host": "192.0.2.10",
    "port": 2513,
    "health_check_url": "/health",
    "description": "Audit trail: drains api.audit_queue, serves /api/v1/audit/*"
  },
  {
    "feature_name": "homelab-drive",
    "host": "192.0.2.11",
    "port": 2501,
    "health_check_url": "/health",
    "description": "File storage web app + JSON API, serves /api/v1/drive/*"
  }
]
```
