Planfix API action.update: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 73: Line 73:
|description ||string ||text with action/comment description ||
|description ||string ||text with action/comment description ||
|-
|-
|taskNewStatus  ||enum ||this action changes the [[Planfix API: Task statuses| task statuses]] to the one specified ||not required; for a list of valid values, see the task statuses section; attempting to change to an invalid status or to change the status of an action that isn't the most recent will result in an error
|taskNewStatus  ||enum ||this action changes the [[Planfix API:Task statuses| task statuses]] to the one specified ||not required; for a list of valid values, see the task statuses section; attempting to change to an invalid status or to change the status of an action that isn't the most recent will result in an error
|-
|-
|notifiedList || ||the following list of users must be notified of this action ||
|notifiedList || ||the following list of users must be notified of this action ||
Line 85: Line 85:
|dateTime || DateTime  || date/time of creation; not required; by default not changed || can only be used if an employee with admin rights is logged in
|dateTime || DateTime  || date/time of creation; not required; by default not changed || can only be used if an employee with admin rights is logged in
|-
|-
|datatags  ||  || list of data tags updated  || not required
|analitics ||  || list of data tags updated  || not required
|-
|-
|datatags.datatag ||  || node containing data from a data tag ||
|analitics.analitic ||  || node containing data from a data tag ||
|-
|-
|datatag.id  || int  || data tag identifier || for a list of available data tags, use the  [[Planfix API datatag.getList|datatag.getList]] function   
|analitic.id  || int  || data tag identifier || for a list of available data tags, use the  [[Planfix API analitic.getList|analitic.getList]] function   
|-
|-
|datatag.datatagData  ||  || list of field values ||
|analitic.analiticData ||  || list of field values ||
|-
|-
|datatagData.key  || int  || data tag row identifier; if this attribute is used, the data tag with this identifier will be used; if it is not used, a new data tag row will be added ||  
|analiticData.key  || int  || data tag row identifier; if this attribute is used, the data tag with this identifier will be used; if it is not used, a new data tag row will be added ||  
|-
|-
|datatagData.itemData  ||  || value of one of the parameters ||
|analiticData.itemData  ||  || value of one of the parameters ||
|-
|-
|itemData.fieldId || int  || parameter identifier || identifier of the parameter equal to [[Planfix API analitic.getOptions|feild.id]]
|itemData.feildId || int  || parameter identifier || identifier of the parameter equal to [[Planfix API analitic.getOptions|feild.id]]
|-
|-
|itemData.value  || string || value ||
|itemData.value  || string || value ||
Line 103: Line 103:
|deletedDatatags  || || list of deleted data tags ||
|deletedDatatags  || || list of deleted data tags ||
|-
|-
|deletedDatatags.key  || int || key of deleted data tags ||this field is available after executing the [[Planfix API  datatag.getData|function datatag.getData]]
|deletedDatatags.key  || int || key of deleted data tags ||this field is available after executing the function [[Planfix API  analitic.getData| analitic.getData]]
|-
|-
|signature ||string(32)|| signature ||
|signature ||string(32)|| signature ||
Line 139: Line 139:


== Go To ==
== Go To ==
*[[Planfix API: Actions]]  
*[[Planfix API:Actions]]  
*[[Error codes]]
*[[Error codes XML API v1|Error codes]]
*[[List of functions]]
*[[List of functions]]

Latest revision as of 14:43, 15 March 2024

Function for updating data in an action. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="action.update">
  <account></account>
  <sid></sid>
  <action>
    <id></id>
    <description></description>
    <taskNewStatus></taskNewStatus>
    <notifiedList>
      <user>
        <id></id>
        <id></id>
        <!-- ... -->
      </user>
    </notifiedList>
    <isHidden></isHidden>
    <dateTime></dateTime>
    <analitics>
      <analitic>
        <id></id>
        <analiticData>
          <key></key>
          <itemData>
            <fieldId></fieldId>
            <value></value>
          </itemData>
          <itemData>
            <fieldId></fieldId>
            <value></value>
          </itemData>
          <!-- ... -->
        </analiticData>
      </analitic>
      <!-- ... -->
      <analitic>
        <id></id>
        <analiticData>
          <itemData>
            <fieldId></fieldId>
            <value></value>
          </itemData>
          <itemData>
            <fieldId></fieldId>
            <value></value>
          </itemData>
          <!-- ... -->
        </analiticData>
      </analitic>
      <!-- ... -->
    </analitics>
    <deletedAnalitics>
      <key></key>
      <key></key>
      <!-- ... -->
    </deletedAnalitics>
  </action>
  <signature></signature>
</request>
Name Type Value Notes
id int action identifier
description string text with action/comment description
taskNewStatus enum this action changes the task statuses to the one specified not required; for a list of valid values, see the task statuses section; attempting to change to an invalid status or to change the status of an action that isn't the most recent will result in an error
notifiedList the following list of users must be notified of this action
notifiedList.user list of users who will receive a notification
notifiedList.user.id int user identifier
isHidden bool whether or not the action (comment) is hidden from all users, excluding the list of those notified not required, by default set to 0 (false)
dateTime DateTime date/time of creation; not required; by default not changed can only be used if an employee with admin rights is logged in
analitics list of data tags updated not required
analitics.analitic node containing data from a data tag
analitic.id int data tag identifier for a list of available data tags, use the analitic.getList function
analitic.analiticData list of field values
analiticData.key int data tag row identifier; if this attribute is used, the data tag with this identifier will be used; if it is not used, a new data tag row will be added
analiticData.itemData value of one of the parameters
itemData.feildId int parameter identifier identifier of the parameter equal to feild.id
itemData.value string value
deletedDatatags list of deleted data tags
deletedDatatags.key int key of deleted data tags this field is available after executing the function analitic.getData
signature string(32) signature


Remember, you can update ACTION and COMMENT actions. Attempts to update other types of actions will result in an error.

Result of successful request:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <action>
    <id></id>
  </action>
</response>
Name Type Value Notes
action.id int identifier of the modified action


Otherwise, an error response will be returned:

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


Go To