Overview
This article explains how to add multiple endpoints to JetPatch in bulk using the REST API and Python scripts.
The process involves creating a CSV file with endpoint details and executing a Python script from the JetPatch server.
Prerequisites
1. Python version 3.4 and up on the JetPatch server. Learn more about intigua-python-client RPM
2. SSH to JetPatch server
3. Create a CSV file (use the example below) or use the one attached at the bottom of the article. Be sure to remove the example row once the CSV is completed.
| /opt/intigua-python-client/intigua_addservers.example.csv |
4. Use the attached text file as a sample for adding the appropriate operating system to your .csv (See JetPatch supported platforms before running the script)
5. Create an API key. Refer to Granting API Permission URL for more details.
Run Script
Execute the command from JetPatch Server (make sure you are under dir /opt/intigua-python-client/)
| #python3 intigua_addservers.py --apikey <APIKEY> --url https://<DNS>/vmanage-server/rest/rest-api --user <username> --file <filename>.csv |
Newly-added endpoints appear in the endpoint list with the initial status of Untested. Upon first connector deployment or upon a manual Refresh status from the Servers tab, the connection status will be updated.
Troubleshooting
Test your credentials:
| #python3 intigua_display_credentials.py --apikey <APIKEY> --url https://<DNS>/vmanage-server/rest/rest-api --user <username> |
The result of this command should be:
Successfully fetched Credentials
| Note: If there is still an issue, try creating a new local Administrator account and generate a new API key. |
Comments
0 comments
Please sign in to leave a comment.