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 name

Obligation

Definition/Value

attribute

Required

The name of the attribute to query. For a list of the allowed attributes see "Response fields for get user".

user

Required

The 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 name

Obligation

Description/Value

error

Returned if success = false

A text string that explains the error.

error_number

Returned if success = false

A number that represents the error.

history

Returned if success = true

The 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.

success

Always returned

Indicates 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"
  } 
}