get_user_attribute_history

The get_user_attribute_history method retrieves the historical values for an attribute for a specified user.

Syntax

{
    <credentials object>,
    "user": <mailbox_name>, 
    "attribute": <attribute name>
}

Request fields for get_user_attribute_history

The following fields can be used in the get_user_attribute_history method:

Field nameObligationDefinition/Value
attributeRequiredThe name of the attribute to query. For a list of the allowed attributes see "Response fields for get user".
userRequiredThe user's email address.

Response fields for get_user_attribute_history

The following fields may be returned in response to the get_user_attribute_history method:

Field nameObligationDescription/Value
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
historyReturned if success = trueThe value for the attribute submitted in the request, and the most recent time that the attribute had the reported value. May include more than one entry if the value of the attribute changed.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.

Examples for get_user_attribute_history

This example gets the old values for the name attribute for the user [email protected].

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "pencil75"
  },
  "user": "[email protected]",
  "attribute": "name"
}

Response

{
  "success": true,
  "history": {
    "1321902300": "Joseph User",
    "1321902660": "Joe User",
    "1325704186": "Joey User"
  } 
}