This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
Control-M Automation API
All versions of Control-M Automation API
Q1. How to uninstall Control-M Automation API (CLI)?
A1. Run: npm uninstall -g ctm-cli ( -g is required if installed for all users)
Q2. How to download the page from the Control-M/Enterprise Manager Server on the AWS?
A2. Refer to latest release notes for download instructions.
Q3. How to install Control-M Automation API ctm-api package?
A3. Install it as root on Unix so its accessible to all users using npm (Node Package Manager)
Run: npm install -g ctm-cli.tgz (-g is for global install, otherwise drop -g)
Q4. How to register an environment for AWS machine?
A4. ctm env add https://<controlm.myorg.com>:8443/automation-api <emuser> <empassword>
Q5. How to enable Debug for Control-M Automation API?
A5. Modify log4j properties file under <Control-M EM Home>/ctm_em/etc/emweb/automation-api
For example, ~/ctm_em/etc/emweb/automation-api/emrestsrv-log4j.properties
- set the following line to either one of the following: ALL, TRACE, DEBUG, INFO
- set the following line to DEBUG:
- recycle emrestsrv using 'emrestsrv stop' and then 'emrestsrv start'
- From PADEV 9.0.00.500 in Control-M/Enterprise Manager the REST server starts automatically after being stopped.
- The logs are in file~: /ctm_em/log/emrestsrv.log
- After reproducing the problem, reset back the lines as follows and recycle the emrest server.
Q6. Where can I find the Control-M Automation API reference?
A6: The full reference can be accessed from the Automation API's url, at:
https://<EM Web Server Hostname>:8443/automation-api/swagger-ui.html
Note the the local Tomcat installation defaults to a self-signed test certificate so the above URL is https only, from Control-M 184.108.40.206 and on only a secure connection is supported for the AAPI.
The online Code Reference is at:
Q7. What are the Control-M/EM privileges needed for login with Control-M Automation API?
A7. AAPI uses ctmcli and needs to get 2 tokens for login. One from the GUI Server (GSR) and a second from the Control-M Configuration Server (CMS). Because of this it needs login privileges for both as defined in the CCM under Authorizations for the user that is attempting to login. Specifically in Privileges for "Control-M Configuration Manager" and "Control-M Workload Automation, Utilities........"
Q8. Is it possible to create/update/delete Conditions or Scheduling criteria if the Jobs/Folders are already in the Active Jobs Folder Table in the Control-M Server Database?
A8: Job properties can be modified using 'run job::modify'. Please refer to Services section of the
ctm run job::modify <jobDefinitionsFile> <jobId>
Q9. How do the versions of the Control-M Automation API relate to the version of the Control-M Enterprise Manager Server?
API EM Server version
API CLI version
Q10. What is the default timeout value for AAPI requests
A10. 10000 miliseconds
Q11. What Application job types are supported Automation API
A11. As of release 9.0.20
Q12. How to enable trace on the client side
A12. Use -trace option to send the debug output to the console
example: ctm conf servers –trace
Q13. Is it possible to connect to AAPI through Single SignOn ?
A13. Currently, as of version 9.0.19, it is necessary to supply user and password to obtain a token to be used for subsequent requests.
The following RFE
CTM-1806 - A better way of authenticating to the AAPI.
has been created to address this need.
Q14. How do you perform a health check using Control-M Automation API command line interface (CLI) ?
A14. ctm config servers::get
Q15. Is it possible to manage all EM components using AAPI calls?
A15. Currently, as of version 9.0.20, through the "config" AAPI service it is possible to partially manage CTM Server and CTM Agent only for all the other components you need to use "em ctl" or "ccmcli"
the following RFE
CTM-3354 - Ability to manage all EM components through Automation API REST calls
has been opened to address this need.
Customers viewing this solution may find value in the following self-help Connect with Control-M video.