get_company_changes

The get_company_changes method retrieves a summary of the changes that have been made to a company.

Syntax

{
    <credentials object>, 
    "company": <company_name>, 
    "range": {
      "first": <number>
      "limit": <number> 
}

Request fields for get_company_changes

The following fields can be used in the get_company_changes method:

Field nameObligationDefinition/Value
companyRequiredThe name of the company.
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.

Response fields for get_company_changes

The following fields may be returned in response to the get_company_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 = trueA text string that explains the error.
error_numberReturned if success = trueA 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_company_changes

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
  "range": {
    "first": 0,
    "limit": 500
  },
  "company": "Example Corp"
}

Response

{
  "success": true,
  "count": 18,
  "total_count": 18,
  "changes": [
    {
      "msg": "created 1321901787707",
      "time": "1321901787",
      "application": "OMA",
      "user": "OpenSRS"
    },
    {
      "msg": "changed quota [5368709120S,2684354C]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed quota_maximum [15360]", 
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed disabled [0]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed createtime [1321901788]", 
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    },
    {
      "msg": "changed smtprelay_webmail [1]", 
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    },
    {
      "msg": "changed pop3 [1]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed smtp_sent_limit [500]", 
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed imap4 [1]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed account [1321901787707]", 
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed webmail [1]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    },
    {
      "msg": "changed smtprelay [1]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed smtpin [1]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed timezone [America/Montreal]", 
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed language [en]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed name [Example Corp]",
      "time": "1321901788",
      "application": "OMA",
      "user": "OpenSRS"
    }, 
    {
      "msg": "changed spamtag [[JUNK]]",
      "application": "OMA",
      "user": "[email protected]"
      "time": "1326401277",
    },
    {
      "msg": "changed block [*@spammers.com]", 
      "time": "1326401294",
      "application": "OMA",
      "user": "[email protected]"
    } 
  ]
}