Frontends
This guide explains how to list the Frontends available to your account.
Why this matters
- These are globally available ingress points you can bind Shares or Custom Frontends to.
- Use this list to choose a region/edge closest to your users.
- Use this to enumerate frontends available to a specific Frontdoor both Standard and Custom.
- Each entry provides hostname, scheme, and port.
- Use with Shares to expose services to the public.
Assumptions
- The examples assume you have a valid Bearer token. If you need help obtaining a token, see [./auth](Auth Guide).
- Base URL for all API calls is https://gateway.production.netfoundry.io/frontdoor
- Expected headers for all API calls:
- Authorization: Bearer YOUR_ACCESS_TOKEN
- Accept: application/hal+json or application/json
Operations
List frontends
Request example
curl -s \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json" \
https://gateway.production.netfoundry.io/frontdoor/3d6d2b6e-6c7a-4a7f-8c3d-9a9d2e1f0b1c/frontends
Example response
[
{
"id": "VNatzvdn",
"urlTemplate": "https://{token}.shares.netfoundry.io",
"publicName": "public"
},
{
"id": "bMTHPrtQ",
"urlTemplate": "https://{token}.gateway.customer.com",
"publicName": "gateway.customer.com"
}
]
Notes
- Combine with the Shares create operation by including the
id
entries under the "frontendIds" array to add the Share to a Frontend.
Technical Notes
Paths
- GET /account/frontends
Common errors
400 Bad Request (client error)
{
"error": "invalid_request",
"message": "Value for <property> must be of <type>"
}
Possible reasons include:
- Clock skew: If tokens seem instantly expired, check system time synchronization on the machine making requests.
- Token format: Authorization header must be exactly
Authorization: Bearer <token>
with a space after Bearer orAuthorization: Basic <username:token>
with a space after Basic and a color separator.
401 Unauthorized (missing/expired token)
{
"error": "unauthorized",
"message": "Bearer token is missing or invalid"
}
Possible reasons include:
- Clock skew: If tokens seem instantly expired, check system time synchronization on the machine making requests.
- Token format: Authorization header must be exactly
Authorization: Bearer <token>
with a space after Bearer orAuthorization: Basic <username:token>
with a space after Basic and a color separator.
403 Forbidden (not_authorized)
{
"error": "not_found",
"message": "Frontdoor 3d6d2b6e-6c7a-4a7f-8c3d-9a9d2e1f0b1c not found"
}
Possible reasons include:
- Invalid token: The token is not valid.
- The token does not grant access to the requested resource.
- Clock skew: If tokens seem instantly expired, check system time synchronization on the machine making requests.
- Token format: Authorization header must be exactly
Authorization: Bearer <token>
with a space after Bearer orAuthorization: Basic <username:token>
with a space after Basic and a color separator.