Server Automation REST APIs
The Server Automation REST API lets you execute, schedule, and monitor Automation Plans over HTTPS using a standard, OS-independent interface; first-time connections may require trusting a self-signed certificate.
It offers Java- and NodeJS-based deployments (with new features on the NodeJS service) and a simple workflow where a GET returns plan XML to complete, and a POST executes the plan, with a predictable URL structure and Swagger documentation.
Interacting with Server Automation via the REST API
Deployment environment
- Java-based web application deployed within a WebSphere Application Server with Liberty Profile
- NodeJS-based web application
Java-based web application
This REST API is a Java-based web application deployed within an IBM WebSphere Application Server (WAS) with Liberty Profile. This application is installed/uninstalled by means of two tasks that can be found on the "Server Automation" site, namely:
(ID: 108) Deploy Server Automation REST API
(ID: 109) Remove Server Automation REST API
Starting and stopping this server are controlled by means of a Windows service called "WASLibertyService". This service is automatically started after installation but requires manual starting after a host machine restart. The server logs can be found at:
<INSTALL ROOT>\wlp\usr\servers\defaultServer\logs
NodeJS-based web application
(ID: 157) Deploy Server Automation REST API
(ID: 158) Remove Server Automation REST API
SARESTService". The server logs can be found
at:<INSTALL ROOT>\sa_rest_node\Logs
- In Fixlet (ID: 157), both HTTP and HTTPS ports are configurable. The default HTTP port is 8080 and the HTTPS port is 8443. The user needs to update the default HTTP and HTTPS ports before installation. If the computer already runs the legacy WAS Liberty-based service, the user can still install Fixlet 157 on any available ports.
- The application runs only on Windows computers.
How it works
- Schedule a plan action
- Specify a custom name for new plan actions created via REST
- Enable/disable pre-fetching
- any required parameters for a plan step
- any required parameters for the corresponding failure step (if a failure step has been defined)
- one or more target computers (by name and/or ID) or one or more target groups (by name)
Demonstration application
- Run an Automation Plan
- Schedule an automation plan action
- Specify a custom name for a plan action before creating it
- Enable pre-fetching
- Monitor a running Automation Plan
Functionality
- Run an Automation Plan
- Schedule an automation plan action
- Specify a custom name for an automation plan action when creating it
- Enable pre-fetching
- Monitor a running Automation Plan
- Use a plan containing Fixlets requiring parameter encryption
- Use a plan containing Fixlets with advanced parameters
General URL format
Requests must conform to this basic format:
/serverautomation/{resource}/{site type}/{site name}/{object id}
| Path attribute | Description |
|---|---|
| {resource} | The desired resource:
|
| {site type} | The type of site:
|
| {site name} | The name of the site, for example, Server Automation.
|
| {object id} | The ID of the object that you are requesting; this varies by context but is generally the integer value ID of an object in the database. If the OBJECT_ID is not supplied, the request might display a description of objects in this site for this resource. |
Scheduling settings
- Set <HasStartTime> to 'true' and use "StartDateTime" to set dd-MMM-yyyy, HH:mm:ss, for example, 01-May-2025,06:20:39.
- Set <HasEndTime> to 'true' and use "EndDateTime" to set dd-MMM-yyyy, HH:mm:ss, for example, 01-May-2025,06:20:39.
- The end time setting only controls when the resulting plan action expires.
- By default, the SA REST API considers the client local time only.
Sample response content
<?xml version="1.0" encoding="UTF-8"?> <sa-rest xmlns="http://iemfsa.tivoli.ibm.com/REST" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <execute-plan action-name="MEPPRD-Z372-Plan BigFix Plan for Verify BigFix Services" prefetch="false"> <step sequence="101" name="Run Plan MEPPRD-Z372-Plan BigFix Plan for Verify BigFix Services"> <target-set> <computer name="WINBIGFIX95" id="6215959"></computer> </target-set> </step> <schedule> <HasStartTime>false</HasStartTime> <StartDateTime>01-May-2025,06:20:39</StartDateTime> <HasEndTime>false</HasEndTime> <EndDateTime>03-May-2025,06:20:39</EndDateTime> </schedule> <execution-order> <step id="101" depends=""> <on-failure action="StopPlan" targets="IncludeFailed" threshold="0"></on-failure> </step> </execution-order> </execute-plan> </sa-rest>