Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Network quickstart

A hostname of your own answering on a service, in a few calls.

A service is reachable on the platform's own hostname as soon as it is healthy. This takes a hostname of your own instead: the domain, the proof that it is yours, and the hostname that sends traffic to the service.

Today this runs on the management API

Domains and hostnames are managed through the project routes on this page, which is also what the console uses. The domains and routes collections of the API reference are not served at api.sylphx.com.

#1. Add the domain

A domain is the registered name you own, such as example.com, attached to a project and an environment type:

sylphx api POST /v1/projects/$PROJECT_ID/domains -d '{"apexDomain":"example.com","envType":"production"}'

The answer carries the domain's id. A domain held by another organization is refused, so the name you claim is yours alone.

#2. Attach a hostname to a service

A hostname under the domain, pointed at one service:

Shell
sylphx api POST /v1/projects/$PROJECT_ID/domains/$DOMAIN_ID/hostnames \
  -d '{"hostname":"shop.example.com","serviceId":"'$SERVICE_ID'","isPrimary":true}'

The answer's instruction says which DNS record to publish at your DNS provider. dnsStatus, edgeStatus and edgeSslStatus report whether the record was seen, whether the edge serves the name, and whether its certificate is issued.

#3. Check it

check reads your DNS records now instead of waiting for the next sweep:

Shell
sylphx api POST /v1/projects/$PROJECT_ID/domains/$DOMAIN_ID/hostnames/$HOSTNAME_ID/check

Certificates are issued and renewed for a verified hostname. Read everything attached so far with:

Shell
sylphx api GET /v1/projects/$PROJECT_ID/domains

redirectTo on a hostname sends it to another host, and DELETE /v1/projects/$PROJECT_ID/domains/$DOMAIN_ID/hostnames/$HOSTNAME_ID removes one.

#Next