Planfix API analitic.getHandbook: Difference between revisions
From Planfix
								
												
				No edit summary  | 
				No edit summary  | 
				||
| Line 16: | Line 16: | ||
|sid || string(32) ||session key || issued as a result of [[Planfix API: Authentication|authentication]]  | |sid || string(32) ||session key || issued as a result of [[Planfix API: Authentication|authentication]]  | ||
|-  | |-  | ||
|handbook.id|| int || directory identifier || obtained as a result of executing the function [[Planfix API get data tag description  | |handbook.id|| int || directory identifier || obtained as a result of executing the function [[Planfix API analitic.getOptions|Planfix API get data tag description]]  | ||
|-  | |-  | ||
|}  | |}  | ||
Revision as of 13:36, 4 March 2024
The request to get the directory for data tag looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<request method="analitic.getHandbook">
  <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 | obtained as a result of executing the function Planfix API get data tag description | 
Response upon successful request execution:
<response status="ok">
  <records>
    <record>
      <key></key>
      <parentKey></parentKey>
      <isGroup></isGroup>
      <value value="" name="" isDisplayed="" />
      <value value="" name="" isDisplayed="" />
      <!-- ... -->
    </record>
    <record>
      <key></key>
      <parentKey></parentKey>
      <isGroup></isGroup>
      <value value="" name="" isDisplayed="" />
      <value value="" name="" isDisplayed="" />
      <!-- ... -->
    </record>
    <!-- ... -->
  </records>
</response>| Name | Type | Value | Note | 
|---|---|---|---|
| records | list of directory entries | ||
| record | node describing an entry in the directory | ||
| record.key | int | entry identifier | |
| record.parentKey | int | identifier of the parent entry | |
| record.isGroup | bool | whether the node is a parent/group name | entries of this type cannot be used for data tags, they are used to group data | 
| record.value | node describing data in the entry | ||
| value value | string | field value | |
| value name | string | name | |
| value isDisplayed | bool | whether the field is displayed or not | 
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>