Platon Podpora Setup API

Setup API

26.5.2017

For using this API you need set up TOKEN in Setup.Platon.sk (Customer -> Customer Settings -> Webservice Token) and write us helpdesk@platon.org your IP for allow for connect to webservice.


Mail management

[show] [hide]

Add new mailbox

[show] [hide]

Change password for mailbox


DNS management

[show] [hide]

Get all records

Syntax
https://setup.platon.sk/ws.php?ws=dns&token=<TOKEN>&cname=<CNAME>&domain=<DOMAIN>&action=get
<TOKEN>- set up in Customer Settings
<CNAME>- your CNAME
<DOMAIN>- domain

Example request:

https://setup.platon.sk/ws.php?ws=dns&token=jankohrasko&cname=karol&domain=skuska.sk&action=get

Example response:

{"status":"OK",
"retval":1,
"msg":null,
"data":{
	"domain_id":"17767",
	"domain":"skuska.sk",
	"master":"server",
	"type":null,
	"records":[
		{"record_id":"11142095", "type":"SOA", "name":"skuska.sk", "content":"ns.platon.sk admin.platon.sk 2017052501 10101 1010 1010101 3600", "ttl":"21600", "prio":null}
		,{"record_id":"11142097", "type":"NS", "name":"skuska.sk", "content":"ns.platon.sk", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142099", "type":"NS", "name":"skuska.sk", "content":"dns.platon.sk", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142101", "type":"NS", "name":"skuska.sk", "content":"ns.platon.org", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142103", "type":"NS", "name":"skuska.sk", "content":"dns.platon.org", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142105", "type":"MX", "name":"skuska.sk", "content":"85.248.226.2", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142111", "type":"MX", "name":"skuska.sk", "content":"igor1.platon.sk", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142107", "type":"MX", "name":"www.skuska.sk", "content":"85.248.226.2", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142109", "type":"MX", "name":"www.skuska.sk", "content":"85.248.229.203", "ttl":"21600", "prio":"0"}
		,{"record_id":"11142113", "type":"CNAME", "name":"autoconfig.skuska.sk", "content":"autoconfig.platon.sk", "ttl":"21600", "prio":null}
		,{"record_id":"11142115", "type":"CNAME", "name":"autodiscover.skuska.sk", "content":"autodiscover.platon.sk", "ttl":"21600", "prio":null}
		,{"record_id":"11142117", "type":"CNAME", "name":"imaps.skuska.sk", "content":"imaps.platon.sk", "ttl":"21600", "prio":null}
		,{"record_id":"11142119", "type":"CNAME", "name":"mail.skuska.sk", "content":"mail.platon.sk", "ttl":"21600", "prio":null}
		,{"record_id":"11142121", "type":"CNAME", "name":"pop3s.skuska.sk", "content":"pop3s.platon.sk", "ttl":"21600", "prio":null}
		,{"record_id":"11142123", "type":"CNAME", "name":"smtps.skuska.sk", "content":"smtps.platon.sk", "ttl":"21600", "prio":null}
		,{"record_id":"11142125", "type":"CNAME", "name":"webmail.skuska.sk", "content":"webmail.platon.sk", "ttl":"21600", "prio":null}
	]}
}

[show] [hide]

Get records by type

Syntax
https://setup.platon.sk/ws.php?ws=dns&token=<TOKEN>&cname=<CNAME>&domain=<DOMAIN>&action=getType&type=<TYPE>
<TOKEN>- set up in Customer Settings
<CNAME>- your CNAME
<DOMAIN>- domain
<TYPE>- allowed types SOA, NS, TXT, SPF, SSHFP, SRV, PTR, MX, CNAME, A, AAAA

Example request:

https://setup.platon.sk/ws.php?ws=dns&token=jankohrasko&cname=karol&domain=skuska.sk&action=getType&type=CNAME

Example response:

{"status":"OK",
"retval":1,
"msg":null,
"data":{
	"domain_id":"17767",
	"domain":"skuska.sk",
	"master":"server",
	"type":null,
	"records":[
		{"record_id":"11142113","type":"CNAME","name":"autoconfig.skuska.sk","content":"autoconfig.platon.sk","ttl":"21600","prio":null}
		,{"record_id":"11142115","type":"CNAME","name":"autodiscover.skuska.sk","content":"autodiscover.platon.sk","ttl":"21600","prio":null}
		,{"record_id":"11142117","type":"CNAME","name":"imaps.skuska.sk","content":"imaps.platon.sk","ttl":"21600","prio":null}
		,{"record_id":"11142119","type":"CNAME","name":"mail.skuska.sk","content":"mail.platon.sk","ttl":"21600","prio":null}
		,{"record_id":"11142121","type":"CNAME","name":"pop3s.skuska.sk","content":"pop3s.platon.sk","ttl":"21600","prio":null}
		,{"record_id":"11142123","type":"CNAME","name":"smtps.skuska.sk","content":"smtps.platon.sk","ttl":"21600","prio":null}
		,{"record_id":"11142125","type":"CNAME","name":"webmail.skuska.sk","content":"webmail.platon.sk","ttl":"21600","prio":null}
	]}
}

[show] [hide]

Add new record

Syntax
https://setup.platon.sk/ws.php?ws=dns&token=<TOKEN>&cname=<CNAME>&domain=<DOMAIN>&action=addRecord&type=<TYPE>&name=<NAME>&content=<CONTENT>&ttl=<TTL>&prio=<PRIO>
<TOKEN>- set up in Customer Settings
<CNAME>- your CNAME
<DOMAIN>- domain
<TYPE>- allowed types SOA, NS, TXT, SPF, SSHFP, SRV, PTR, MX, CNAME, A, AAAA
<NAME>- name of record
<CONTENT>- content of record
<TTL>- time to live
<PRIO>- priority, only for type MX

Example request:

https://setup.platon.sk/ws.php?ws=dns&token=jankohrasko&cname=karol&domain=skuska.sk&action=addRecord&type=mx&name=testx&content=server.sk&ttl=21600&prio=10

Example response:

{"status":"OK",
"retval":true,
"msg":null,
"data":null
}

[show] [hide]

Update exist record

Syntax
https://setup.platon.sk/ws.php?ws=dns&token=<TOKEN>&cname=<CNAME>&domain=<DOMAIN>&action=updateRecord&record_id=<RECORD_ID;>&type=<TYPE>&name=<NAME>&content=<CONTENT>&ttl=<TTL>&prio=<PRIO>
<TOKEN>- set up in Customer Settings
<CNAME>- your CNAME
<DOMAIN>- domain
<RECORD_ID>- ID of record, get it from action "get" or "getType"
<TYPE>- allowed types SOA, NS, TXT, SPF, SSHFP, SRV, PTR, MX, CNAME, A, AAAA [optional]
<NAME>- name of record [optional]
<CONTENT>- content of record [optional]
<TTL>- time to live [optional]
<PRIO>- priority, only for type MX [optional]

Example request for update name for record ID 11142115:

https://setup.platon.sk/ws.php?ws=dns&token=jankohrasko&cname=karol&domain=skuska.sk&action=updateRecord&record_id=11142115&name=testzzz

Example response:

{"status":"OK",
"retval":true,
"msg":null,
"data":null
}

[show] [hide]

Delete exist record

Syntax
https://setup.platon.sk/ws.php?ws=dns&token=<TOKEN>&cname=<CNAME>&domain=<DOMAIN>&action=deleteRecord&record_id=<RECORD_ID;>
<TOKEN>- set up in Customer Settings
<CNAME>- your CNAME
<DOMAIN>- domain
<RECORD_ID>- ID of record, get it from action "get" or "getType"

Example request for delete record ID 11142115:

https://setup.platon.sk/ws.php?ws=dns&token=jankohrasko&cname=karol&domain=skuska.sk&action=deleteRecord&record_id=11142115

Example response:

{"status":"OK",
"retval":true,
"msg":null,
"data":null
}