API: OpenSRS Email

The API: OpenSRS Hosted Email Developer Hub

Welcome to the API: OpenSRS Hosted Email developer hub. You'll find comprehensive guides and documentation to help you start working with API: OpenSRS Hosted Email as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

get_user_changes

The get_user_changes method retrieves a summary of the changes made to a user account.

Syntax

{
    <credentials object>, 
    "user": <mailbox_name>, 
    "range": {
       "first": <number>,
       "limit": <number> 
}

Request fields for get_user_changes

The following fields can be used in the get_user_changes method:

Field nameObligationDefinition/Value
rangeOptionalThe range of results to return. Allowed values are:

first—The 0-based index of the first result to return.

limit—The maximum number of results to return.
userRequiredThe name of the user's account.

Response fields for get_user_changes

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

Field nameObligationDescription/Value
changesReturned if success = trueAn array of hashes, one hash for each change returned. The array is sorted by the time of the change, with the earliest change listed first. For each change the following information is returned:

application—The name of the application used to perform the change.

msg—A brief summary of the change made. If the changed data is short, it is shown;; otherwise, the number of bytes in the new value is shown

time—The time that the change was made, in UNIX Epoch time.

user—The name of the user that performed the change. If the change was performed by the system, the user "OpenSRS" is shown.
countReturned if success = trueThe number of items (changes) in the array.
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.
total_countReturned if success = trueThe total number of changes available.

Examples for get_user_changes

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "pencil75"
  },
  "range": {
    "first": 20,
    "limit": 10
  },
  "user": "[email protected]"
}

Response

{
  "success": true,
  "total_count": 29,
  "count": 9,
  "changes": [
        {
            "msg": "changed default_sort_order [descending]", 
      "time": "1321903552",
            "application": "OMA",
            "user": "[email protected]"
        }, 
        {
        "msg": "changed timezone [America/Montreal]", 
      "time": "1321903552",
            "application": "OMA",
            "user": "[email protected]"
    }, 
        {
        "msg": "changed language [en]",
            "time": "1321903552",
            "application": "OMA",
            "user": "[email protected]"
    }, 
        {
        "msg": "changed name [Janet User]",
            "time": "1321903552",
            "application": "OMA",
            "user": "[email protected]"
    }, 
        {
        "msg": "changed confirm_send [false]", 
      "time": "1321903552",
            "application": "OMA",
            "user": "[email protected]"
    }, 
        {
        "msg": "changed msgs_per_page [20]", 
      "time": "1321903552",
      "application": "OMA",
      "user": "[email protected]"
    }, 
        {
        "msg": "changed spamtag [[JUNK]]",
            "time": "1321903721",
            "application": "OMA",
            "user": "[email protected]"
    }, 
        {
        "msg": "changed sessions [32 bytes]",
            "time": "1321907872",
            "application": "OMA",
            "user": "[email protected]"
    }, 
        {
        "msg": "changed block [*@badmail.com]", 
      "time": "1327005780",
            "application": "mac:OMA",
            "user": "[email protected]"
    } 
  ]
}

Updated less than a minute ago

get_user_changes


The get_user_changes method retrieves a summary of the changes made to a user account.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.