The Automation 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 Automation API demo project file from:
http://docs.trendmicro.com/all/ent/tmcm/v7.0/en-us/api/Python3DemoScript.zip
- 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 the WebApp
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 Automation 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.
-