Команда позволяет получить список интеграций определенного агента КЦ.

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/<DOMAIN>/service/cc/arm/integration_list

Коды ответов:

200 

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

  <xs:complexType name="Value">
      <xs:attribute name="value" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="RedmineIntegration">
    <xs:all>
      <xs:element name="login" type="Value" minOccurs="1" maxOccurs="1"/>
      <xs:element name="password" type="Value" minOccurs="1" maxOccurs="1"/>
      <xs:element name="task_subject" type="Value" minOccurs="0" maxOccurs="1"/>
      <xs:element name="task_body" type="Value" minOccurs="0" maxOccurs="1"/>
      <xs:element name="task_project" type="Value" minOccurs="0" maxOccurs="1"/>
      <!--<xs:element name="native"/>-->
    </xs:all>
  </xs:complexType>

  <xs:complexType name="ConfluenceIntegration">
    <xs:all>
      <xs:element name="api_key" type="Value" minOccurs="1" maxOccurs="1"/>
      <!--<xs:element name="native"/>-->
    </xs:all>
  </xs:complexType>

  <xs:complexType name="CISIntegration">
    <xs:all>
      <xs:element name="request_uri" type="Value" minOccurs="1" maxOccurs="1"/>
      <!--<xs:element name="native"/>-->
    </xs:all>
  </xs:complexType>

  <xs:complexType name="SSVSIntegration">
    <xs:all>
      <xs:element name="request_uri" type="Value" minOccurs="1" maxOccurs="1"/>
      <!--<xs:element name="native"/>-->
    </xs:all>
  </xs:complexType>

  <xs:complexType name="Integrations">
    <xs:sequence>
      <xs:element name="redmine" type="RedmineIntegration" minOccurs="0" maxOccurs="1"/>
      <xs:element name="confluence" type="ConfluenceIntegration" minOccurs="0" maxOccurs="1"/>
      <xs:element name="cis" type="CISIntegration" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ssvs" type="SSVSIntegration" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>

  <!-- in -->
  <xs:element name="in">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="request">
          <xs:complexType>
            <xs:all>
              <xs:element name="integration_list" minOccurs="1" maxOccurs="1"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!-- out -->
  <xs:element name="out">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="response">
          <xs:complexType>
            <xs:all>
              <xs:element name="integrations" type="Integrations" minOccurs="1" maxOccurs="1"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
XML

Пример с использованием websocket:

curl -v 192.168.1.21:8086/biysk.local/service/cc/arm/integration_list -H 'Content-Type: text/json' --data '[{"_name":"in","_content":[{"_name":"request","_content":[{"_name":"integration_list"}]}]}]' --cookie token=067e132057a242b9

YML

Ответ: 200

[
  {
    "_name": "out",
    "_attributes": {
      "xmlns:xs": "http://www.w3.org/2001/XMLSchema-instance",
      "xs:noNamespaceSchemaLocation": "integration_list.xsd"
    },
    "_content": [
      {
        "_name": "response",
        "_content": [
          {
            "_name": "integrations",
            "_content": [
              {
                "_name": "confluence",
                "_content": [
                  {
                    "_name": "access_key",
                    "_attributes": {
                      "value": "QUJDREVGR0gxMjM0NTY3ODk6WE5DSVc5M0kyTDFTUVBKU0o4MjNLMUxTOTAyS0xERk1DWlBXRU8="
                    }
                  }
                ]
              },
              {
                "_name": "redmine",
                "_content": [
                  {
                    "_name": "task_project",
                    "_attributes": {
                      "value": "SSW"
                    }
                  },
                  {
                    "_name": "login",
                    "_attributes": {
                      "value": "alex.ivanov"
                    }
                  },
                  {
                    "_name": "password",
                    "_attributes": {
                      "value": "MySuperPass"
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
]
YML

Пример с использованием XML:

curl -v http://192.168.1.21:8086/biysk.local/service/cc/arm/integration_list --data '<?xml version="1.0" encoding="latin1"?><in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"><request><integration_list/></request></in>' -H 'Content-Type: text/xml; charset=UTF-8' --cookie token=067e132057a242b9
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="integration_list.xsd">
    <response>
        <integrations>
            <confluence>
                <access_key value="QUJDREVGR0gxMjM0NTY3ODk6WE5DSVc5M0kyTDFTUVBKU0o4MjNLMUxTOTAyS0xERk1DWlBXRU8="/>
            </confluence>
            <redmine>
                <task_project value="SSW"/>
                <login value="alex.ivanov"/>
                <password value="MySuperPass"/>
            </redmine>
        </integrations>
    </response>
</out>
CODE