Skip to content

Instantly share code, notes, and snippets.

@vestingz
Last active April 30, 2020 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vestingz/3ab890d785b9fc5802c3f8ab97a00a3a to your computer and use it in GitHub Desktop.
Save vestingz/3ab890d785b9fc5802c3f8ab97a00a3a to your computer and use it in GitHub Desktop.
HTTPie for desec.io

Create new subdomain with A record

http 'https://desec.io/api/v1/domains/yourdomain.dedyn.io/rrsets/' \
Authorization:" Token <token>" \
Content-Type:" application/json" \
subname=<subdomain> \
type=A \
ttl=3600 \
records:='["1.2.3.4"]'

Update existing subdomain record

http PUT 'https://desec.io/api/v1/domains/yourdomain.dedyn.io/rrsets/<subdomain>/A/' \
Authorization:" Token <token>" \
Content-Type:" application/json" \
subname=<subdomain> \
type=A \
ttl=3600 \
records:='["5.6.7.8"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment