ItemChangeHistoryOptions

Limits the data that is returned with an item's change history; extends the ItemOptions option.

Parameters

Name Type Description
fields
  • ID (integer)
  • UUID (string)
  • dbname (string)
  • name (string)

An array of objects used to specify the fields to display. Empty by default.

See the fields parameter in itemOptions.

fixedFields

boolean

Combines with the fields array to determine the outputted fields. True by default. See usage notes below.

See the fixedFields parameter in itemOptions.

includeNotesAttachments

boolean

When true, the item's notes and attachments are included in the response. False by default.

The user's note preferences are honored, including the sort order and the number of notes to display. If the user has selected None as the display option for notes, no notes are returned.

newestFirst

boolean

When true, the most recent changes are returned at the top of the list of changes. False by default.

startIndex

integer

The number of item change actions to skip before returning results back to caller. Zero by default.

fetchSize

integer

The number of change actions to be returned back to caller. Zero (by default) means the entire history of an item's changes are returned.

showPriorValues

boolean

When true, the prior value of each change along with new value are returned. False by default.

Usage

The ItemOptions parameters are used to query information about particular field changes. See ItemOptions. ItemChangeHistoryOptions is an extension of ItemOptions for retrieving change history.

Note the following:

Example

Return the most recent item change and include prior values:

{ startIndex: 0, fetchSize:  1, newestFirst: true, showPriorValues: true }

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",
            "priorValue": ""
         },
                  {
            "fieldId": 77,
            "fieldName": "Last Modified Date",
            "newValue": "07/05/2018 09:35:13 AM",
            "priorValue": "12/01/2015 07:52:15 AM"
         }
      ]
   }],
   "statistics":    {
      "totalSize": 10,
      "startIndex": 0,
      "fetchSize": 1
   },
   "result":    {
      "type": "OK",
      "msg": ""
   }
}

Comments