Planfix API analitic.getData: Difference between revisions
From Planfix
								
												
				| No edit summary | No edit summary | ||
| (2 intermediate revisions by the same user not shown) | |||
| Line 18: | Line 18: | ||
| |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]]   | ||
| |- | |- | ||
| |analiticKeys.key|| int ||  | |analiticKeys.key|| int || identifier of the data tag data string || returned by the [[Planfix API action.get|action.get]] function | ||
| |- | |- | ||
| |} | |} | ||
| Line 97: | Line 97: | ||
| == Go To == | == Go To == | ||
| *[[Planfix API:Data tags]] | *[[Planfix API:Data tags]] | ||
| *[[Error codes]] | *[[Error codes XML API v1|Error codes]] | ||
| *[[List of functions]] | *[[List of functions]] | ||
Latest revision as of 14:15, 28 February 2025
Getting data tags attached by action. The list of available data tags is obtained from the list of actions. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="analitic.getData">
  <account></account>
  <sid></sid>
  <analiticKeys>
    <key></key>
    <key></key>
    <!-- ... -->
  </analiticKeys>
  <signature></signature>
</request>| Name | Type | Value | Note | 
|---|---|---|---|
| sid | string(32) | session key | issued as a result of authentication | 
| analiticKeys.key | int | identifier of the data tag data string | returned by the action.get function | 
It is allowed to get data of several added data tags with one request. If an identifier for a non-existent data tag was passed in the request, then empty data tags will be returned, and no error will be generated.
Response when the request is successfully executed:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <analiticDatas>
    <analiticData>
      <key></key>
      <itemData>
        <id></id>
        <name></name>
        <value></value>
        <valueId></valueId>
      </itemData>
      <itemData>
        <id></id>
        <name></name>
        <value></value>
        <valueId></valueId>
      </itemData>
      <!-- ... -->
    </analiticData>
    <analiticData>
      <key></key>
      <itemData>
        <id></id>
        <name></name>
        <value></value>
        <valueId></valueId>
      </itemData>
      <itemData>
        <id></id>
        <name></name>
        <value></value>
        <valueId></valueId>
      </itemData>
      <!-- ... -->
    </analiticData>
    <!-- ... -->
  </analiticDatas>
</response>| Name | Type | Value | Note | 
|---|---|---|---|
| analiticDatas | list of requested data tags | ||
| analiticData | node describing the data contained in the data tag | ||
| analiticData.key | int | data identifier | |
| analiticData.itemData | node describing the entry with data in the data tag | ||
| itemData.id | int | identifier, it is equal to field.id | |
| itemData.name | string | field name | |
| itemData.value | string | value (string representation) | |
| itemData.valueId | string | value (identifier for fields containing an object) | 
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>