Remote Admin API

Portal Server Remote Admin API Specification

Generating an Authentication Token

To perform a Remote Admin API call, you must first generate an “Admin API Auth Token” in the Administrator Menu of the portal. When generating the token you can enter a purpose (only used as information) and also restrict the remote IP addresses for which the token is valid. You can also specify whether the token has read/write access or read/only access.

“alt attribute”

API Functions

The API supports the following functions (so-called “actions”):

  • getAllUserAccounts (Get all user accounts of the portal server)
  • getAllPricePlans (Get all price plans of the portal server)
  • addLicenseCertificateToUser (Add a (new) license certificate to an user)
  • getServerSettings (Get the server settings)
  • setServerMaintenanceMode (Turn the server maintenance mode on or off)
URL HTTP Method
https://portal.realload.com/RemoteAdminAPI POST
All data are sent and received in JSON data format. The “authTokenValue” and the “action” must always be sent when an API call is made.

Example

API HTTP/S Request

curl -v --request POST --header "Content-Type: application/json" --data "@getAllUserAccounts.json"  https://portal.realload.com/RemoteAdminAPI

API Request Data

{
  "authTokenValue": "8mKSz1UzaQg17kfu",
  "action": "getAllUserAccounts"
}

API Response Data

{"allUserAccountsArray":
[{"userId":13,"nickname":"DKF","firstName":"Max","lastName":"Fischer","primaryEmail":"max@dkfqa.com","primarySMSPhone":"+41771111111","secondaryEmail":"","secondarySMSPhone":"","accountBlocked":false,"accountCreateTime":1538556183756,"lastLoginTime":1625181623869,"lastLoginIP":"127.0.0.1","pricePlanId":1,"accountExpiresTime":-1,"pricePlanTitle":"Unlimited"},{"userId":18,"nickname":"AX","firstName":"Alex","lastName":"Fischer","primaryEmail":"alexfischer66@yahoo.com","primarySMSPhone":"+41781111111","secondaryEmail":"","secondarySMSPhone":"","accountBlocked":false,"accountCreateTime":1539874749677,"lastLoginTime":1616111301975,"lastLoginIP":"127.0.0.1","pricePlanId":1,"accountExpiresTime":-1,"pricePlanTitle":"Unlimited"},{"userId":22,"nickname":"Kes","firstName":"Kesorn","lastName":"Fischer","primaryEmail":"gsklsta@yahoo.com","primarySMSPhone":"+66000000000","secondaryEmail":"","secondarySMSPhone":"","accountBlocked":false,"accountCreateTime":1605303204754,"lastLoginTime":1624389324770,"lastLoginIP":"127.0.0.1","pricePlanId":6,"accountExpiresTime":-1,"pricePlanTitle":"BASIC1"},{"userId":48,"nickname":"BET","firstName":"Bettina","lastName":"Meier","primaryEmail":"b123456@lucini.id.au","primarySMSPhone":"+61404905702","secondaryEmail":"","secondarySMSPhone":"","accountBlocked":false,"accountCreateTime":1623719604561,"lastLoginTime":-1,"lastLoginIP":"","pricePlanId":6,"accountExpiresTime":1625061600000,"pricePlanTitle":"BASIC1"}],
"isError":false}

If the API call is successful, then the response field “isError” is false. If a numeric field has a value of -1 (minus one), this means “no data” or “unlimited” depending on the context.

getAllUserAccounts

Specific Request Fields:

  • [none]

Specific Error Flags:

  • [none]

getAllPricePlans

Specific Request Fields:

  • [none]

Specific Error Flags:

  • [none]

addLicenseCertificateToUser

Specific Request Fields:

  • mapToUserEmailAddress
  • mapToUserMobilePhone
  • licenseProvider
  • licenseCertificate

The license is successfully assigned to a user if either mapToUserEmailAddress or mapToUserMobilePhone matches to a user account.

Specific Error Flags:

  • writeAccessError
  • mapToUserError
  • licenseProviderError
  • licenseCertificateError
  • licenseCertificateAlreadyAddedError
  • pricePlanError

JSON Request Example:

{
  "authTokenValue":"8mKSz1UzaQg17kfu",
  "action":"addLicenseCertificateToUser",
  "licenseProvider": "Real Load Pty Ltd / nopCommerce",
  "mapToUserEmailAddress": "max@dkfqa.com",
  "mapToUserMobilePhone": "+41771111111",
  "licenseCertificate": "-----BEGIN CERTIFICATE-----\r\nMIIEnjCCA4agAwIBAgIEyDnukzANBgkqhkiG9w0BA ...... Hn/UMGAGRB6xF4w+TewYqTAZrdhi/WLyYwg==\r\n-----END CERTIFICATE-----"
}

JSON Response Example (Success Case):

{"userId":13,"licenseId":12,"isError":false}

JSON Response Example (Error Case):

{"isError":true,"genericErrorText":"","writeAccessError":false,"licenseProviderError":false,"mapToUserError":false,"pricePlanError":false,"licenseCertificateAlreadyAddedError":false,"licenseCertificateError":true}

getServerSettings

Specific Request Fields:

  • [none]

Specific Error Flags:

  • [none]

JSON Response Example:

{
  "isServerMaintenanceMode":false,
  "isSignInSelectPricePlanFromMultipleValidLicenseCertificates":true,
  "isSignInExpiredAccountCanEnterLicenseCertificate":true,
  "isSignUpEnabled":true,
  "isSignUpRequiresInvitationTicket":false,
  "signUpDefaultPricePlanId":2,
  "signUpDefaultAccountExpiresInDays":14,
  "deleteExpiredUserAccountsAfterDays":183,
  "isError":false
}

setServerMaintenanceMode

Specific Request Fields:

  • serverMaintenanceMode

Specific Error Flags:

  • writeAccessError

JSON Request Example:

{
  "authTokenValue":"8mKSz1UzaQg17kfu",
  "action":"setServerMaintenanceMode",
  "serverMaintenanceMode":true
}

JSON Response Example (Success Case):

{"isServerMaintenanceMode":true,"isError":false}
Last modified July 4, 2021: API documentation added (5721646)