Reference
Outbound domains
The outbound domains endpoints of the HTTP API.
GET /outbound-domains
List the domains the server may fetch content from.
The list is empty until a person allows a domain. When SLASHOBSERVE_OUTBOUND_DOMAINS is set, managed_by is config, the entries come from the setting and carry no added_at or added_by. Entries are sorted by domain in byte order. Service accounts cannot call this endpoint.
Responses
| Status | Description | Body |
|---|---|---|
200 |
The allowed domains. | OutboundDomainList |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
500 |
The server failed to handle the request. | Error |
POST /outbound-domains
Allow a domain.
Any signed-in person may allow a domain; service accounts cannot. Write example.com for that host only, or *.example.com for its subdomains only (not example.com itself). The entry is stored in its lower case ASCII form. At most 100 domains can be allowed.
Request body
application/json, required.
| Field | Type | Description |
|---|---|---|
domain (required) |
string |
Responses
| Status | Description | Body |
|---|---|---|
201 |
The domain is allowed. | OutboundDomain |
400 |
The request is malformed or fails validation. | Error |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
409 |
The list is set by SLASHOBSERVE_OUTBOUND_DOMAINS (managed_by_config), or the domain is already allowed (domain_exists). |
Error |
413 |
The request body exceeds the size limit. | Error |
422 |
The domain is not a valid host name or pattern (invalid_domain), or 100 domains are already allowed (too_many_domains). |
Error |
500 |
The server failed to handle the request. | Error |
DELETE /outbound-domains/{domain}
Stop allowing a domain.
The path value is normalized like a new entry, so Example.COM removes example.com, and *.example.com removes the subdomain entry. Service accounts cannot.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain (required) |
path | string |
Responses
| Status | Description | Body |
|---|---|---|
204 |
The domain is no longer allowed. | |
401 |
Authentication is missing or invalid. | Error |
403 |
The caller is not allowed to perform the request; a role that is too low is code forbidden_role. |
Error |
404 |
The resource does not exist. | Error |
409 |
The request conflicts with existing state. | Error |
422 |
The value is not a valid host name or pattern (invalid_domain). |
Error |
500 |
The server failed to handle the request. | Error |
Generated from api/openapi.yaml at bac0fe39. Report a problem.