Swagger Command examples
Submit a command to execute.
Swagger POST /command example
- Expand the Command section.
- Click POST /command.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Specify the request body in the following format, where
commandNameis the name of a command listed in thecommandNametables in https://server-name/ws/powerscui/command,elementIdis the fully-qualified name of the system on which to execute the command, andargumentsare the command-specific arguments that are listed in the table.
For example, for the refreshStaus command that does not accept any arguments:{ "orders": [ { "commandName" : "command", "elementId" : "system name", "arguments" : command arguments }, : : ] }{ "orders": [ { "commandName" : "refreshStatus", "elementId" : "system-name.com" }, : : ] } - Click Execute.Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
Response body { "KBM_TYPE": "commandHandlerResponse", "results": [ { "KBM_TYPE": "result", "elementId": "system-name.com", "commandName": "refreshStatus", "resultKey": "OK", "result": "4" } ] }
Swagger POST /command/results example
Submit the results command to execute.
- Expand the Command section.
- Click POST /command/results.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Determine the result status that you want. The result status is displayed in the response to a
POST /command API call. For
example:
Response body { "KBM_TYPE": "commandHandlerResponse", "results": [ { "KBM_TYPE": "result", "elementId": "system-name.com", "commandName": "refreshStatus", "resultKey": "OK", "result": "4" <-- } ] } - Supply the request body in the following format:
{ "keys": [ "4" ] } - Click Execute.Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
Response body { "KBM_TYPE": "commandResultsHandlerResponse", "results": { "4": { "uid": "6681249854347280387", "commandName": "refreshStatus", "bestName": "system-name.com", "resultKey": "OK", "result": "" } } }
Swagger GET /timelineEvents example
Get the list of events by event type.
- Expand the Command section.
- Click POST /timelineEvents.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Enter a UID or hostname in the text box and click Add item. Click Add item again to specify additional systems.
- Enter the name of an existing group in the groupName text box.
- Optionally, click includeHidden and set it to true to include hidden events. A hidden event is not otherwise included in the number of events.
- Specify a from-date in the fromDate field in the format MM/DD/YYYY. You can modify the dates to increase or decrease the time range.
- Specify a to-date in the toDate field in the format MM/DD/YYYY. You can modify the dates to increase or decrease the time range.
- Select the event types to receive in the eventTypes field. You can control the events that are displayed in the report. The event types include RTC, Auditd, TE, Compliance, and UpToDate.
- Click Execute.
Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.

Swagger POST /blackboard example
Hide, unhide, or delete events for the specified time period.
- Expand the Command section.
- Click POST /blackboard example.
- Click Try it Out.
- Enter a UID or hostname in the text box and click Add string item. Click Add string item again to specify additional systems.
- Enter the name of an existing group in the groupName text box and click Add string item. Click Add string item again to specify additional groups.
- Click Hide and set it to true to hide the events. Or, click Delete and set it to true to delete the events. You cannot specify both.
- Specify a from-date in the fromDate field in the format MM/DD/YYYY. You can modify the dates to increase or decrease the time range.
- Specify a to-date in the toDate field in the format MM/DD/YYYY. You can modify the dates to increase or decrease the time range.
- Specify an event ID to affect only that event. You can use Swagger GET /blackboard example to get the current event IDs.
- Click Execute.
Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.


Swagger GET /blackboard example
Get the list of events.
- Expand the Command section.
- Click GET /blackboard example.
- Click Try it Out.
- Enter a UID or hostname in the text box and click Add string item. Click Add string item again to specify additional systems.
- Enter the name of an existing group in the groupName text box and click Add string item. Click Add string item again to specify additional groups.
- Click varmap and set it to true if you want to get the details associated with the event.
- Click includeHidden if you want to include hidden events.
- For AUDITD_CONTENT_CHANGED events only, click identityVarValue
to provide additional granularity for a specific AUDITD_CONTENT_CHANGED event. For
example, if the PowerSC GUI displays
/test/test1.txtin the details for an Auditd: Content Changed event, specify/test/test1.txtin the identityVarValue field. - Click categoryId and specify an event category to get only
events of a specific category. To get the possible category values from your existing
events, perform the following steps:
- Do not specify categoryId.
- Execute GET /blackboard example.
- Obtain the category values from the response.
- Click limit to set the maximum number of events to return.
- Click Execute.
Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.

Swagger GET /ruleFailures example
Get a list of the failed compliance rules.
- Expand the Command section.
- Click POST /command.
- Click Try it Out.
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Specify the request body in the following format, where
checkCompliancechecks the compliance level as described in thecommandNametables in https://server-name/ws/powerscui/command, andelementIdis the fully-qualified name of the system on which to execute the command.{ "orders": [ { "commandName": "checkCompliance", "elementId": "system name" } ] } - Click Execute.
Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
- Click GET /ruleFailures.
- Click Try it Out.
- Enter a UID or hostname in the text box. Click Add item to specify additional systems.
- Enter the name of an existing group in the groupName text box.
- Leave the Operation control set to null to get any failed rules for the last checked profile. Choose compatibility to get any failed rules for the last simulated profile check you performed in the PowerSC graphical user interface (GUI).
- Select the media type from the drop-down menu. This controls the header accept type in the curl command. Possible values are application/json and application/xml.
- Click Execute.Swagger UI submits the request and shows the curl command that was submitted. If successful, the Responses section shows the response with an HTTP status code of 200 OK.
Response body { "KBM_TYPE": "root", "tuples": [ { "KBM_TYPE": "tuple", "uid": "6692429250491842561", "bestName": "system name", "operation": "check", "logEntryTimestamp": 1595605256000, "complianceLevel": "CISv1", "ruleName": "cisv1_telnet_0DA0C685", "ruleDescription": "Implements CIS Recommendations AIX6.1-1.3.24 and AIX7.1-3.3.24 (Level 1): Disable telnet in /etc/inetd.conf: Comments the entry for telnet daemon in /etc/inetd.conf and kills all instances of telnetd.", "argumentsPassed": "/etc/security/pscexpert/bin/cominetdconf telnet tcp d cisv1_telnet", "ruleStatus": false, "reasonForFailure": " Service telnet using protocol tcp should be disabled, however it is now enabled.\n" }, : :