Planfix API action.update: Difference between revisions
From Planfix
								
												
				 (Created page with "{{#seo: |title=Planfix API action.update |titlemode=append |keywords=Planfix, API action, update, action.update, Function |description=Planfix API action.update }} Function for updating data in an action. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="action.update">   <account></account>   <sid></sid>   <action>     <id></id>     <description></description>     <taskNewStatus></taskNewStatus>     <notifiedList>       <user>...")  | 
				No edit summary  | 
				||
| Line 89: | Line 89: | ||
|datatags.datatag  ||  || node containing data from a data tag ||  | |datatags.datatag  ||  || 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.id  || int  || data tag identifier || for a list of available data tags, use the  [[Planfix API datatag.getList|datatag.getList]] function    | ||
|-  | |-  | ||
|datatag.datatagData  ||  || list of field values ||  | |datatag.datatagData  ||  || list of field values ||  | ||
| 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   | |deletedDatatags.key  || int || key of deleted data tags ||this field is available after executing the  [[Planfix API  datatag.getData|function datatag.getData]]  | ||
|-  | |-  | ||
|signature ||string(32)|| signature ||  | |signature ||string(32)|| signature ||  | ||
Revision as of 14:17, 4 August 2023
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 | 
| datatags | list of data tags updated | not required | |
| datatags.datatag | node containing data from a data tag | ||
| datatag.id | int | data tag identifier | for a list of available data tags, use the datatag.getList function | 
| datatag.datatagData | 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 | |
| datatagData.itemData | value of one of the parameters | ||
| itemData.fieldId | 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 datatag.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>