Some API functions are made public to allow users to interact with the license
server while allowing integration into 3rd party tools. The python script
webapiclient.py
already wraps writing API requests to any of our servers
that support the common API interface into a convenient client side interface.
Note
It is strongly recommended to send requests only using the kwargs. Using the kwargs as opposed to args gives some reliability as the position of an arg may change or even might be removed in a future release. Incorrect args will likely result in an error whereas kwargs that are no longer know to the server will just be ignored.
Using the webapiclient.py
interface.
import webapiclient service = webapiclient.Service("http://localhost:1715/api") response = service.cmd_ls("arg1", arg="value")
Example retrieving server information from a local sesinetd.
function_name = "cmd_ls" args = ["arg1"] kwargs = {"arg": "value"} body = dict(json=dumps([function_name, args, kwargs])) endpoint_url = "http://localhost:1715/api" headers = dict() headers["Content-Type"] = "application/x-www-form-urlencoded" requests.post(endpoint_url, data=data, headers=header)
The webapiclient.py
and using direct python create the same general HTTP request.
POST /api HTTP/1.1 Host: localhost:1715 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 43 json=["cmd_ls", ["args"], {"arg": "value"}]
API ¶
Administrative ¶
-
Add a user to the list of users with administrative permissions.
-
Remove users from the list of users with administrative permissions.
-
Retrieve Administrative Information
Retrieve the administrative information for the license server.
Licenses ¶
-
Retrieving key list information
Retrieve server information from sesinetd.
Partition System ¶
-
Delete an existing license set from sesinetd.
-
Retrieve the dynamic users for a license set.
-
Retrieve license set information for a specific license set.
-
Retrieve Partitioned License Info
Retrieve partition information for all licenses.
-
Update information for the license set or create a new license set with the given information.
-
Update the partition rules for the given license set.
-
Update the user rules for the given license set.
Server ¶
-
Ping the server to see if its responsive.
-
Inform sesinetd to refresh its DNS cache.
Webhook ¶
-
Change subscription for an event with the webhook.
-
Change the url for the webhook.
-
Enable or disable the webhook.
-
Retrieve information about the webhook.