Hc_cocon_configure_info
Команда позволяет получить список всех блокировок CoCon-сессий.
Аналог команды в CoCon:
cocon/configure-info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/cocon_configure_info
Код 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="coconLockType"> <xs:attribute name="id" type="xs:string" use="required"/> <xs:attribute name="system" type="xs:string" use="required"/> <xs:attribute name="locks" type="xs:string" use="required"/> <xs:attribute name="locked_by" type="xs:string" use="required"/> <xs:attribute name="deadline" type="xs:string" use="required"/> </xs:complexType> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType/> </xs:element> </xs:all> </xs:complexType> </xs:element> <xs:element name="out"> <xs:complexType> <xs:all> <xs:element name="response"> <xs:complexType> <xs:sequence> <xs:element name="lock" type="coconLockType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> </xs:schema
Пример:
Запрос:
http://192.168.1.21:9999/commands/cocon_configure_info
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_info.xsd"> <request /> </in>
Код ответа:
200
Ответ(время в UTC):
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_info.xsd"> <response> <lock deadline="17.11.2019 03:58:45" locked_by="admin" locks="ct.office" system="ECSS-10-COCON" id="{elm_token,<<"0625eb10958e807a">>,<<"ECSS-10-COCON">>}"/> </response> </out>
Hc_cocon_configure_start
Команда позволяет перевести CoCon-сессии в режим единоличного конфигурирования (домена или всей системы).
Аналог команды в CoCon:
cocon/configure-start
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/cocon_configure_start
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation="error.xsd"/> <!-- okType--> <xs:complexType name="okType"> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="request"> <xs:complexType> <xs:attribute name="domain" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- out--> <xs:element name="out"> <xs:complexType> <xs:choice> <!-- ok --> <xs:element name="ok" type="okType" minOccurs="0"/> <!-- error --> <xs:element name="error" type="errorType" minOccurs="0"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema
Пример 1:
Запрос:
http://192.168.1.21:9999/commands/cocon_configure_start
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_start.xsd"> <request domain="ct.office" /> </in>
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_start.xsd"> <ok/> </out>
Hc_cocon_configure_stop
Команда позволяет вывести CoCon-сессию из режима единоличного конфигурирования (домена или всей системы).
Аналог команды в CoCon:
cocon/configure-stop
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/cocon_configure_stop
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation="error.xsd"/> <!-- okType--> <xs:complexType name="okType"> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="request"> <xs:complexType> <xs:attribute name="domain" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- out--> <xs:element name="out"> <xs:complexType> <xs:choice> <!-- ok --> <xs:element name="ok" type="okType" minOccurs="0"/> <!-- error --> <xs:element name="error" type="errorType" minOccurs="0"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример 1:
Запрос:
http://192.168.1.21:9999/commands/cocon_configure_stop
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_stop.xsd"> <request domain="biysk.local" /> </in>
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_stop.xsd"> <ok/> </out>
Пример 2:
Запрос:
http://192.168.1.21:9999/commands/cocon_configure_stop
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_stop.xsd"> <request/> </in>
Код ответа:
200
Ответ:
<?xml version="1.0" encoding="UTF-8"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="cocon_configure_stop.xsd"> <error cmd="hc_cocon_configure_stop" reason="lock_not_found" body="lock_not_found"/> </out>
0 Комментариев