5centsCDN - Traffic Director (1.0.0)

Download OpenAPI specification:Download

API for managing Traffic Director

Contact Support:
Email: [email protected]

HealthChecks

Create HealthCheck

Authorizations:
apikeyAuth
header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
name
string
  • The name of the health check.
    • This property represents the identifier for the health check instance.
    • Example values:
      • 'Check New'
      • 'API Server Health Check'
ip
string
  • The IP address to be monitored.
    • This property specifies the target IP address for the health check.
    • Example values:
      • '1.1.1.1'
      • '192.168.0.1'
monitoring_region
string
  • The region from which the health check will be performed.
    • Specifies the geographic location for monitoring the IP.
    • Possible values:
      • 'nam' (North America)
      • 'eur' (Europe)
      • 'apac' (Asia-Pacific)
check_period
string
  • The time interval (in seconds) between health checks.
    • Determines how frequently the check is performed.
    • Example values:
      • '300' (every 5 minutes)
      • '60' (every 1 minute)
status_change_checks
string
  • The number of failed checks required before considering the service down.
    • This property defines the threshold for detecting downtime.
    • Example values:
      • '1' (detect failure immediately)
      • '3' (detect failure after three failed checks)
check_type
string
  • The type of health check to perform.
    • Specifies the protocol or method used for checking availability.
    • Example values:
      • '1' (Ping/ICMP check)
      • '2' (TCP check)
      • '3' (HTTP check)
host
string
  • The hostname or domain to check.
    • Used when checking HTTP or HTTPS endpoints.
    • Example values:
      • 'example.com'
      • 'api.server.com'
port
string
  • The port number on which the service runs.
    • Required for TCP or HTTP/HTTPS checks.
    • Example values:
      • '80' (HTTP)
      • '443' (HTTPS)
      • '22' (SSH)
path
string
  • The specific URL path to check when performing HTTP/HTTPS health checks.
    • Defines the endpoint being monitored.
    • Example values:
      • '/health'
      • '/status'
content
string
  • The expected response content for the check to pass.
    • Used for validating HTTP/HTTPS responses.
    • Example values:
      • 'OK'
      • '{"status": "healthy"}'
_METHOD
string
  • The HTTP method used for the API request.
    • Indicates whether the request is an update, creation, or retrieval.
    • Example values:
      • 'PUT' (update an existing health check)
      • 'POST' (create a new health check)

Responses

Request samples

Content type
application/json
{
  • "name": "Check New",
  • "ip": "1.1.1.1",
  • "monitoring_region": "nam",
  • "check_period": "300",
  • "status_change_checks": "1",
  • "check_type": "1",
  • "host": "",
  • "port": "",
  • "path": "",
  • "content": "",
  • "_METHOD": "PUT"
}

Response samples

Content type
application/json
{
  • "status": "Success",
  • "message": "The Monitoring check is created successfully.",
  • "id": 6023
}

List HealthChecks

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "result": "success",
  • "sonars": [
    ],
  • "pageMax": 1
}

All HealthChecks Status (Online / Offline)

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "type": null,
  • "items": {
    }
}

Get HealthCheck Log

Authorizations:
apikeyAuth
path Parameters
healthCheckId
required
string
Example: <string>

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "id": 4426,
  • "serviceid": 103,
  • "meta": {
    },
  • "status": "0",
  • "created_at": "2022-07-15 20:59:47",
  • "updated_at": "2024-01-18 19:52:01"
}

List HealthCheck History

Authorizations:
apikeyAuth
path Parameters
healthCheckId
required
integer
Example: 121275

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "type": null,
  • "items": {
    }
}

Get A HealthCheck's Change

Authorizations:
apikeyAuth
path Parameters
healthCheckId
required
string
Example: <string>

(Required)

changeId
required
string
Example: <string>

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "id": "332010",
  • "time": "1738066938",
  • "ip": "8.8.8.8",
  • "checker_location": "Singapore 2",
  • "checker_location_cc": "sg",
  • "error": "",
  • "debug": "traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets 1 * * * 2 10.76.194.64 (10.76.194.64) 4.870 ms 10.76.194.70 (10.76.194.70) 0.463 ms 10.76.194.72 (10.76.194.72) 0.484 ms 3 143.198.252.14 (143.198.252.14) 0.464 ms 143.198.252.4 (143.198.252.4) 0.484 ms 143.198.252.14 (143.198.252.14) 0.446 ms 4 143.244.192.178 (143.244.192.178) 0.554 ms 143.244.192.176 (143.244.192.176) 0.549 ms 143.244.192.92 (143.244.192.92) 0.598 ms 5 143.244.224.236 (143.244.224.236) 1.062 ms 1.112 ms 143.244.224.230 (143.244.224.230) 1.010 ms 6 143.244.224.211 (143.244.224.211) 0.771 ms 143.244.224.207 (143.244.224.207) 0.523 ms 0.490 ms 7 72.14.195.58 (72.14.195.58) 1.331 ms 1.315 ms 1.304 ms 8 * * * 9 dns.google (8.8.8.8) 0.482 ms 0.552 ms 0.541 ms\n",
  • "status": "1"
}

List HealthCheck Changes

Authorizations:
apikeyAuth
path Parameters
healthCheckId
required
string
Example: <string>

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "type": null,
  • "description": null,
  • "items": {
    }
}

Update HealthCheck

Authorizations:
apikeyAuth
path Parameters
healthCheckId
required
integer
Example: 121275

(Required)

header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
name
string
  • The name of the healthcheck.
    • Represents the identifier or label for the healthcheck.
    • This is used for tracking or distinguishing different healthchecks.
ip
string
  • The IP address associated with the healthcheck.
    • Represents the network address used for the check.
    • This could be an IPv4 or IPv6 address.
monitoring_region
string
  • The region where the monitoring is being performed.
    • Represents the geographical area or region where the healthcheck is being executed.
    • Examples include global or specific countries like 'us' or 'eu'.
check_period
integer
  • The time interval (in seconds) between each healthcheck.
    • Represents how frequently the healthcheck is executed.
    • A smaller value means more frequent checks, e.g., 30 seconds.
status_change_checks
integer
  • The number of status changes that should be checked for.
    • Represents how many changes in status will trigger an alert or action.
    • Example: 1 means a single status change will trigger an alert.
check_type
integer
  • The type of the healthcheck being performed.
    • This represents different types of checks, such as 'ping', 'http', or 'dns'.
    • The value corresponds to a specific check type.
host
string
  • The host or domain name to be monitored.
    • Represents the target hostname for the healthcheck.
    • Example: 'example.com' or 'localhost'.
port
string
  • The port on the host to be checked.
    • Represents the service port that will be monitored for availability.
    • Example: '80' for HTTP or '443' for HTTPS.
path
string
  • The specific URL path to check for availability.
    • This is used for HTTP(S) healthchecks to check a specific page or resource.
    • Example: '/healthcheck' or '/status'.
content
string
  • The content to check in the response body.
    • This represents the expected content or pattern to be found in the response to determine success.
    • Example: 'OK' or '200 OK'.
open_port
integer
  • Specifies whether to check for an open port.
    • This is used to check if a specific port is open on the host.
    • Example: 0 indicates no check, 1 indicates the port should be open.
query_type
string
  • The type of DNS query to perform.
    • This is relevant for DNS-based healthchecks, where a certain type of query is made.
    • Example: 'A' for an address record or 'MX' for mail exchange.
query_response
string
  • The expected response from the DNS query.
    • Represents the response data that should match for the healthcheck to be successful.
    • Example: '8.8.8.8' for an address record or 'google.com' for a cname.
heartbeat_url
string
  • The URL to send heartbeat signals to.
mode
string
  • The mode of the healthcheck.
    • Defines the operational mode for the healthcheck, such as standard mode or more advanced modes.
    • Example: 'standard' or 'advanced'.

Responses

Request samples

Content type
application/json
{
  • "name": "doplegang",
  • "ip": "8.8.8.8",
  • "monitoring_region": "global",
  • "check_period": 30,
  • "status_change_checks": 1,
  • "check_type": 1,
  • "host": "",
  • "port": "",
  • "path": "",
  • "content": "",
  • "open_port": 0,
  • "query_type": "A",
  • "query_response": "",
  • "heartbeat_url": "",
  • "mode": "standard"
}

Response samples

Content type
application/json
{
  • "status": "Success",
  • "statusDescription": "The Monitoring check is updated successfully."
}

Delete HealthCheck

Authorizations:
apikeyAuth
path Parameters
healthCheckId
required
string
Example: <string>

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "status": "Success",
  • "statusDescription": "The Monitoring check is deleted successfully."
}

TD Domains

List TD Domains

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "result": "success",
  • "domains": [
    ],
  • "nameservers": [
    ]
}

Create TD Domain

Authorizations:
apikeyAuth
header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
domain
string
  • Represents the domain name for the service.
    • This is a unique identifier for a website or web service.
    • Common examples include website domains like 'yahoo.com', 'google.com'.
_METHOD
string
  • Represents the HTTP method used for the request.
    • In this case, the 'PUT' method is used to update or modify an existing resource.
    • Other common HTTP methods include 'GET' (retrieve data) and 'POST' (send data).

Responses

Request samples

Content type
application/json
{
  • "domain": "yahoo.com",
  • "_METHOD": "PUT"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update SOA of a TD Domain

Authorizations:
apikeyAuth
path Parameters
dnsid
required
string
Example: <string>

(Required)

header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
serial
integer
  • The serial number of the zone file.
    • Used to indicate changes to the file, typically incremented with updates.
    • Example values include 2015010103 and 2024010101.
primaryNameserver
string
  • The primary nameserver for the domain.
    • Indicates the authoritative nameserver responsible for the domain's DNS records.
    • Example values include pns1.5centscdn.com. and ns1.example.com..
email
string
  • The email address of the person responsible for the domain.
    • Typically formatted as hostmaster or admin email addresses.
    • Example values include help.5centscdn.com. and dnsadmin.example.com..
ttl
integer
  • The time-to-live (TTL) value for DNS records in seconds.
    • Determines how long the record is cached by resolvers.
    • Example values include 86400 (1 day) and 3600 (1 hour).
refresh
integer
  • The refresh interval in seconds for secondary nameservers to check for zone updates.
    • Example values include 43200 (12 hours) and 7200 (2 hours).
retry
integer
  • The retry interval in seconds for secondary nameservers to retry zone updates if the previous attempt failed.
    • Example values include 3600 (1 hour) and 600 (10 minutes).
expire
integer
  • The expiration time in seconds after which secondary nameservers stop serving the zone if updates cannot be retrieved.
    • Example values include 1209600 (14 days) and 604800 (7 days).
negativeCache
integer
  • The negative caching time in seconds for DNS responses.
    • Indicates how long a DNS resolver should cache negative responses.
    • Example values include 180 (3 minutes) and 300 (5 minutes).

Responses

Request samples

Content type
application/json
{
  • "serial": 2015010103,
  • "primaryNameserver": "pns1.5centscdn.com.",
  • "email": "help.5centscdn.com.",
  • "ttl": 86400,
  • "refresh": 43200,
  • "retry": 3600,
  • "expire": 1209600,
  • "negativeCache": 180
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Restore TD Domain

Authorizations:
apikeyAuth
path Parameters
dnsid
required
string
Example: <string>

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{}

Analytics

Authorizations:
apikeyAuth
path Parameters
dnsid
required
string
Example: <string>

(Required)

query Parameters
r
string
Example: r=<string>
header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete TD Domain

Authorizations:
apikeyAuth
path Parameters
dnsid
required
string
Example: <string>

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{}

Set Preferred Type

Authorizations:
apikeyAuth
path Parameters
dnsid
required
integer
Example: 122

(Required)

header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
type
string
  • Specifies the type of DNS record.
    • This property defines the DNS record type being set.
    • Possible values include:
      • 'A' (IPv4 address record)
      • 'AAAA' (IPv6 address record)
      • 'CNAME' (Canonical name record)

Responses

Request samples

Content type
application/json
{
  • "type": "A"
}

Response samples

Content type
application/json
{
  • "status": null
}

Records

List Records

Authorizations:
apikeyAuth
path Parameters
dnsid
required
integer
Example: 1

(Required)

query Parameters
type
string
Example: type=CNAME

Record Types

host
string

Hostname Search Value

page
integer
Example: page=1

Page No:

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "pageMax": 1,
  • "records": [
    ]
}

Create DNS Record

Authorizations:
apikeyAuth
path Parameters
dnsid
required
integer
Example: 122

(Required)

header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
enabled
integer
  • Represents whether the DNS record is enabled.
    • When set to 1, the record is enabled; when set to 0, it is disabled.
name
string
  • The name of the DNS record.
    • Typically this is the subdomain or hostname for which the record is created. In this case, it's empty, but it could be a value like 'example.com' or 'subdomain.example.com'.
ttl
integer
  • Time to Live (TTL) for the DNS record in seconds.
    • This defines how long the DNS record will be cached by clients and servers before querying the authoritative DNS server again. A common value is 10 seconds, but it could also be 3600 seconds (1 hour).
mode
string
  • The operational mode of the DNS record.
    • In this case, 'standard' mode indicates that this is a typical DNS record, which will resolve based on the given type and value.
    • Other modes might include 'failover' or 'loadbalancer' depending on the setup.
Array of objects
  • A list of values associated with the DNS record.
    • This array contains objects that specify the actual value for the record, such as IP addresses or domain names.
    • For example, an A record would have IP addresses in this list, while a CNAME record would have domain names.
Array
value
string
  • The actual value associated with the DNS record.
    • For an A record, this would be the IP address to resolve to, such as '192.168.1.1'.
enabled
integer
  • Represents whether the specific value in the list is enabled or disabled.
    • When set to 1, the value is enabled, meaning it will be used in DNS resolution. When set to 0, the value is disabled and will not be used.
ipfilterDrop
null
  • This property represents whether IP filtering should drop the request.
    • Since it is set to null, it indicates that IP filtering is not configured for this record. In some cases, this might hold a boolean value to indicate whether to drop or allow based on IP addresses.
type
string
  • The type of the DNS record.
    • This specifies what kind of DNS record is being created, such as 'A' for an address record (which maps a hostname to an IP address), 'CNAME' for a canonical name record, or 'MX' for mail exchange. In this case, it's an A record.
_METHOD
string
  • The HTTP method used for the request.
    • This is typically used in systems where the method might need to be simulated (e.g., to make a POST request behave like a PUT request). In this case, the method is PUT.

Responses

Request samples

Content type
application/json
{
  • "enabled": 1,
  • "name": "",
  • "ttl": 10,
  • "mode": "standard",
  • "value": [
    ],
  • "ipfilterDrop": null,
  • "type": "A",
  • "_METHOD": "PUT"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update DNS Record

Authorizations:
apikeyAuth
path Parameters
dnsid
required
integer
Example: 122

(Required)

recordid
required
integer
Example: 44784304

(Required)

header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
enabled
integer
  • Indicates whether the record is enabled.
    • A value of 1 means the record is active, while 0 means it is disabled.
name
string
  • The name associated with the DNS record.
    • It typically represents a hostname or subdomain.
    • Example values: example.com, sub.example.com.
ttl
integer
  • Time-to-live (TTL) value for the DNS record in seconds.
    • Determines how long the record is cached before it expires.
    • Common values: 10, 300, 3600.
mode
string
  • Specifies the operational mode of the DNS record.
    • Modes define how the record behaves.
    • Example values: standard, failover.
Array of objects
  • A list of values associated with the DNS record.
    • Typically used for storing IP addresses or other resolution targets.
Array
value
string
  • The actual DNS record value. - For A records, this is an IPv4 address. - Example values: 192.168.1.1, 203.0.113.45.
enabled
integer
  • Indicates if this specific value entry is active. - A value of 1 means it is active, while 0 means it is inactive.
type
string
  • The type of DNS record.
    • Determines how the DNS query is handled.
    • Example values: A (IPv4 address record), CNAME (alias to another domain).
ipfilterDrop
integer
  • Defines whether IP filtering is applied to the record.
    • A value of 0 means filtering is disabled, while 1 means filtering is enabled.

Responses

Request samples

Content type
application/json
{
  • "enabled": 1,
  • "name": "example.com",
  • "ttl": 10,
  • "mode": "standard",
  • "value": [
    ],
  • "type": "A",
  • "ipfilterDrop": 0
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete DNS Record

Authorizations:
apikeyAuth
path Parameters
dnsid
required
integer
Example: 122

(Required)

recordid
required
integer
Example: 44784304

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "record": {
    },
  • "ipfilter": {
    }
}

List Record Types

Authorizations:
apikeyAuth
path Parameters
dnsid
required
integer
Example: 122

(Required)

header Parameters
Accept
string
Example: application/json

Responses

Response samples

Content type
application/json
{
  • "0": null,
  • "1": null,
  • "2": null,
  • "3": null,
  • "4": null,
  • "5": null,
  • "6": null,
  • "7": null,
  • "8": null,
  • "9": null,
  • "10": null,
  • "11": null,
  • "12": null,
  • "13": null,
  • "14": null
}