RLMCloud API
This document describes the RLMCloud web services API.
The RLMCloud API is described in the sections on the left. To view a section, click on the title on the left-hand side.
RLMCloud API Introduction
RLMCloud supports Web Services to control most aspects of the RLMCloud database and license servers. The API is implemented as a simple REST-style service, using JSON to encode the information going to and from the RLMCloud system. The API Overview section lists the functions which can be performed.The API is available in the following environments:
| Environment | Base URL |
|---|---|
| Production | https://Cloud.RepriseSoftware.com |
| Sandbox | https://Sandbox.RepriseSoftware.com |
| Beta | https://Beta.RepriseSoftware.com |
Pinned versions are located at <environment>/api/<version> (e.g. https://Cloud.RepriseSoftware.com/api/v14.2-001); the latest release is always available at <environment>/api.
Note that if you access the api at the /api location (no version segment), you will always get the latest released version of the API. If you want a particular version of the API, access it at the versioned URL instead (/api/v14.0-002 for version v14.0-002).
API Overview
The RLMCloud API functions live at <environment>/api/function.php (see the Introduction section for the list of environment base URLs). The API consists of 32 functions, organized into 9 API groups, as outlined in the following table:| URI | GET | POST | PUT | DELETE | Notes | |
|---|---|---|---|---|---|---|
| /api/current/company.php | lists companies | create new company | edit company info | delete company | ||
| /api/current/contact.php | lists contacts | create new contact | edit contact info | delete contact | ||
| /api/current/control.php | update server status | reread/restart server(s) | shutdown server(s) | Remove a license from a user | Removing a license requires the server ID and the license ID | |
| /api/current/license.php | list licenses | create new license | push license to server machine | delete license | ||
| /api/current/log.php | list report logs | get log | switch report log | delete log | ||
| /api/current/machines.php | list machines | --- | --- | --- | ||
| /api/current/product.php | list product definitions | create product definition | edit product definition | delete product definition | ||
| /api/current/server.php | list servers | create new server | edit server info | delete server | GET takes the contact id, DELETE removes all server data including licenses and shuts down server | |
| /api/current/status.php | list server status | list server usage (one server) | list license usage (one product) | --- |
All communications with the RLMCloud API are done over https: and the messages are encoded in JSON. Authentication is via the
Authorization: Bearer header
described in the Authentication section above, not a JSON body field -
if it's missing or invalid, a login error is returned. Each function's
own request parameters are described in the section for that API
group.
NOTE: some systems do not allow any data with a GET request. To accomodate this, the JSON header can contain a "method_override" member which tells the RLMCloud API to use this method rather than the one that was used. Add "method_override" to the JSON header and use any HTTP method you chose.
Record ids and the 2026-08-12 renumbering. Company, contact, product and license ids were renumbered when RLMCloud moved to the new portal. Any of them may still be sent in its old (pre-migration) value: the API looks the number up in both the old and the current numbering and uses whichever one names a record.
If the number names a record in each numbering - which can happen because both are ordinary counting numbers over overlapping ranges - the request is refused with RCCE_ID_AMBIGUOUS rather than a guess being made about which one you meant. Add an "id_space" member to the JSON header, set to either "legacy" or "current", to say which numbering the ids in that request use; it then looks in that one only. Any other value is refused with RCCE_BAD_ID_SPACE. Server ids (serverid) and machine ids (machid) were never renumbered and are unaffected.
Each function returns 3 values in the JSON data:
| field | meaning |
|---|---|
| status | Operation Status, "ERROR" or "OK" |
| message | Operation unique message |
| code | numeric status code for the operation |
There are some operations which can be done in the RLMCloud GUI which cannot be done in the API. This is by design; the following capabilities are not present in the API (note that most of these operations are performed very infrequently):
- configure failover servers
- configure and edit defaults: timeouts, color thresholds, options edit lock time, report log rotate, auto-save
- upload generator settings and server settings files
- refresh license data on all servers in one operation
- create or edit users or portal users
- Edit the _line_item or _id on generated licenses
- Edit options file
Each function is described in detail in the sections which follow.
API Authentication
Every request requires an HTTPAuthorization: Bearer <token> header. Two kinds of token are accepted, and the server tells them apart automatically by inspecting the token itself:
Secret key - an opaque per-ISV key. Send it as the bearer token by itself; the ISV is resolved from the key, so no other auth header is needed.
curl -X get -H "Content-Type: application/json" -H "Accept: application/json"
-H "Authorization: Bearer <secret-key>" https://beta.reprisesoftware.com/api/current/company.php
JWT - an OIDC-issued JSON Web Token. Send it as the bearer token, plus an additional
X-ISV-Name header naming which ISV's issuer/audience configuration to validate it against.
curl -X get -H "Content-Type: application/json" -H "Accept: application/json"
-H "Authorization: Bearer <jwt>" -H "X-ISV-Name: your-isv-name" https://beta.reprisesoftware.com/api/current/company.php
Access requirements are listed in each API section, but in general, GET methods require "view" access and the other methods require "edit" access - this is determined by the authenticated user's own permission level, not anything sent in the request.
Request parameters (not auth credentials) are still placed in the JSON header sent with every API function. For example, the JSON header to list product definitions with paging would look like this (this would be in the file "company.json"):
{
"header":
{
"active": "1",
"page": "1",
"version": "1",
"nlic": "1",
"pcreate": "2016-09-08"
}
}
It is important to use a different secret key/JWT identity for API access than for interactive portal access, otherwise interactive users will interfere with the API calls. If you have multiple processes using the API, they should use separate credentials as well.
Optional replay protection - both token types support an additive, opt-in mechanism to stop a captured request from being resent by someone other than the original caller. Neither is required; a request that doesn't participate behaves exactly as described above. Both mechanisms are enforced on every mutating request (POST/PUT/DELETE) across every api/current endpoint - GET is always read-only in this API and is never checked.
JWT mode - DPoP (RFC 9449): if your IdP issues DPoP-bound tokens (the token's claims include a
cnf.jkt thumbprint), send Authorization: DPoP <token> instead of Authorization: Bearer <token>, plus a signed proof JWT in a separate DPoP header covering the request method, URL, a timestamp, a one-time identifier, and a hash of the token itself. The server verifies the proof against the token's own key thumbprint, confirming you actually hold the private key rather than just a copy of the token. The proof's timestamp must be within 60 seconds of the server's clock, and each proof can only be used once.
Secret-key mode - nonce + timestamp: include a fresh, single-use
nonce and a timestamp in the JSON header alongside the usual fields. A request whose nonce has already been seen, or whose timestamp is more than 60 seconds old, is rejected. This is not equivalent to DPoP - it stops blind replay of a captured request, but not someone who has obtained the actual secret key, since they can mint valid nonces just as easily as the legitimate caller.
API Error Codes
All RLMCloud API functions return a value >= 0 for success, and < 0 for an error. The error codes are listed here. 0 is success with no other meaning. Values > 0 are described with each individual command. Status codes are returned in the "code" field of the JSON returned data:| Symbolic error | Error value | Meaning |
|---|---|---|
| General Errors | ||
| RCCE_NO_DECODE | -1 | Can't decode JSON header |
| RCCE_NO_HEADER | -2 | No header present |
| RCCE_NO_USERNAME | -3 | Username/Password missing from header |
| RCCE_BAD_USERNAME | -4 | Invalid Username/Password in header |
| RCCE_NO_ISV | -5 | Cannot determine ISV name from login |
| RCCE_OVERRIDE | -6 | Invalid override method |
| RCCE_BAD_METHOD | -7 | Invalid method |
| RCCE_NO_VIEW | -8 | User has no view priv |
| RCCE_NO_MANAGE | -9 | User has no manage priv |
| RCCE_NO_EDIT | -10 | User has no edit priv |
| RCCE_NO_ADMIN | -11 | User has no admin priv |
| RCCE_NO_COMPID | -12 | No company id specified |
| RCCE_NO_CONTID | -13 | No contact id specified |
| RCCE_NO_PRODID | -14 | No product id specified |
| RCCE_NO_SERVID | -15 | No server id specified |
| RCCE_NO_MACHID | -16 | No machine id specified |
| RCCE_NO_INST | -17 | No company instance specified |
| RCCE_CANT_OPEN_DB | -18 | Cannot open database |
| RCCE_ID_AMBIGUOUS | -19 | The id sent names one record in each numbering space; re-send with id_space |
| RCCE_BAD_ID_SPACE | -20 | id_space must be \"legacy\" or \"current\" |
| Company method Errors | ||
| RCCE_CO_BLANK | -101 | Company name blank |
| RCCE_CO_DUP | -102 | Company or abbrev duplicate of another |
| RCCE_CO_NOWRITE | -103 | Company record not written |
| RCCE_CO_HASCONT | -104 | Company has contacts; can't delete |
| RCCE_CO_NODEL | -105 | Company record not deleted |
| RCCE_CO_ABBREV | -106 | Can't change abbreviation if servers present |
| RCCE_CO_NOCOMP | -107 | Can't find company for this ID |
| RCCE_CO_TOOLONG | -108 | Company abbreviation too long (> 25 chars) |
| RCCE_CO_HASILL | -109 | Company abbreviation contains illegal characters (space, digit, quote, < > &) |
| Contact method Errors | ||
| RCCE_SERV_HASCONT | -201 | Server records have this contact; can't delete |
| RCCE_CONT_NODEL | -202 | Contact record not deleted |
| RCCE_CONT_BLANK | -203 | Contact name blank |
| RCCE_CONT_NOWRITE | -204 | Contact record not written |
| RCCE_CONT_NOEMAIL | -205 | Contact email blank |
| RCCE_CONT_BADEMAIL | -206 | Contact email not a valid address |
| RCCE_CONT_DUPEMAIL | -207 | Contact email already in use |
| Control method Errors | ||
| RCCE_CTRL_BADSERV | -301 | server ID \< 0 |
| RCCE_CTRL_NOSERV | -302 | Cannot find server ID |
| RCCE_CTRL_REREAD | -303 | Reread failed (see msg) |
| RCCE_CTRL_SHUT | -304 | Shutdown failed (see msg) |
| RCCE_CTRL_UNKMACH | -305 | Unknown machine ID for this ISV |
| RCCE_CTRL_HANDLE | -306 | License handle not specified for remove |
| RCCE_CTRL_NOREM | -307 | License not removed (see msg) |
| License method Errors | ||
| RCCE_NO_LIC | -401 | License ID NULL |
| RCCE_NO_LICENSE | -402 | License ID not found |
| RCCE_LIC_NOWRITE | -403 | License record not written |
| RCCE_LIC_NOPROD | -404 | Product ID not found |
| RCCE_LIC_NOSERV | -405 | No Server for company id/instance |
| RCCE_LIC_NOSIGN | -406 | License push wrote but did not sign (see msg) |
| Log method Errors | ||
| RCCE_LOG_NOSERV | -501 | Cannot find server ID |
| RCCE_LOG_NOREM | -502 | Logfile was not removed |
| RCCE_LOG_NOLOG | -503 | Logfile must be specified (put) |
| Machines method Errors | ||
| None | No Machines-specific errors | |
| Product method Errors | ||
| RCCE_PROD_BLANK | -701 | Product name or prod def name blank |
| RCCE_PROD_NOWRITE | -702 | Product Definition record not written |
| RCCE_PROD_HASLIC | -703 | Licenses use this product defintion, can't be deleted |
| RCCE_PROD_NODEL | -704 | Product Defintion record not deleted |
| Server method Errors | ||
| RCCE_SERV_NOMACH | -801 | No machine ID |
| RCCE_SERV_UNKMACH | -802 | Unknown machine ID for this ISV |
| RCCE_SERV_UNKCONT | -803 | Unknown contact ID for this ISV |
| RCCE_SERV_NOWRITE | -804 | Server record not written |
| RCCE_SERV_NODEL | -805 | Server record not deleted |
| RCCE_SERV_NOTFOUND | -806 | Server record not found for delete |
| RCCE_SERV_NOSERV | -807 | Can't read server info for push |
| RCCE_SERV_BADPW | -808 | Server password has invalid format |
| Status method Errors | ||
| RCCE_STAT_NONE | -901 | Can't read server status |
| RCCE_STAT_NOSERV | -902 | Can't get server info |
| RCCE_SERV_NOPOOL | -903 | No license pool specified |
All error codes are defined in rcc_status.php
API Details - company
RLMCloud API - Company functions
The company functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/company.php | lists companies | create new company | edit company info | delete company |
| RLMCloud access required | view | edit | edit | edit |
| Success status return | # of company records | company ID | 0 | 0 |
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| page | Page number for get | --- |
| id | company id | put and delete |
| company | company name | post and put |
| abbrev | company abbreviation (optional) | --- |
POST requires a unique company name. All other company data, including
abbrev/next_abbrev, is optional for POST and PUT.
GET takes a company name which will be matched as a case-insensitive substring against the company names in the database. So, for example "fr" will match "Fred" or "Acme Company of France".
NOTE: If you create a company without creating any contacts for that company, the company will not appear in the RLMCloud customer browser.
To retrieve all company entries, increment the page parameter until the request retrieves 0 entries. Pages are 10 entries long. Also, if you retrieve a page with fewer than 10 entries, it is the last page.
The following example retrieves the 3rd page of company entries:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @company.json
https://beta.reprisesoftware.com/api/current/company.php
and in company.json:
{
"header":
{
"page": "3"
}
}
This command will return data which
is similar to this (when printed with a php "print_r"
call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => 2 rows found [code] => 3 )
[1] => Array (
[0] => stdClass Object ( [company_id] => 39 [isvname] => rcdemo
[company] => performance testing server [abbrev] =>
[next_abbrev] => 0 [addr1] => [addr2] => [addr3] =>
[city] => [state] => [zip] => [country] => [c_notes] =>
[u1] => [u2] => [u3] => [u4] => [u5] => [u6] => [u7] =>
[u8] => [u9] => [u10] =>)
[1] => stdClass Object ( [company_id] => 36 [isvname] => rcdemo
[company] => stress tests server [abbrev] =>
[next_abbrev] => 0 [addr1] => [addr2] => [addr3] =>
[city] => [state] => [zip] => [country] => [c_notes] =>
[u1] => [u2] => [u3] => [u4] => [u5] => [u6] => [u7] =>
[u8] => [u9] => [u10] => )
)
)
NOTE:
abbrev and next_abbrev are optional on POST/PUT (still validated the same way when supplied - see the Company method Errors above), and are stored in/read back from the company's legacy_data. Companies migrated from the previous system return whatever abbrev/next_abbrev they had; companies with no value on either path return blank/0. Omitting them on a PUT leaves whatever was previously stored untouched; explicitly submitting an empty abbrev or a next_abbrev of 0 clears it.
API Details - contact
RLMCloud API - Contact functions
The contact functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/contact.php | lists contacts | create new contact | edit contact info | delete contact |
| RLMCloud access required | view | edit | edit | edit |
| Success status return | # of contact records | 0 | 0 | 0 |
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| page | Page number for get | --- |
| contact_id | contact id | put and delete |
| company_id | company id | put and post, optional for get |
| contact | contact name | post and put |
| title | contact title | --- |
| phone | contact phone# | --- |
| fax | contact fax# | --- |
| contact email | post and put | |
| info | contact information | --- |
| ccreate | contact creation date | --- |
POST and PUT require a company id, contact name, and email address. The email address must be a valid address and must not already be in use by another contact for this ISV. All other contact data is optional for POST and PUT.
To retrieve all contact entries, increment the page parameter until the request retrieves 0 entries. Pages are 50 entries long. Also, if you retrieve a page with fewer than 50 entries, it is the last page.
The following example retrieves the 1st page of contact entries:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @contact.json
https://beta.reprisesoftware.com/api/current/contact.php
and in contact.json:
{
"header":
{
"page": "1"
}
}
This command will return data which
is similar to this (when printed with a php "print_r"
call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => 2 rows found [code] => 3 )
[1] => Array (
[0] => stdClass Object ( [contact_id] => 44 [isvname] => rcdemo
[contact] => Jane Doe [title] => Purchasing [phone] => [fax] =>
[email] => jane.doe@example.com [info] => [company_id] => 36 [ccreate] => 2015-12-27)
[1] => stdClass Object ( [contact_id] => 48 [isvname] => rcdemo
[contact] => Joe Smith [title] => Chief Bottlewasher
[phone] => [fax] => [email] => joe.smith@example.com [info] => [company_id] => 39
[ccreate] => 2016-02-18 )
)
)
API Details - control
RLMCloud API - Control functions
The Control functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/control.php | update server status | reread/restart server | shut down server | remove user's license |
| RLMCloud access required | manage | manage | manage | manage |
| Success status return | 0 | 0 | 0 | 0 |
Authentication is via the
Authorization header (see the Authentication section above). All functions also require:| field | meaning |
|---|---|
| serverid | server id for all cmds. (for post and put, use 0 for RLM + the Redirector) for get, use 0 to update status of all servers |
In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| machid | Machine ID | get, post, put |
| license_handle | license handle for delete | delete |
All commands return 0 for success, or an error code.
The following example refreshes the status of license server id 1111 on machine ID 123:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @control.json
https://beta.reprisesoftware.com/api/current/control.php
and in control.json:
{
"header":
{
"serverid": "1111",
"machid": "123"
}
}
API Details - license
RLMCloud API - License functions
The License functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/license.php | lists fulfilled licenses | create new license | push licenses to server | delete license |
| RLMCloud access required | view | edit | manage | edit |
| Success status return | # of licenses | 0 | 0 | 0 |
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.You can specify a company_id or product_id which will qualify the GET results. In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | - |
| page | Page number for list | - |
| id | license id for list and delete | delete |
| company_id | company id: filters get results, and with comp_instance names the target server for create and push | - |
| comp_instance | company instance of the target server for create and push (omitted means instance 0). Only servers that predate the migration have one | - |
| serverid | target server id for create and push. Required unless company_id is sent | post, put |
| product_id | product id for get, create | post |
| bundle_id | bundle id, if this license is part of a bundle | - |
| count | count for create | post |
| exp | exp date for create | - |
| lver | version for create | - |
| misc | Optional keyword=val for create | - |
| notes | Notes for create | - |
Naming the target server on create (post) and push (put):
Either send
serverid, the server's own id, or send
company_id together with comp_instance - the
addressing used before RLMCloud moved to the new database. An omitted
comp_instance means instance 0.
Servers created since the migration have no company instance and never will, so
serverid is the only way to reach one. A
company_id/comp_instance pair that names no server returns
RCCE_LIC_NOSERV.
A request may send both. They must agree: if the
serverid and the pair name two different servers the request
is refused with RCCE_ID_AMBIGUOUS rather than one of them being chosen,
because writing a license to a server the client did not ask for is worse
than an error. If the pair names no server at all, the
serverid is used.
Some notes on the push (put) command:
1. This command writes the files on the server (creating dirs if necessary), and performs a reread on the server.
2. If failover servers are configured, this command writes the license files on the failover and performs a reread.
3. For success, there will be 2 or 3 status returns from this command, all with an OK/0 status:
- "Licenses pushed to primary hostname"
- "Licenses pushed to failover hostname" (if configured)
- "All Licenses pushed"
To retrieve all licenses , increment the page parameter until the request retrieves 0 entries. Pages are 100 entries long. Also, if you retrieve a page with fewer than 100 entries, it is the last page.
The following example creates a license for server ID 107, using product definition 102 with a count of 5 and the defaults for expiration from the product definiton, while overriding the version to 7.3:
curl -X post -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @license.json
https://beta.reprisesoftware.com/api/current/license.php
and in license.json:
{
"header":
{
"serverid": "107",
"product_id": "102",
"count": "5",
"lver": "7.3"
}
}
This command will return the following status
(when printed with a php "print_r"
call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => License Record Written [code] => 0 )
)
API Details - log
RLMCloud API - Log file functions
The Log file functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/log.php | list all report logs | get log file | switch report log | remove log file |
| RLMCloud access required | manage | manage | manage | manage |
| Success status return | # of report log files | size of log file | 0 | 0 |
Authentication is via the
Authorization header (see the Authentication section above). All functions also require:| field | meaning |
|---|---|
| machid | Machine ID |
| serverid | server id |
In addition, the following parameter can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| filename | Log filename. Empty for debug log. | post, put, delete |
For success, GET returns the # of files, POST returns the file size, PUT and DELETE return 0.
Note that the POST operation will not necessarily return the entire log file - results are limited to approximately 32kb.
If you need to retrieve the entire report log, use the Auto-Save Reportlogs feature to FTP the log files from the license server node. This can be set up using the Admin->Options screen on the customer portal.
The following example returns the list of all report logs on machine ID 123, server ID 456:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @log.json
https://beta.reprisesoftware.com/api/current/log.php
and in log.json:
{
"header":
{
"serverid": "456",
"machid": "123"
}
}
This command will return data which is similar to this (when printed with a php "print_r" call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => 3 rows found [code] => 3 )
[1] => Array (
[1] => stdClass Object ( [filename] => joebobsam.rl )
[2] => stdClass Object ( [filename] => joebobsam.rl.2016.09.23)
[0] => stdClass Object ( [filename] => joebobsam.rl.2016.09.24)
)
)
(Note that the array indicies are not necessarily in order, because the log file list command performs an alpha sort on the log file names.)
API Details - machines
RLMCloud API - Machine functions
The machines function lists all license server machines:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/machines.php | lists machines | --- | --- | --- |
| RLMCloud access required | view | --- | --- | --- |
| Success status return | # of machine records | --- | --- | --- |
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.In addition, the following parameter can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
The GET command returns the following machine data, for all machines, in an array of JSON objects:
| member | meaning |
|---|---|
| machid | Machine ID |
| isvname | ISV Name |
| servername | Machine's hostname |
| ipaddr | Machine's IP address |
| hostid | Machine's hostid |
| well_known_port | RLM redirector port |
| failover ID | Failover Machine's ID, if non-zero |
| location | Machine's datacenter location |
The following example retrieves all machine records:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer "
https://beta.reprisesoftware.com/api/current/machines.php
For our test account, with 2 servers configured, the return is similar to this (when printed with a php "print_r" call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => 2 rows found [code] => 2 )
[1] => Array (
[0] => stdClass Object ( [machid] => 40 [isvname] => rcdemo [servername] => ls1.rlmcloud.com [ipaddr] => 47.48.49.50 [hostid] => 00002d3a2963 [well_known_port] => 5053 [failover_id] => 42 [location] => NY )
[1] => stdClass Object ( [machid] => 42 [isvname] => rcdemo [servername] => ls2.rlmcloud.com [ipaddr] => 104.105.106.107 [hostid] => 000068f5247f [well_known_port] => 5053 [failover_id] => 40 [location] => SF ) ) )
)
)
API Details - product
RLMCloud API - Product functions
The Product functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/product.php | lists product definitions | create new product definition | edit product definition | delete product definition |
| RLMCloud access required | view | edit | edit | edit |
| Success status return | # of product definitions | 0 | 0 | 0 |
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.You can specify a product name, which will be used to qualify the results. The name will be treated as a regular expression. In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| page | Page number for get | --- |
| id | product defintion id | for put and delete |
| active | active flag (0/1) for post and put | --- |
| name | product definition name for get, post, and put | post and put |
| product | product name for get, post, and put | post and put |
| version | product version | post and put |
| version_type | product version type for post and put | --- |
| upgrade_version | product upgrade version for post and put | --- |
| lictype | license type for post and put | --- |
| token_def | token definition for post and put | --- |
| issued | issued flag (0/1) for post and put | --- |
| misc | misc parameters for post and put | --- |
| nlic | # licenses to generate for post and put | --- |
| pcreate | creation date for post and put | --- |
| cache | client cache for post and put | --- |
| hold | hold time for post and put | --- |
| max_roam | max roam time for post and put | --- |
| max_roam_count | max roam count for post and put | --- |
| share | sharing spec for post and put | --- |
| meter_counter | meter counter for post and put | --- |
| meter_dec | meter decrement for post and put | --- |
| meter_period | meter period for post and put | --- |
| meter_period_dec | meter period decrement for post and put | --- |
| named | named user (0/1) for post and put | --- |
| named_hours | named user hours for post and put | --- |
The GET command returns the following product data for all selected products in an array of JSON objects:
| member | meaning |
|---|---|
| id | product defintion id |
| active | active flag (0=inactive/1=active) |
| name | product definition name |
| product | product (license) name |
| version | product version |
| version_type | product version type (0=normal, 1=date-based) |
| upgrade_version | product upgrade version |
| exp | license expiration (0=permanent, n=n days, dd-mmm-yy=actual date) |
| lictype | license type (0=floating, 1=nodelocked, uncounted, 10: token, unlocked, 11: token, locked, 12: metered) |
| token_def | token definition |
| issued | issued flag (0/1) |
| misc | misc parameters |
| prod_id | product ID of "primary" product |
| nlic | # licenses multiplier |
| pcreate | creation date |
| cache | client cache time |
| hold | hold time |
| max_roam | max roam time |
| max_roam_count | max roam count |
| share | sharing spec ('u', 'h', or 'i' or any combination) |
| meter_counter | meter counter # |
| meter_dec | meter decrement |
| meter_period | meter period |
| meter_period_dec | meter period decrement |
| named | named user (0=no/1=yes) |
| named_hours | named user hours |
To retrieve all products , increment the page parameter until the request retrieves 0 entries. Pages are 50 entries long. Also, if you retrieve a page with fewer than 50 entries, it is the last page.
The following example creates a product definition for "testprod" which generates a single "test" v1.0 floating license which does not expire:
curl -X post -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @product.json
https://beta.reprisesoftware.com/api/current/product.php
and in product.json:
{
"header":
{
"active": "1",
"name": "testprod",
"product": "test",
"version": "1.0",
"exp": "0",
"nlic": "1",
"pcreate": "2016-09-08"
}
}
This command will return the following status
(when printed with a php "print_r"
call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => Product Definition Written [code] => 0 )
)
API Details - server
RLMCloud API - Server functions
The Server functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/server.php | list servers | create new server | edit server | delete server |
| RLMCloud access required | view | edit | edit | edit |
| Success status return | # of servers | 0 | 0 | 0 |
In addition to the database operations, the "delete server" function removes all files associated with the license server on the server machine, and shuts down the server.
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| company_id | Company ID for get, post, and put (optional for post/put if contact_id is given - the contact's own company_id is used instead) | --- |
| contact_id | Contact ID for get, post, and put - optional for post/put; if given, must belong to this ISV | --- |
| machid | Machine ID for get, post, and put | post, put |
| name | Server display name for post and put - optional; if omitted or blank, falls back to abbrev if given, otherwise defaults to the generated server_id. On put, omitting/blanking it leaves the existing name unchanged. | --- |
| abbrev | Deprecated old-style alias for name on post/put - kept only for backward compatibility with old clients; new integrations should rely on the generated server_id instead | --- |
| page | Page number for get | --- |
| pw | ISV server password for post and put - optional; if omitted on post, a random 20-character password is generated, and if omitted on put, the server's existing password is kept unchanged. If given, must be 1-32 characters of letters, numbers, hyphens, or underscores. | --- |
| serverid | server id for get, put and delete | put, delete |
The GET command returns the following server data, for all servers, in an array of JSON objects:
| member | meaning |
|---|---|
| comp_instance | Company instance for this server |
| company_id | Company ID associated with server |
| contact_id | Contact ID associated with server |
| machid | Machine ID |
| port | RLM ISV server port |
| pw | License password for this ISV instance |
| server_instance | RLM ISV server instance # |
| serverid | Server ID |
| server | Server's unique server_id identifier (the rcc_helper directory/namespace identifier - distinct from the numeric serverid db record id) |
| server_name | Server's display name |
To retrieve all servers, increment the page parameter until the request retrieves 0 entries. Pages are 100 entries long. Also, if you retrieve a page with fewer than 100 entries, it is the last page.
The following example lists all license servers on page 1:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @server.json
https://beta.reprisesoftware.com/api/current/server.php
and in server.json:
{
"header":
{
"page": "1"
}
}
This command will return a server list similar to the following
(when printed with a php "print_r"
call and reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => 3 rows found [code] => 9 )
[1] => Array (
[0] => stdClass Object ( [serverid] => 178 [machid] => 49
[company_id] => 98 [contact_id] => 59 [comp_instance] => 59
[server_instance] => 39 [port] => 5139 [pw] => xyz123
[server] => AB1C234 [server_name] => ls1-server )
[1] => stdClass Object ( [serverid] => 180 [machid] => 49
[company_id] => 98 [contact_id] => 59 [comp_instance] => 61
[server_instance] => 39 [port] => 5141 [pw] => abc123
[server] => XY9Z001 [server_name] => ls2-server )
[3] => stdClass Object ( [serverid] => 187 [machid] => 49
[company_id] => 98 [contact_id] => 59 [comp_instance] => 63
[server_instance] => 39 [port] => 5143 [pw] => deffed
[server] => QW4E567 [server_name] => ls3-server )
)
)
API Details - status
RLMCloud API - Status functions
The Status functions perform the following operations:| URI | GET | POST | PUT | DELETE |
|---|---|---|---|---|
| /api/current/status.php | list all server status | list server usage | list license usage | --- |
| RLMCloud access required | manage | manage | manage | --- |
| Success status return | # of servers | # of license pools | # of users (1 if no users) | --- |
Authentication is via the
Authorization header (see the Authentication section above) - no separate auth fields are required in the JSON header.In addition, the following parameters can be specified:
| field | meaning | Required for |
|---|---|---|
| method_override | override requested method | --- |
| page | Page number for get | - |
| serverid | server id for get, post, and put | post, put |
| machid | Optional machine id for post, and put | --- |
| pool | license pool # for put | put |
| prod | product name for put | put |
The optional machine id can be specified for the POST and PUT commands in order to retrieve information from the failover host. If unspecified, all data returned is from the primary host.
The GET command returns the following data in an array of JSON objects:
| member | meaning |
|---|---|
| serverid | server ID for post and put |
| server_instance | server instance # |
| port | ISV server port # |
| abbrev | server abbreviation |
| servername | server machine name |
| status | server status: 0->down, 1->up |
| serving_licenses | if status == 1: 1->serving licenses, != 1: up, not serving licenses |
| failhost | failover server hostname, if applicable |
| failstat | failover server status: 0->down, 1->up |
The POST command returns the following data, for all license pools, in an array of JSON objects:
| member | meaning |
|---|---|
| license_pool | license pool # |
| license | license name |
| id | server ID |
| isvname | ISV name |
| servername | Server hostname |
| port | ISV port # |
| fullabbrev | server abreviation |
| ver | license version |
| total_inuse | total licenses in use |
The PUT command returns the following license usage data, for a single license pool, in an array of JSON objects. If user=="", then only the "literal" member is valid:
| member | meaning |
|---|---|
| license_pool | license pool # |
| license | license name |
| user | user name |
| host | host name |
| count | checkout count |
| ver | requested license version |
| what | "checkout" or "queued" |
| out | checkout or queued time |
| license_handle | License Handle (used for remove) |
| literal | literal string if user=="", usually "No Users" |
To retrieve all status, increment the page parameter until the request retrieves 0 entries. Pages are 100 entries long. Also, if you retrieve a page with fewer than 100 entries, it is the last page.
The following example lists the status all license servers on page 1:
curl -X get -H "Content-Type: application/json"
-H "Accept: application/json" -H "Authorization: Bearer " -d @status.json
https://beta.reprisesoftware.com/api/current/status.php
and in status.json:
{
"header":
{
"page": "1"
}
}
For our test server, with 9 servers configured all with failovers, the
return is similar to this (when printed with a php "print_r" call and
reformatted slightly):
Array (
[0] => stdClass Object ( [status] => OK [message] => 9 rows found [code] => 9 )
[1] => Array (
[0] => stdClass Object ( [serverid] => 137 [server_instance] => 39 [port] => 5139 [abbrev] => joe29 [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[1] => stdClass Object ( [serverid] => 138 [server_instance] => 4 [port] => 5104 [abbrev] => sam [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[2] => stdClass Object ( [serverid] => 141 [server_instance] => 6 [port] => 5106 [abbrev] => dave [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[3] => stdClass Object ( [serverid] => 146 [server_instance] => 11 [port] => 5111 [abbrev] => jim1 [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[4] => stdClass Object ( [serverid] => 147 [server_instance] => 12 [port] => 5112 [abbrev] => stress [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[5] => stdClass Object ( [serverid] => 176 [server_instance] => 58 [port] => 5158 [abbrev] => joe44 [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[6] => stdClass Object ( [serverid] => 1817 [server_instance] => 454 [port] => 5554 [abbrev] => x [servername] => ls1.rlmserver.com [status] => 0 [failhost] => ls2.rlmcloud.com [failstat] => 0 )
[7] => stdClass Object ( [serverid] => 1804 [server_instance] => 452 [port] => 5552 [abbrev] => testsuite [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
[8] => stdClass Object ( [serverid] => 338 [server_instance] => 187 [port] => 5287 [abbrev] => RSI2 [servername] => ls1.rlmserver.com [serving_licenses] => 1 [status] => 1 [failhost] => ls2.rlmcloud.com [failstat] => 1 )
)
)