Planfix API analitic.getDataByCondition: Difference between revisions

From Planfix
Jump to: navigation, search
(Created page with "Getting data tags based on a given condition. <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="analitic.getDataByCondition"> <account></account> <sid></sid> <analitic> <id></id> </analitic> <task> <id></id> <general></general> </task> <filters> <filter> <field></field> <fromDate></fromDate> <toDate></toDate> <userid></userid> </filter> </filters> <pageSize></pageSize> <pageCur...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Getting data tags based on a given condition.
Obtaining data tags based on a given condition.
<source lang="xml">
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
Line 125: Line 125:
== 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 09:27, 6 March 2024

Obtaining data tags based on a given condition.

<?xml version="1.0" encoding="UTF-8"?>
<request method="analitic.getDataByCondition">
  <account></account>
  <sid></sid>
  <analitic>
    <id></id>
  </analitic>
  <task>
    <id></id>
    <general></general>
  </task>
  <filters>
    <filter>
      <field></field>
      <fromDate></fromDate>
      <toDate></toDate>
      <userid></userid>
    </filter>			  
  </filters>
  <pageSize></pageSize>
  <pageCurrent></pageCurrent>
  <signature></signature>
</request>
Name Type Value Note
sid string(32) session key issued as a result of authentication
analitic.id int data tag identifier
task.id int task identifier optional, if absent - selection by all tasks
task.general int task number
pageCurrent int Page
pageSize int page size (maximum 100)
filters conditions
filter.field int identifier of the data tag field by which the condition is made
filter.fromDate DateTime for the condition by date - from date
filter.toDate DateTime or the condition by date - to date
filter.userid int for the condition by the field type User List / Employee / Group, employee or contact - employee identifier, as it is returned by the user.GetList function

Response when the request is successfully executed:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <analiticDatas>
    <analiticData>
      <key></key>
      <task>
        <id></id>
      </task>
      <action>
        <id></id>
      </action>
      <itemData>
        <id></id>
        <name></name>
        <value></value>
        <valueId></valueId>
      </itemData>
      <!-- ... -->
    </analiticData>
    <analiticData>
      <key></key>
      <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.task.id int identifier of the task to which the data tag is attached
analiticData.action.id int identifier of the action to which the data tag is attached
analiticData.itemData node describing the record with data in the data tag
itemData.id int identifier, it equals field.id
itemData.name string field name
itemData.value string text value
itemData.valueId string value identifier, for object fields


Otherwise, a response with an error will be returned:

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


Go To