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.
URL base https://cloud.yet.com.br/v1
As descrições dos endpoints estão em inglês.
O objeto
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/zonesEvery zone.
Requisição
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).
Requisição
curl https://cloud.yet.com.br/v1/dns/zones/{id} \
-H "Authorization: Bearer $YET_API_KEY"Create a zone
POST
/v1/dns/zonesPoint the domain’s registrar at its nameservers.
Quem: Cloud admin
Corpo
namestringobrigatório- The domain.
Requisição
curl -X POST https://cloud.yet.com.br/v1/dns/zones \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"name": "acme.dev"
}'Resposta · 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}/verifyAsks the domain’s nameservers again, now.
Quem: Cloud admin
Requisição
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}/recordsOne name’s values of one type.
Quem: Developer everywhere, or admin
Corpo
namestringobrigatóriowww,api.staging,*;@for the zone itself.typestringobrigatórioA,AAAA,CNAME,TXT,MX,SRV,CAAorNS.ttlnumber- Between 30 and 172800 seconds;
300unless set. valuesstring[]obrigatório- Its values.
Requisição
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.
Quem: Developer everywhere, or admin
Corpo
ttlnumber- Its TTL.
valuesstring[]obrigatório- Its values, whole.
Requisição
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.
Quem: Developer everywhere, or admin
Requisição
curl -X DELETE https://cloud.yet.com.br/v1/dns/zones/{id}/records/{record} \
-H "Authorization: Bearer $YET_API_KEY"Resposta · 204 Sem conteúdo
Delete a zone
DELETE
/v1/dns/zones/{id}Once no environment answers in it.
Quem: Cloud admin
Requisição
curl -X DELETE https://cloud.yet.com.br/v1/dns/zones/{id} \
-H "Authorization: Bearer $YET_API_KEY"Resposta · 204 Sem conteúdo