Hc_domain_access_type_info
Команда позволяет просмотреть профили Access type, декларированные в системе.
Аналог команды в CoCon:
/domain/<DOMAIN>/access-type/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_access_type_info
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла c ответом:
<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="typeInType"> <xs:attribute name="domain" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="optional"/> </xs:complexType> <xs:complexType name="typeType"> <xs:attribute name="domain" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="private_in" type="xs:string" use="required"/> <xs:attribute name="private_out" type="xs:boolean" use="required"/> <xs:attribute name="local_in" type="xs:boolean" use="required"/> <xs:attribute name="local_out" type="xs:boolean" use="required"/> <xs:attribute name="zone_in" type="xs:boolean" use="required"/> <xs:attribute name="zone_out" type="xs:boolean" use="required"/> <xs:attribute name="intercity_in" type="xs:boolean" use="required"/> <xs:attribute name="intercity_out" type="xs:boolean" use="required"/> <xs:attribute name="international_in" type="xs:boolean" use="required"/> <xs:attribute name="international_out" type="xs:boolean" use="required"/> <xs:attribute name="emergency_in" type="xs:boolean" use="required"/> <xs:attribute name="emergency_out" type="xs:boolean" use="required"/> <xs:attribute name="cause" type="xs:string" use="optional"/> <xs:attribute name="description" type="xs:string" use="optional"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="type" type="typeInType" minOccurs="1" /> </xs:all> </xs:complexType> </xs:element> <xs:element name="out"> <xs:complexType> <xs:sequence> <xs:element name="type" type="typeType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/domain_access_type_info
<?xml version="1.0" encoding="UTF-8" ?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_access_type_info.xsd"> <type domain="biysk.local" /> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_access_type_info.xsd"> <type domain="biysk.local" name="admin1" private_in="false" private_out="false" local_in="false" local_out="false" zone_in="false" zone_out="false" intercity_in="false" intercity_out="false" international_in="false" international_out="false" emergency_in="true" emergency_out="true" cause="21" description="admin"/> <type domain="biysk.local" name="access_type0" private_in="true" private_out="true" local_in="true" local_out="true" zone_in="true" zone_out="true" intercity_in="true" intercity_out="true" international_in="true" international_out="true" emergency_in="true" emergency_out="true" cause="16" description="Normal"/> <type domain="biysk.local" name="access_type1" private_in="true" private_out="true" local_in="true" local_out="true" zone_in="true" zone_out="true" intercity_in="true" intercity_out="true" international_in="true" international_out="false" emergency_in="true" emergency_out="true" cause="21" description="Call Rejected"/> <type domain="biysk.local" name="access_type2" private_in="true" private_out="true" local_in="true" local_out="true" zone_in="true" zone_out="true" intercity_in="true" intercity_out="false" international_in="true" international_out="false" emergency_in="true" emergency_out="true" cause="21" description="Call Rejected"/> </out>
Hc_domain_access_type_remove
Команда позволяет удалить профиль Access type.
Аналог команды в CoCon:
/domain/test.domain/access-type/remove
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_access_type_remove
Код 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="typeType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="domain" type="xs:string" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="type" type="typeType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/domain_access_type_remove
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="domain_access_type_remove.xsd"> <type domain="biysk.local" name="access_type2" /> </in>
Hc_domain_access_type_declare
Команда позволяет создать новый профиль Access type.
Аналог команды в CoCon:
domain/<DOMAIN>/access-type/declare
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/domain_access_type_declare
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить двумя сообщениями:
- 201 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="typeType"> <xs:attribute name="domain" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="private_in" type="xs:string" use="required"/> <xs:attribute name="private_out" type="xs:boolean" use="required"/> <xs:attribute name="local_in" type="xs:boolean" use="required"/> <xs:attribute name="local_out" type="xs:boolean" use="required"/> <xs:attribute name="zone_in" type="xs:boolean" use="required"/> <xs:attribute name="zone_out" type="xs:boolean" use="required"/> <xs:attribute name="intercity_in" type="xs:boolean" use="required"/> <xs:attribute name="intercity_out" type="xs:boolean" use="required"/> <xs:attribute name="international_in" type="xs:boolean" use="required"/> <xs:attribute name="international_out" type="xs:boolean" use="required"/> <xs:attribute name="emergency_in" type="xs:boolean" use="required"/> <xs:attribute name="emergency_out" type="xs:boolean" use="required"/> <xs:attribute name="cause" type="xs:string" use="optional"/> <xs:attribute name="description" type="xs:string" use="optional"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="type" type="typeType" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/domain_access_type_declare
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="../priv/xsd/domain_access_type_declare.xsd"> <type domain="ct.office" name="first_access" private_in="false" private_out="false" local_in="false" local_out="false" zone_in="false" zone_out="false" intercity_in="false" intercity_out="false" international_in="false" international_out="false" emergency_in="true" emergency_out="true" cause="16"/> </in>