RPC API Developer's Guide (Deprecated)

RPC API: Get users

Note that LogicMonitor does have an available REST API equivalent for this API call.

LogicMonitor's RPC API enables you to programmatically view user details with getAccountProfile and getAccounts.

Note: As with all our API calls, authentication is required.

 

getAccountProfile

URL:
https://accountName.logicmonitor.com/santaba/rpc/getAccountProfile?c=accountName&u=username&p=password

 

Request Parameters: You can include the following as query parameters in a getAccountProfile request:

Parameter

Type

Description

u String Required. The username associated with the account profile to be returned.
p String Required. The password associated with the account profile to be returned.

 

All outputs will be in the format: { [status], [data], [errmsg] }, where status is the status of the response, errmsg is the error message associated with the response and the data object incldues the following:

  • lastName
  • phone
  • status
  • viewMessageOn
  • createBy
  • password
  • contactMethod
  • forcePasswordChange
  • lastLoginOn
  • id
  • viewPermission
  • username
  • email
  • smsemail
  • roles
  • priv
  • firstName
  • note
  • smsEmailFormat

 

Example

Request:
curl "https://apiAccount.logicmonitor.com/santaba/rpc/getAccountProfile?c=apiAccount&u=API&p=apiPassword" 
Response:
{
  "status": 200,
  "data": {
    "lastName": "",
    "phone": "",
    "status": "active",
    "viewMessageOn": 0,
    "createBy": "LogicMonitor",
    "password": "********",
    "contactMethod": "email",
    "forcePasswordChange": 0,
    "lastLoginOn": 1447959725,
    "id": 19,
    "viewPermission": {
      "Dashboards": true,
      "Services": true,
      "Reports": true,
      "Settings": true,
      "Hosts": true,
      "Alerts": true
    },
    "username": "API",
    "email": "[email protected]",
    "smsemail": "",
    "priv": "readwrite",
    "firstName": "",
    "note": "",
    "smsEmailFormat": ""
  },
  "errmsg": "OK"
} 

 

getAccounts

URL:
https://accountName.logicmonitor.com/santaba/rpc/getAccounts?c=accountName&u=username&p=password

 

All outputs will be in the format: { [status], [data], [errmsg] }, where status is the status of the response, errmsg is the error message associated with the response and the data object lists all users, where the following information is provided per user:

  • lastName
  • phone
  • status
  • viewMessageOn
  • createBy
  • password
  • contactMethod
  • forcePasswordChange
  • lastLoginOn
  • id
  • viewPermission
  • username
  • email
  • smsemail
  • roles
  • priv
  • firstName
  • note
  • smsEmailFormat

 

Example

Request:
curl "https://apiAccount.logicmonitor.com/santaba/rpc/getAccounts?c=apiAccount&u=API&p=apiPassword" 
Response:
{
  "status": 200,
  "data": [
    {
      "lastName": "",
      "phone": "+1-",
      "status": "active",
      "viewMessageOn": "",
      "createBy": "LogicMonitor",
      "password": "********",
      "contactMethod": "email",
      "forcePasswordChange": 0,
      "lastLoginOn": "2014-12-03 16:41:30 PST",
      "id": 1,
      "viewPermission": {
        "Dashboards": true,
        "Reports": true,
        "Services": true,
        "Settings": true,
        "OnlyNewUI": false,
        "Hosts": true,
        "Alerts": true
      },
      "username": "admin",
      "email": "[email protected]",
      "smsemail": "",
      "roles": [
        {
          "id": 1,
          "customHelpURL": "",
          "description": "Administrator can do everything",
          "name": "administrator",
          "customHelpLabel": "",
          "privileges": []
        },
        {
          "id": 6,
          "customHelpURL": "",
          "description": "Provides access to manage the devices in production/databases",
          "name": "DB Team",
          "customHelpLabel": "",
          "privileges": []
        }
      ],
      "priv": "readwrite",
      "firstName": "",
      "note": "The admin account is only used during initial setup, and may be deleted anytime after you have logged in to your own account.",
      "smsEmailFormat": "sms"
    },......
    ........
    ........
    {
      "lastName": "",
      "phone": "+1-",
      "status": "active",
      "viewMessageOn": "",
      "createBy": "LogicMonitor",
      "password": "********",
      "contactMethod": "email",
      "forcePasswordChange": 0,
      "lastLoginOn": "2015-10-28 18:10:58 PDT",
      "id": 18,
      "viewPermission": {
        "Dashboards": true,
        "Reports": true,
        "Services": true,
        "Settings": true,
        "OnlyNewUI": false,
        "Hosts": true,
        "Alerts": true
      },
      "username": "sally",
      "email": "[email protected]",
      "smsemail": "",
      "roles": [{
        "id": 4,
        "customHelpURL": "",
        "description": "Able to view and acknowledge alerts for all hosts and services, but not make any other changes",
        "name": "ackonly",
        "customHelpLabel": "",
        "privileges": []
      }],
      "priv": "readwrite",
      "firstName": "",
      "note": "",
      "smsEmailFormat": "sms"
    }
    ],
  "errmsg": "OK"
}