Planfix API analitic.getData
From Planfix
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>