Automates records creation, modification and deletion.

Base URL https://api.gslb.me/2.0. All requests require HTTP Basic authentication; set Accept to application/json or application/xml. Try these calls in the Postman collection.

Create zone records

POSThttps://api.gslb.me/2.0/record/{zone_name}

Adds new records to an existing zone. In order to make the newly added records active, the zone must be committed.

Path parameters

ParameterExampleDescription
{zone_name}mydomain.comName of the zone (domain)

Request body

Send a JSON object (Content-Type: application/json) with these fields; the full request is shown below.

FieldExampleNotes
records[].name201803._domainkeyRecord name; “@” is the zone apex
records[].typeTXTRecord type, e.g. A, TXT, SSHFP
records[].valuev=DKIM1%3B%20h=sha256%3B%20k=rsa%3B%20p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2v47dnlz4+o8kwUJ8oU02YO29F8KsmUgMh9Mnl5UJetgw0n%2FuIombRCkN1XaVeS3w706i85WCfStQgnzl1KewsSriwdOTo5HQ3PM5RfHrVXduBzc4vCaVvhMCQ2zK%2F0BiDM%2FjrqMh1ldD4zRA82AKbvyLHwdDzhiIIHRT0slvVeqTKyR%2F5D5cWmuki3wno15n7Bvvds3WWxwuWmOe3RH0+pQNWQMeSDsPb6ULPquL7Phg9mNX6SFoPyA29tyTkxXe9d6pvQyVCbLJ15Se3uzOAxCsrUyLOYgg%2FEAcA8pkZRXeYlFOF%2FXeendHlbCnWBczJfXyef+lJk8QbmWe%2FAWCwIDAQABRecord value, coherent with the record type
records[].ttl300Record TTL, in seconds

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X POST "https://api.gslb.me/2.0/record/mydomain.com" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "records": [
    {
      "name": "201803._domainkey",
      "type": "TXT",
      "value": "v=DKIM1%3B%20h=sha256%3B%20k=rsa%3B%20p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2v47dnlz4+o8kwUJ8oU02YO29F8KsmUgMh9Mnl5UJetgw0n%2FuIombRCkN1XaVeS3w706i85WCfStQgnzl1KewsSriwdOTo5HQ3PM5RfHrVXduBzc4vCaVvhMCQ2zK%2F0BiDM%2FjrqMh1ldD4zRA82AKbvyLHwdDzhiIIHRT0slvVeqTKyR%2F5D5cWmuki3wno15n7Bvvds3WWxwuWmOe3RH0+pQNWQMeSDsPb6ULPquL7Phg9mNX6SFoPyA29tyTkxXe9d6pvQyVCbLJ15Se3uzOAxCsrUyLOYgg%2FEAcA8pkZRXeYlFOF%2FXeendHlbCnWBczJfXyef+lJk8QbmWe%2FAWCwIDAQAB",
      "ttl": "300"
    },
    {
      "name": "dummyrecord",
      "type": "A",
      "value": "11.22.33.44",
      "ttl": "60"
    }
  ]
}'
Python
import requests

r = requests.post(
    "https://api.gslb.me/2.0/record/mydomain.com",
    auth=("username@mydomain.com", "your-password"),
    headers={"Accept": "application/json", "Content-Type": "application/json"},
    json={
        "records": [
            {
                "name": "201803._domainkey",
                "type": "TXT",
                "value": "v=DKIM1%3B%20h=sha256%3B%20k=rsa%3B%20p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2v47dnlz4+o8kwUJ8oU02YO29F8KsmUgMh9Mnl5UJetgw0n%2FuIombRCkN1XaVeS3w706i85WCfStQgnzl1KewsSriwdOTo5HQ3PM5RfHrVXduBzc4vCaVvhMCQ2zK%2F0BiDM%2FjrqMh1ldD4zRA82AKbvyLHwdDzhiIIHRT0slvVeqTKyR%2F5D5cWmuki3wno15n7Bvvds3WWxwuWmOe3RH0+pQNWQMeSDsPb6ULPquL7Phg9mNX6SFoPyA29tyTkxXe9d6pvQyVCbLJ15Se3uzOAxCsrUyLOYgg%2FEAcA8pkZRXeYlFOF%2FXeendHlbCnWBczJfXyef+lJk8QbmWe%2FAWCwIDAQAB",
                "ttl": "300"
            },
            {
                "name": "dummyrecord",
                "type": "A",
                "value": "11.22.33.44",
                "ttl": "60"
            }
        ]
    },
)
print(r.status_code, r.json())
JavaScript
const res = await fetch("https://api.gslb.me/2.0/record/mydomain.com", {
  method: "POST",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "records": [
      {
        "name": "201803._domainkey",
        "type": "TXT",
        "value": "v=DKIM1%3B%20h=sha256%3B%20k=rsa%3B%20p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2v47dnlz4+o8kwUJ8oU02YO29F8KsmUgMh9Mnl5UJetgw0n%2FuIombRCkN1XaVeS3w706i85WCfStQgnzl1KewsSriwdOTo5HQ3PM5RfHrVXduBzc4vCaVvhMCQ2zK%2F0BiDM%2FjrqMh1ldD4zRA82AKbvyLHwdDzhiIIHRT0slvVeqTKyR%2F5D5cWmuki3wno15n7Bvvds3WWxwuWmOe3RH0+pQNWQMeSDsPb6ULPquL7Phg9mNX6SFoPyA29tyTkxXe9d6pvQyVCbLJ15Se3uzOAxCsrUyLOYgg%2FEAcA8pkZRXeYlFOF%2FXeendHlbCnWBczJfXyef+lJk8QbmWe%2FAWCwIDAQAB",
        "ttl": "300"
      },
      {
        "name": "dummyrecord",
        "type": "A",
        "value": "11.22.33.44",
        "ttl": "60"
      }
    ]
  })
});
console.log(res.status, await res.json());

Example response

200 OK Create zone records

{
  "message": "Done",
  "returncode": "0"
}

Modify zone records

PUThttps://api.gslb.me/2.0/record/{zone_name}

Modifies existing zone records. In order to make the modified records active, the zone must be committed.

Path parameters

ParameterExampleDescription
{zone_name}mydomain.comName of the zone (domain)

Request body

Send a JSON object (Content-Type: application/json) with these fields; the full request is shown below.

FieldExampleNotes
records[].id7555Record id, as returned by Get zone records
records[].name@Record name; “@” is the zone apex
records[].readonlyfalseSet to “true” on records managed by GSLB.me (for example the zone NS records)
records[].ttl30Record TTL, in seconds
records[].typeSSHFPRecord type, e.g. A, TXT, SSHFP
records[].value4 2 9db8c309c9a27f93e2a096aec7771f7a4d0b6f5edddf520db2728ceff0c89d05Record value, coherent with the record type

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X PUT "https://api.gslb.me/2.0/record/mydomain.com" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "records": [
    {
      "id": "7555",
      "name": "@",
      "readonly": "false",
      "ttl": "30",
      "type": "SSHFP",
      "value": "4 2 9db8c309c9a27f93e2a096aec7771f7a4d0b6f5edddf520db2728ceff0c89d05"
    }
  ]
}'
Python
import requests

r = requests.put(
    "https://api.gslb.me/2.0/record/mydomain.com",
    auth=("username@mydomain.com", "your-password"),
    headers={"Accept": "application/json", "Content-Type": "application/json"},
    json={
        "records": [
            {
                "id": "7555",
                "name": "@",
                "readonly": "false",
                "ttl": "30",
                "type": "SSHFP",
                "value": "4 2 9db8c309c9a27f93e2a096aec7771f7a4d0b6f5edddf520db2728ceff0c89d05"
            }
        ]
    },
)
print(r.status_code, r.json())
JavaScript
const res = await fetch("https://api.gslb.me/2.0/record/mydomain.com", {
  method: "PUT",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "records": [
      {
        "id": "7555",
        "name": "@",
        "readonly": "false",
        "ttl": "30",
        "type": "SSHFP",
        "value": "4 2 9db8c309c9a27f93e2a096aec7771f7a4d0b6f5edddf520db2728ceff0c89d05"
      }
    ]
  })
});
console.log(res.status, await res.json());

Example response

200 OK Modify zone records

{
  "message": "Done",
  "returncode": "0"
}

Get zone records

GEThttps://api.gslb.me/2.0/record/{zone_name}

Retrieves a zone records

Path parameters

ParameterExampleDescription
{zone_name}mydomain.comName of the zone (domain)

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X GET "https://api.gslb.me/2.0/record/mydomain.com" \
  -H "Accept: application/json"
Python
import requests

r = requests.get(
    "https://api.gslb.me/2.0/record/mydomain.com",
    auth=("username@mydomain.com", "your-password"),
    headers={"Accept": "application/json"},
)
print(r.status_code, r.json())
JavaScript
const res = await fetch("https://api.gslb.me/2.0/record/mydomain.com", {
  method: "GET",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json"
  }
});
console.log(res.status, await res.json());

Example responses

200 OK Get zone records – more records

{
  "rrset": [
    {
      "id": "7552",
      "name": "@",
      "readonly": "true",
      "ttl": "86400",
      "type": "NS",
      "value": "ns1.gslb.me."
    },
    {
      "id": "7553",
      "name": "@",
      "readonly": "true",
      "ttl": "86400",
      "type": "NS",
      "value": "ns2.gslb.me."
    },
    {
      "id": "7554",
      "name": "201803._domainkey",
      "readonly": "false",
      "ttl": "300",
      "type": "TXT",
      "value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2v47dnlz4 o8kwUJ8oU02YO29F8KsmUgMh9Mnl5UJetgw0n/uIombRCkN1XaVeS3w706i85WCfStQgnzl1KewsSriwdOTo5HQ3PM5RfHrVXduBzc4vCaVvhMCQ2zK/0BiDM/jrqMh1ldD4zRA82AKbvyLHwdDzhiIIHRT0slvVeqTKyR/5D5cWmuki3wno15n7Bvvds3WWxwuWmOe3RH0 pQNWQMeSDsPb6ULPquL7Phg9mNX6SFoPyA29tyTkxXe9d6pvQyVCbLJ15Se3uzOAxCsrUyLOYgg/EAcA8pkZRXeYlFOF/XeendHlbCnWBczJfXyef lJk8QbmWe/AWCwIDAQAB"
    },
    {
      "id": "7555",
      "name": "dummyrecord",
      "readonly": "false",
      "ttl": "60",
      "type": "A",
      "value": "11.22.33.44"
    }
  ]
}

200 OK Get zone records

{
  "rrset": [
    {
      "id": "7552",
      "name": "@",
      "readonly": "true",
      "ttl": "86400",
      "type": "NS",
      "value": "ns1.gslb.me."
    },
    {
      "id": "7553",
      "name": "@",
      "readonly": "true",
      "ttl": "86400",
      "type": "NS",
      "value": "ns2.gslb.me."
    }
  ]
}

Delete zone records

DELETEhttps://api.gslb.me/2.0/record/{zone_name}

Deletes one or more records in a zone. In order to make changes active, the zone must be committed.

Path parameters

ParameterExampleDescription
{zone_name}mydomain.comName of the zone (domain)

Request body

Send a JSON object (Content-Type: application/json) with these fields; the full request is shown below.

FieldExampleNotes
records[].id7554Record id, as returned by Get zone records

Example request

cURL
curl -u "username@mydomain.com:your-password" \
  -X DELETE "https://api.gslb.me/2.0/record/mydomain.com" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "records": [
    {
      "id": "7554"
    },
    {
      "id": "7555"
    }
  ]
}'
Python
import requests

r = requests.delete(
    "https://api.gslb.me/2.0/record/mydomain.com",
    auth=("username@mydomain.com", "your-password"),
    headers={"Accept": "application/json", "Content-Type": "application/json"},
    json={
        "records": [
            {
                "id": "7554"
            },
            {
                "id": "7555"
            }
        ]
    },
)
print(r.status_code, r.json())
JavaScript
const res = await fetch("https://api.gslb.me/2.0/record/mydomain.com", {
  method: "DELETE",
  headers: {
    "Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "records": [
      {
        "id": "7554"
      },
      {
        "id": "7555"
      }
    ]
  })
});
console.log(res.status, await res.json());

Example response

200 OK Delete zone records

{
  "message": "Done",
  "returncode": "0"
}