Subsidiary Domains (domains)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new child domain
Request
Field Description: domain entity
POST /rest/v1/domain/domains HTTP/1.1
Content-Type: application/json; charset=utf-8
domain entity
Response
Field Description: domain entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "521944bd-016c-b839-648f-50e54938780c",
"name": "x.docs.rootdomain.ru",
"solution": "era",
"dbdefaultconn": 1,
"dbhost": "",
"dblogin": "",
"dbport": 0,
"dbpwd": "",
"lic": {
"domains": 100,
"devices": 1000,
"siptrunks": 5000
},
"opts": {
"title": "",
"comment": "",
"isblocked": false,
"dbuser": "none",
"script_pause_between_components": 0,
"script_limit_component_count": -1,
"script_limit_site_count": -1,
"script_duration_sec": -1,
"script_allow_global_variables": true
},
"ext": {
"ct": "2019-08-22T07:27:44.55Z",
"lwt": "2019-08-22T07:27:44.55Z"
}
}
Getting the list of child domains
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, solution, lic, opts.title, opts.isblocked, opts.dbuser, opts.script_pause_between_components, opts.script_limit_component_count, opts.script_limit_site_count, opts.script_duration_sec, opts.script_allow_global_variables, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/domain/domains?filter={"opts.isblocked":"false"}&offset=0&limit=2 HTTP/1.1
Response
Field Description: domain entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "521944bd-016c-b839-648f-50e54938780c",
"name": "x.docs.rootdomain.ru",
"solution": "era",
"lic": {
"domains": 100,
"devices": 1000,
"siptrunks": 5000
},
"opts": {
"title": "",
"isblocked": false,
"dbuser": "none",
"script_pause_between_components": 0,
"script_limit_component_count": -1,
"script_limit_site_count": -1,
"script_duration_sec": -1,
"script_allow_global_variables": true
},
"ext": {
"ct": "2019-08-22T07:27:44.55Z",
"lwt": "2019-08-22T07:27:44.55Z"
}
},
{
"id": "2676d846-016c-b839-d915-50e54938780c",
"name": "y.docs.rootdomain.ru",
"solution": "era",
"lic": {
"domains": 2
},
"opts": {
"title": "",
"isblocked": false,
"dbuser": "none",
"script_pause_between_components": 0,
"script_limit_component_count": -1,
"script_limit_site_count": -1,
"script_duration_sec": -1,
"script_allow_global_variables": true
},
"ext": {
"ct": "2019-08-22T07:28:14.61Z",
"lwt": "2019-08-22T07:28:14.61Z"
}
}
]
Retrieving child domain data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c HTTP/1.1
Response
Field Description: domain entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "521944bd-016c-b839-648f-50e54938780c",
"name": "x.docs.rootdomain.ru",
"solution": "era",
"dbdefaultconn": 1,
"dbhost": "",
"dblogin": "",
"dbport": 0,
"dbpwd": "",
"lic": {
"domains": 100,
"devices": 1000,
"siptrunks": 5000
},
"opts": {
"title": "",
"comment": "",
"isblocked": false,
"dbuser": "none",
"script_pause_between_components": 0,
"script_limit_component_count": -1,
"script_limit_site_count": -1,
"script_duration_sec": -1,
"script_allow_global_variables": true
},
"ext": {
"ct": "2019-08-22T07:27:44.55Z",
"lwt": "2019-08-22T07:27:44.55Z"
}
}
Changing the data of a child domain
Fields prohibited for modification: id, name, solution
Request
Field Description: domain entity
PATCH /rest/v1/domain/domains/521944bd-016c-b839-648f-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
domain entity
Response
Field Description: domain entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "521944bd-016c-b839-648f-50e54938780c",
"name": "x.docs.rootdomain.ru",
"solution": "era",
"dbdefaultconn": 1,
"dbhost": "",
"dblogin": "",
"dbport": 0,
"dbpwd": "",
"lic": {
"domains": 120,
"devices": 1200,
"siptrunks": 5500
},
"opts": {
"title": "",
"comment": "",
"isblocked": false,
"dbuser": "read",
"script_pause_between_components": 1,
"script_limit_component_count": 100,
"script_limit_site_count": 100,
"script_duration_sec": 60,
"script_allow_global_variables": false
},
"ext": {
"ct": "2019-08-22T07:27:44.55Z",
"lwt": "2019-09-10T21:35:27.41Z"
}
}
Deleting a child domain
Searching for the child domain identifier
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id, name
Request
LOOKUP /rest/v1/domain/domains HTTP/1.1
Content-Type: application/json; charset=utf-8
"x.docs.rootdomain.ru"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"521944bd-016c-b839-648f-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}