Retrieving Protected Directory Properties

Use the get operation to retrieve properties of a specific protected directory.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet changing protected directory properties includes the get operation node:

<packet version="1.5.2.0">
<protected-dir>
<get>
...  
</get>
</protected-dir>
</packet>

 

The get node is presented by type ProtectedDirGetInput (protected_dir.xsd), and its graphical representation is as follows:

 

Response Packet Structure

The get node of the output XML packet is presented by type ProtectedDirGetOutput (protected_dir.xsd) and structured as follows:

 

 

Samples

Retrieving properties of a single protected directory

The packet that retrieves properties of the protected directory with ID 1 looks as follows:

<packet>
<protected-dir>
    <get>
      <filter>
         <id>1</id>
      </filter>
    </get>
  </protected-dir>
</packet>

Response:

<packet>
<protected-dir>
      <get>
        <result>
          <status>ok</status>
          <filter-id>1</filter-id>
          <id>1</id>
          <data>
            <name>directory</name>
            <header>This is a header!</header>
            <location>
              <property>
                  <name>ssl</name>
                  <value>true</value>
              </property>
              <property>
                  <name>non-ssl</name>
                  <value>true</value>
              </property>
              <property>
                  <name>cgi</name>
                  <value>true</value>
              </property>
            </location>
          </data>  
        </result>
      </get>
    </protected-dir>
</packet>

 

If the protected directory was not found, the response from the server looks as follows:

<packet>
<protected-dir>
  <get>
    <result>
     <status>error</status>
     <errcode>1013</errcode>
     <errtext>Protected URL is not found</errtext>
     <filter-id>1</filter-id>
    </result>
  </get>
</protected-dir>
</packet> 
Retrieving properties of multiple protected directories

The packet that retrieves properties of all protected directories of the site with ID 132 looks as follows:

<packet>
<protected-dir>
    <get>
      <filter>
         <site-id>132</site-id>
      </filter>
    </get>
  </protected-dir>
</packet>

Response:

<packet>
<protected-dir>
      <get>
        <result>
          <status>ok</status>
          <filter-id>132</filter-id>
          <id>34</id>
          <data>
            <name>directory</name>
            <header>This is a header!</header>
            <location>
              <property>
                  <name>ssl</name>
                  <value>true</value>
              </property>
              <property>
                  <name>non-ssl</name>
                  <value>false</value>
              </property>
              <property>
                  <name>cgi</name>
                  <value>true</value>
              </property>
            </location>
          </data>  
        </result>
        <result>
          <status>ok</status>
          <filter-id>132</filter-id>
          <id>37</id>
          <data>
            <name>MySecondDirectory</name>
            <header>This is a the second directory header!</header>
            <location>
              <property>
                  <name>ssl</name>
                  <value>true</value>
              </property>
              <property>
                  <name>non-ssl</name>
                  <value>true</value>
              </property>
              <property>
                  <name>cgi</name>
                  <value>true</value>
              </property>
            </location>
          </data>  
        </result>
      </get>
    </protected-dir>
</packet>