GetItemChangeHistory

Gets the change history for a primary or auxiliary item.

Parameters

Name Type Description
GetItemChangeHistory Function

Returns change history for a primary or auxiliary item.

table
  • ID (integer)
  • UUID (string)
  • dbname (string)
  • name (string)

The primary or auxiliary table identifier.

item
  • ID (integer)
  • UUID (string)

The item identifier.

Post Data

You can optionally use the GetItemChangeHistory function in an HTTP POST and include the following object:

Name Type Description
itemChangeHistoryOptions

(optional)

ItemChangeHistoryOptions

Use itemChangeHistoryOptions to limit the response data.

When itemOptions are included, only the specified fields, plus fields required by the transition, are sent in the response.

Example

URL:

http://AEserverName/jsonapi/GetItemChangeHistory/1000/109

Post data:

{startIndex: 0,	fetchSize:  2, newestFirst: true,
fixedFields : false, fields: [{dbname:'OWNER'}]}

Response:

{
   "itemhistory":    [
            {
         "timeStamp": 1530804913,
         "date": "07/05/2018 09:35:13 AM",
         "changer":          {
            "id": 8,
            "name": "Administrator"
         },
         "actionId": "104130_link",
         "actionName": "Attch Added",
         "changes": [{"newValue": "this is a note header"}]
      },
            {
         "newState": "Returned",
         "timeStamp": 1448981535,
         "date": "12/01/2015 07:52:15 AM",
         "changer":          {
            "id": 8,
            "name": "Administrator"
         },
         "newOwner":          {
            "id": 18,
            "name": "Jan Lvl 2 Support"
         },
         "actionId": "96569_link",
         "actionName": "Updated",
         "changes": [         {
            "fieldId": 86,
            "fieldName": "New Owner",
            "newValue": "Jan Lvl 2 Support"
         }]
      }
   ],
   "statistics":    {
      "totalSize": 10,
      "startIndex": 0,
      "fetchSize": 2
   },
   "result":    {
      "type": "OK",
      "msg": ""
   }
}

Comments

Because the TS_ID is subject to change in a promotion context, you may need to update the table and item parameters with the TS_ID from the target environment after the promote is finished.

The GetItemChangeHistory function complements the GetItem function by providing more historical information for an item. Both methods have the same input parameters and share common field filtering options.