Using the API Demo Project for Python
The Python demo project allows you to explore the basic functionalities of the Apex Central APIs.
The API demo project requires Python 3.6 (or later).
-
On a system running Python 3.6 (or later), install the following modules.
-
pycryptodome
-
hashlib
-
PyJWT
-
- Download the API demo project file from:
- Decompress the Python3DemoScript.zip folder.
-
In the extracted Python3DemoScript.py file, locate and
specify the following settings.
-
use_url_base
: The URL of the Apex Central server without theWebApp
Example:
https://192.168.121.223:443
-
use_application_id:
The application ID generated by Apex Central -
use_api_key
: The API key generated by Apex Central
-
-
Execute the demo script, which will access the APIs and perform the following
actions.
-
Attempt to get and print product agents with
hostname="BENPFUOSCECLIEN"
Note:You can change the
hostname
criteria directly in the Python script to specify any product agent. -
Attempt to uninstall a product agent with
entity_id="123456780114-694DBF9D-2018-0618-1930"
Note:You can change the
entity_id
criteria directly in the Python script to specify any product agent.
-