Cloud API

DNS

Domains whose records Cloud keeps: zones, and their record sets. Cloud keeps its own records for environments; the rest are the company’s.

Base URL https://cloud.yet.com.br/v1

The object

idstring
Its id.
namestring
The domain.
nameserversstring[]
Where its registrar has to point.
status"pending" | "active"
Active once they answer for it.

List zones

GET/v1/dns/zones

Every zone.

Request
curl https://cloud.yet.com.br/v1/dns/zones \
  -H "Authorization: Bearer $YET_API_KEY"

Get a zone

GET/v1/dns/zones/{id}

The zone (zone) and its records (records).

Request
curl https://cloud.yet.com.br/v1/dns/zones/{id} \
  -H "Authorization: Bearer $YET_API_KEY"

Create a zone

POST/v1/dns/zones

Point the domain’s registrar at its nameservers.

Who: Cloud admin

Body

namestringrequired
The domain.
Request
curl -X POST https://cloud.yet.com.br/v1/dns/zones \
  -H "Authorization: Bearer $YET_API_KEY" \
  -d '{
    "name": "acme.dev"
  }'
Response · 201
{
  "id": "zn_01J9",
  "name": "acme.dev",
  "nameservers": [
    "ns-1.awsdns-01.org",
    "ns-2.awsdns-02.com"
  ],
  "status": "pending"
}

Check its nameservers

POST/v1/dns/zones/{id}/verify

Asks the domain’s nameservers again, now.

Who: Cloud admin

Request
curl -X POST https://cloud.yet.com.br/v1/dns/zones/{id}/verify \
  -H "Authorization: Bearer $YET_API_KEY"

Create a record

POST/v1/dns/zones/{id}/records

One name’s values of one type.

Who: Developer everywhere, or admin

Body

namestringrequired
www, api.staging, *; @ for the zone itself.
typestringrequired
A, AAAA, CNAME, TXT, MX, SRV, CAA or NS.
ttlnumber
Between 30 and 172800 seconds; 300 unless set.
valuesstring[]required
Its values.
Request
curl -X POST https://cloud.yet.com.br/v1/dns/zones/{id}/records \
  -H "Authorization: Bearer $YET_API_KEY" \
  -d '{
    "name": "@",
    "type": "MX",
    "ttl": 3600,
    "values": [
      "10 mx1.acme.dev",
      "20 mx2.acme.dev"
    ]
  }'

Change a record

PUT/v1/dns/zones/{id}/records/{record}

Its TTL and values; its name and type are what it is.

Who: Developer everywhere, or admin

Body

ttlnumber
Its TTL.
valuesstring[]required
Its values, whole.
Request
curl -X PUT https://cloud.yet.com.br/v1/dns/zones/{id}/records/{record} \
  -H "Authorization: Bearer $YET_API_KEY"

Delete a record

DELETE/v1/dns/zones/{id}/records/{record}

Only the company’s own.

Who: Developer everywhere, or admin

Request
curl -X DELETE https://cloud.yet.com.br/v1/dns/zones/{id}/records/{record} \
  -H "Authorization: Bearer $YET_API_KEY"
Response · 204 No Content

Delete a zone

DELETE/v1/dns/zones/{id}

Once no environment answers in it.

Who: Cloud admin

Request
curl -X DELETE https://cloud.yet.com.br/v1/dns/zones/{id} \
  -H "Authorization: Bearer $YET_API_KEY"
Response · 204 No Content