GET Get domains list

REQUEST HEADERS
X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NDIwMDY1MTUxNzB9.3L4D21aMdNxnm9lZTklt6EvjeNP9RLLKLJtFqVLnSCs
X-Key: eb76bb9f-6366-4168-b0f1-dac6f15adceb
RESPONSE BODY
{
	"status":"OK",
	"data":{
		"777":{
			"id":"777",
			"domain":"d1.webitel.com",
			"user":"7",
			"acc/dvc":"7/0"
		},
		"demo.webitel.com":{
			"id":"demo.webitel.com",
			"domain":"demo.webitel.com",
			"user":"30",
			"acc/dvc":"30/0"
		},
		"webitel.com":{
			"id":"webitel.com",
			"domain":"webitel.com",
			"user":"25",
			"acc/dvc":"25/0"
		}
	}
}
CURL EXAMPLE
curl -XGET -H 'X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NDIwMDY1MTUxNzB9.3L4D21aMdNxnm9lZTklt6EvjeNP9RLLKLJtFqVLnSCs' -H 'X-Key: eb76bb9f-6366-4168-b0f1-dac6f15adceb' "https://api.webitel.com:10022/api/v2/domains"

 


POST Add new domain

REQUEST HEADERS
Content-Type: application/json
X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NDIwMDY1MTUxNzB9.3L4D21aMdNxnm9lZTklt6EvjeNP9RLLKLJtFqVLnSCs
X-Key: eb76bb9f-6366-4168-b0f1-dac6f15adceb
REQUEST BODY
{
    "domain_name": "mydomain.com",
    "customer_id": "20150909",
	"variables": ["default_language=ru"],
	"parameters": []
}
RESPONSE BODY
{
	"status":"OK",
	"info":"+OK [mydomain.com] created !\n",
	"more info":""
}
CURL EXAMPLE
curl -XPOST -H 'X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NDIwMDY1MTUxNzB9.3L4D21aMdNxnm9lZTklt6EvjeNP9RLLKLJtFqVLnSCs' -H 'X-Key:eb76bb9f-6366-4168-b0f1-dac6f15adceb' -H 'Content-Type: application/json' -d '{"domain_name": "mydomain.com","customer_id": "20150909","variables": ["default_language=ru"],"parameters": []}' "https://api.webitel.com:10022/api/v2/domains"

 


DELETE /api/v2/domains/:domain_nameDelete the domain

REQUEST HEADERS
X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NDIwMDY1MTUxNzB9.3L4D21aMdNxnm9lZTklt6EvjeNP9RLLKLJtFqVLnSCs
X-Key: eb76bb9f-6366-4168-b0f1-dac6f15adceb
RESPONSE BODY
{
	"status":"OK",
	"info":"+OK [mydomain.com] destroy !\n",
	"more info":""
}
CURL EXAMPLE
curl -XDELETE -H 'X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NDIwMDY1MTUxNzB9.3L4D21aMdNxnm9lZTklt6EvjeNP9RLLKLJtFqVLnSCs' -H 'X-Key:eb76bb9f-6366-4168-b0f1-dac6f15adceb' "https://api.webitel.com:10022/api/v2/domains/mydomain.com"
  • No labels