Planfix API analitic.getData: Difference between revisions

From Planfix
Jump to: navigation, search
(Created page with "Getting data tags attached by action. The list of available data tags is obtained from the list of actions. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="analitic.getData"> <account></account> <sid></sid> <analiticKeys> <key></key> <key></key> <!-- ... --> </analiticKeys> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; w...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Getting data tags attached by action. The list of available data tags is obtained from the [[Action.getList / Get a list of actions|list of actions]]. Request format:
Getting data tags attached by action. The list of available data tags is obtained from the [[Planfix API analitic.getList|list of actions]]. Request format:
<source lang="xml">
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
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 || dentifier of the data analytics line || returned by the [[Action.get / Get an action|action.get]] function
|analiticKeys.key|| int || identifier of the data tag data string || returned by the [[Action.get / Get an action|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 08:22, 7 March 2024

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>


Go To