Planfix API handbook.getStructure

From Planfix
Jump to: navigation, search

Obtaining a directory description - the full content of fields and their value types. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="handbook.getStructure">
  <account></account>
  <sid></sid>
  <handbook>
    <id></id>
  </handbook>
  <signature></signature>
</request>
Name Type Value Note
sid string(32) session key issued as a result of authentication
handbook.id int directory identifier

Response when the request is successfully executed:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <handbook>
    <id></id>
    <name></name>
    <group>
      <id></id>
    </group>
    <fields>
      <field>
        <id></id>
        <num></num>
        <name></name>
        <type></type>
        <list>
          <value></value>
          <value></value>
          <!-- ... -->
        </list>
        <handbook>
          <id></id>
        </handbook>
      </field>
      <field>
        <id></id>
        <num></num>
        <name></name>
        <type></type>
        <list>
          <value></value>
          <value></value>
          <!-- ... -->
        </list>
        <handbook>
          <id></id>
        </handbook>
      </field>
      <!-- ... -->
    </fields>
  </handbook>
</response>
Название Тип Значение Примечание
id int directory identifier
name string directory name
group.id int directory group identifier
fields node containing the list of directory fields
fields.field node describing a directory field
field.id int field identifier required in requests when adding an entry
field.num int serial number for interface
field.name string field description
field.type enum data type in the field list of permissible values for this field see in the section data types of data tag fields
field.list list of available values for the field, if type=LIST
field.list.value string field value
field.handbook.id int directory identifier, if type=HANDBOOK

Otherwise, a response with an error will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To