License
List Client License Information
List Client Host Details
Optional argument:verbose=0|1
GET https://pbuild:24351/pbrest/REST/v2.0/license/clients?appid=<appid>×tamp= <timestamp>&hmac=<hmac>
Without verbose:
RESPONSE { "clients" : [ {"lid":123, "uuid":"66fd4906-81c9-4739-8a27-308546af90ae", "fqdn":"myhost1.com", "addr" : "[ {\"family\": 4, \"port\" : 5678, \"addr\" : "192.168.1.1" }]", "lastupdated" : "2017-08-01", "retired" : "2017-08-01", "recycle" : "2017-09-01" }]}
With verbose:
RESPONSE { "clients" : [ {"lid":123, "uuid":"66fd4906-81c9-4739-8a27-308546af90ae", "fqdn":"myhost1.com", "addr" : "[ {\"family\": 4, \"port\" : 5678, \"addr\" : \"192.168.1.1\" }]", "lastupdated" : "2017-08-01", "retired" : "2017-08-01", "recycle" : "2017-09-01", "stats" : [ { "lid" : 123, "svc" : "pbpolicy", "firstupdated" : "2017-01-01", "lastupdated" : "2017-10-01"},{ "lid" : 123, "svc" : "sudopolicy", "firstupdated" : "2017-01-01", "lastupdated" : "2017-11-01"},{ "lid" : 123, "svc" : "fim", "firstupdated" : "2017-01-01", "lastupdated" : "2017-11-21"}] }]}
List Client Host Details
Optional argument:verbose=0|1
GET https://pbuild:24351/pbrest/REST/v2.0/license/clients/<host>?appid=<appid> ×tamp=<timestamp>&hmac=<hmac>
RESPONSE
As above, but only for one specified host.
List Client Host (wildcard) Details
Optional argument: verbose=0|1
GET https://pbuild:24351/pbrest/REST/v2.0/license/clients?appid=<appid>×tamp= <timestamp>&hmac=<hmac>&hostname=<wildcard>
RESPONSE
As above, but only for wildcarded hosts.
List Service License Information
List All Service Records
Optional argument:verbose=0|1
GET https://pbuild:24351/pbrest/REST/v2.0/license/svc?appid=<appid>×tamp= <timestamp>&hmac=<hmac>
Without verbose:
RESPONSE {"stats" : [ {"attr" : "PBULPolClnts", "cnt" : 800},{"attr" : "SudoPolClnts", "cnt" : 800},{"attr" : "ACAClnts", "cnt" : 800}]}
With verbose:
RESPONSE {"stats" : [ { "lid" : 123, "attr" : "PBULPolClnts", "firstupdated" : "2017-01-01", "lastupdated" : "2017-10-01"},{ "lid" : 123, "attr" : "SudoPolClnts", "firstupdated" : "2017-01-01", "lastupdated" : "2017-11-01"},{ "lid" : 123, "attr" : "ACAClnts", "firstupdated" : "2017-01-01", "lastupdated" : "2017-11-21"}] }]}
List Specified Service Records
Optional argument:verbose=0|1
GET https://pbuild:24351/pbrest/REST/v2.0/license/svc/<svctype>?appid=<appid>×tamp= <timestamp>&hmac=<hmac>
Without verbose:
RESPONSE {"stats" : [ {"attr" : "PBULPolClnts", "cnt" : 800}]}
With verbose:
RESPONSE {"stats" : [ { "lid" : 123, "attr" : "PBULPolClnts", "firstupdated" : "2017-01-01", "lastupdated" : "2017-10-01"}]}
Get License Record
Optional argument:verbose=0|1
GET https://pbuild:443/pbrest/REST/v2.0/license?appid=<appid>×tamp=<timestamp>&hmac=<hmac>
RESPONSE { "license" : { "PBULPolClnts":100, "SudoPolClnts":0, "RBPClnts":100, "ACAClnts":100, "AKAClnts":0, "FIMClnts":10, "SOLRClnts":2, "Expires":"2018/12/25 23:59:00", "Terminates":"2019/03/25 23:59:00", "HostId":"6fce4d59-7359-4c7e-a793-90f3989214a0", "Owner":"My Company PLC", "Comment":"This is the PBUL license for My Company", "AutoExpiry": 90, "Recycle": 30, "HMAC":"skSUgmkZ491x6Bzul2g5wg1/WsY6WbFUwMB8kT3zmro="}}
Put License Record
PUT https://pbuild:443/pbrest/REST/v2.0/license?appid=<appid>×tamp=<timestamp>&hmac=<hmac>
Args
{ "whoami" : "root", "license" : { "PBULPolClnts":100, "SudoPolClnts":0, "RBPClnts":100, "ACAClnts":100, "AKAClnts":0, "FIMClnts":10, "SOLRClnts":2, "Expires":"2018/12/25 23:59:00", "Terminates":"2019/03/25 23:59:00", "HostId":"6fce4d59-7359-4c7e-a793-90f3989214a0", "Owner":"My Company PLC", "Comment":"This is the PBUL license for My Company", "AutoExpiry": 90, "Recycle": 30, "HMAC":"skSUgmkZ491x6Bzul2g5wg1/WsY6WbFUwMB8kT3zmro="}}
Failure
RESPONSE {"status": 3828,"error": "3828.41 Failed to update License - Invalid argument"}
Retire Client Record
PUT https://pbuild:443/pbrest/REST/v2.0/license/retire?appid=<appid>×tamp= <timestamp>&hmac=<hmac>
By UUID
{ "whoami" : "root", "retire" : { "uuid" : "…" }}
By FQDN
{ "whoami" : "root", "retire" : { "fqdn" : "…" }}
By List
{ "whoami" : "root", "retire" : [ {"uuid" : "…" },{"uuid" : "…" }]}
RESPONSE {"status" : 0}
Process licensing write queues and send them to the primary license server:
PUT put_sync cd /usr/lib/beyondtrust/pb/rest/sbin ./pbconfigd --call '{ "appid" : "appid", "appkey" : "866bfc75-72d2-4dcf-9b08-4dbd9474a493", "request" : {"content_type" : "application/json", "method" : "GET", "uri" : "/v2/license/put_sync" }}'
RESPONSE Status: 200 Content-type: application/json {"status":0}
Retrieve licensing statistics from the primary license server and write them to the local pblicense.db:
GET get_sync cd /usr/lib/beyondtrust/pb/rest/sbin ./pbconfigd --call '{ "appid" : "appid", "appkey" : "866bfc75-72d2-4dcf-9b08-4dbd9474a493", "request" : {"content_type" : "application/json", "method" : "GET", "uri" : "/v2/license/get_sync" }}'
RESPONSE Status: 200 Content-type: application/json {"status":0}