Hc_domain_statistics_add
Команда позволяет добавить новую задачу по сбору статистики для домена (Виртуальной АТС).
Аналог команды в CoCon:
/domain/<domain>/statistics/add
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_statistics_add
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 201 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name = "moduleType"> <xs:restriction base="xs:string"> <xs:enumeration value="e502Type1"/> <xs:enumeration value="e502Type10"/> <xs:enumeration value="e502Type11"/> <xs:enumeration value="e502Type12"/> <xs:enumeration value="e502Type15"/> <xs:enumeration value="e502Type16"/> <xs:enumeration value="e502Type2"/> <xs:enumeration value="e502Type20"/> <xs:enumeration value="e502Type3"/> <xs:enumeration value="e502Type4"/> <xs:enumeration value="e502Type5"/> <xs:enumeration value="e502Type6"/> <xs:enumeration value="e502Type9"/> <xs:enumeration value="hostResources"/> <xs:enumeration value="mgTraffic"/> <xs:enumeration value="q752Table1"/> <xs:enumeration value="q752Table15"/> <xs:enumeration value="q752Table2"/> <xs:enumeration value="q752Table3"/> <xs:enumeration value="q752Table4"/> <xs:enumeration value="q752Table5"/> </xs:restriction> </xs:simpleType> <xs:simpleType name = "exportNameType"> <xs:restriction base="xs:string"> <xs:enumeration value="txt_file_export"/> </xs:restriction> </xs:simpleType> <xs:complexType name="exportType"> <xs:attribute name="name" type="xs:string" use="required" /> <xs:attribute name="value" type="xs:string" use="required" /> </xs:complexType> <xs:complexType name="filterType"> <xs:attribute name="name" type="xs:string" use="required" /> </xs:complexType> <xs:complexType name="domainType"> <xs:sequence> <xs:element name="export" type="exportType" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="filter" type="filterType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="module" type="moduleType" use="required"/> <xs:attribute name="interval" type="xs:integer" use="required"/> <xs:attribute name="export" type="exportNameType" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="domain" type="domainType" minOccurs="1"/> </xs:all> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_statistics_add
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_add.xsd"> <domain name="biysk.local" module="e502Type9" interval="10" export="txt_file_export"> <export name="dir" value="/var/lib/ecss/statistics" /> <filter name="biysk.local" /> </domain> </in>
Ответ: 201
Hc_domain_statistics_delete
Команда позволяет удалить задачи по сбору статистики в домене.
Аналог команды в CoCon:
/domain/<domain>/statistics/delete
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_statistics_delete
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 204 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="domainType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="id" type="xs:string" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="domain" type="domainType" minOccurs="1"/> </xs:all> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_statistics_delete
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_delete.xsd"> <domain name="biysk.local" id="30363236-3063-3662-3365-353432316430"/> </in>
Hc_domain_statistics_statmodinfo
Команда позволяет просмотреть информацию по маппированию колонок в домене.
Аналог команды в CoCon:
/domain/<domain>/statistics/statmodinfo[-m]
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_statistics_statmodinfo
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="domainType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="module" type="xs:string" use="required"/> <xs:attribute name="flag" type="xs:string" use="optional"/> </xs:complexType> <xs:complexType name="column1Type"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="type" type="xs:string" use="required"/> <xs:attribute name="constrait" type="xs:string" use="required"/> <xs:attribute name="description" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="columnsType"> <xs:sequence> <xs:element name="column" type="column1Type" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="description" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="column2Type"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="new_name" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="columns2Type"> <xs:sequence> <xs:element name="column" type="column2Type" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="domain" type="domainType" minOccurs="1" maxOccurs="1"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="columns" type="columnsType" /> <xs:element name="m_columns" type="columns2Type" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_statistics_statmodinfo
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_statmodinfo.xsd"> <domain name="biysk.local" module="e502Type1" flag="-m"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_statmodinfo.xsd"> <m_columns> <column name="notRouted" new_name="bad_route"/> </m_columns> </out>
Запрос: http://192.168.1.21:9999/commands/domain_statistics_statmodinfo
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_statmodinfo.xsd"> <domain module="e502Type1" name="biysk.local" /> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_statmodinfo.xsd"> <columns description="Overall measurements on originating traffic"> <column name="seizures" type="integer" constrait="undefined" description="Number of originating seizures"/> <column name="notRouted" type="integer" constrait="undefined" description="Number of call attempts not routed due to: no dialling, incomplete dialling, invalid address"/> <column name="congestion" type="integer" constrait="undefined" description="Number of call attempts lost due to internal congestion"/> </columns> </out>
Hc_domain_statistics_addcolmap
Команда позволяет добавить маппирование колонок в домен.
Аналог команды в CoCon:
/domain/<domain>/statistics/addcolmap
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_statistics_addcolmap
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 201 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name = "moduleType"> <xs:restriction base="xs:string"> <xs:enumeration value="e502Type1"/> <xs:enumeration value="e502Type10"/> <xs:enumeration value="e502Type11"/> <xs:enumeration value="e502Type12"/> <xs:enumeration value="e502Type15"/> <xs:enumeration value="e502Type16"/> <xs:enumeration value="e502Type2"/> <xs:enumeration value="e502Type20"/> <xs:enumeration value="e502Type3"/> <xs:enumeration value="e502Type4"/> <xs:enumeration value="e502Type5"/> <xs:enumeration value="e502Type6"/> <xs:enumeration value="e502Type9"/> <xs:enumeration value="hostResources"/> <xs:enumeration value="mgTraffic"/> <xs:enumeration value="q752Table1"/> <xs:enumeration value="q752Table15"/> <xs:enumeration value="q752Table2"/> <xs:enumeration value="q752Table3"/> <xs:enumeration value="q752Table4"/> <xs:enumeration value="q752Table5"/> </xs:restriction> </xs:simpleType> <xs:complexType name="domainType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="module" type="moduleType" use="required"/> <xs:attribute name="column" type="xs:string" use="required"/> <xs:attribute name="new_column" type="xs:string" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="domain" type="domainType" minOccurs="1"/> </xs:all> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_statistics_addcolmap
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_addcolmap.xsd"> <domain name="biysk.local" module="e502Type1" column="notRouted" new_column="bad_route" /> </in>
Hc_domain_statistics_delcolmap
Команда позволяет удалить маппирование колонок в домене.
Аналог команды в CoCon:
/domain/<domain/statistics/delcolmap
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_statistics_delcolmap
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 204 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="domainType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="module" type="xs:string" use="required"/> <xs:attribute name="column" type="xs:string" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="domain" type="domainType" minOccurs="1"/> </xs:all> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_statistics_delcolmap
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_delcolmap.xsd"> <domain name="biysk.local" module="e502Type1" column="notRouted"/> </in>
Hc_domain_statistics_list
Команда позволяет получить активные задачи по сбору статистики в рамках домена.
Аналог команды в CoCon:
/domain/<domain>/statistics/list
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_statistics_list
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="domainType"> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> <xs:simpleType name = "moduleType"> <xs:restriction base="xs:string"> <xs:enumeration value="e502Type1"/> <xs:enumeration value="e502Type10"/> <xs:enumeration value="e502Type11"/> <xs:enumeration value="e502Type12"/> <xs:enumeration value="e502Type15"/> <xs:enumeration value="e502Type16"/> <xs:enumeration value="e502Type2"/> <xs:enumeration value="e502Type20"/> <xs:enumeration value="e502Type3"/> <xs:enumeration value="e502Type4"/> <xs:enumeration value="e502Type5"/> <xs:enumeration value="e502Type6"/> <xs:enumeration value="e502Type9"/> <xs:enumeration value="hostResources"/> <xs:enumeration value="mgTraffic"/> <xs:enumeration value="q752Table1"/> <xs:enumeration value="q752Table15"/> <xs:enumeration value="q752Table2"/> <xs:enumeration value="q752Table3"/> <xs:enumeration value="q752Table4"/> <xs:enumeration value="q752Table5"/> </xs:restriction> </xs:simpleType> <xs:complexType name="idType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="module" type="moduleType" use="required"/> <xs:attribute name="interval" type="xs:integer" use="required"/> <xs:attribute name="start_time" type="xs:string" use="required"/> <xs:attribute name="end_time" type="xs:string" use="required"/> <xs:attribute name="exports" type="xs:string" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="domain" type="domainType" minOccurs="1" maxOccurs="1"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="out"> <xs:complexType> <xs:sequence> <xs:element name="id" type="idType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_statistics_list
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_list.xsd"> <domain name="biysk.local" /> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_statistics_list.xsd"> <id name="30363236-3063-3461-3330-353931636432" module="e502Type1" interval="900" start_time="2019/11/18 11:12:19" end_time="undefined" exports="txt_file_export"/> <id name="30363236-3063-3236-6137-356463636332" module="e502Type9" interval="600" start_time="2019/11/18 11:02:50" end_time="undefined" exports="txt_file_export"/> <id name="30363236-3063-3733-6561-386564346630" module="e502Type2" interval="900" start_time="2019/11/18 11:23:26" end_time="undefined" exports="txt_file_export"/> <id name="30363236-3063-3662-3365-353432316430" module="e502Type2" interval="900" start_time="2019/11/18 11:21:07" end_time="undefined" exports="txt_file_export"/> <id name="30363236-3063-3631-6661-346536313831" module="e502Type6" interval="900" start_time="2019/11/18 11:18:39" end_time="undefined" exports="rpss_db_export"/> <id name="30363236-3063-3661-6635-366464323230" module="e502Type9" interval="600" start_time="2019/11/18 11:21:03" end_time="undefined" exports="txt_file_export"/> <id name="30363236-3063-3535-3635-613231356430" module="hostResources" interval="900" start_time="2019/11/18 11:15:18" end_time="undefined" exports="rpss_db_export"/> </out>
Добавить комментарий