This documentation supports the 21.02 version of BMC Helix Innovation Studio.To view an earlier version, select the version from the Product version menu.

Creating a command REST interface


Command (com.bmc.arsys.rx.services.common.Command) is a built-in resource that provides a simple way of providing a custom execute method with parameters. The purpose of command is to execute some code using parameters supplied with the PUT operation. Commands are the operations that have some operational effect on the system, such as starting a server, or take some business action (for example, close an incident).

Sample command Rest interface:

@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include =
JsonTypeInfo.As.PROPERTY, property = "resourceType")

public
abstract class Command implements Registerable
 …
public
class ClearApplicationDataCommand extends Command {
  …
    @AccessControlledMethod(authorization
= AuthorizationLevel.SubAdministrator, licensing =         LicensingLevel.Application,
checkSchemaForSpecialAccess = true, promoteStructAdmin = true)
    @Override
   public URI execute(UriInfo uriInfo) {
       processService =
ServiceLocator.getProcessService();
       recordService = ServiceLocator.getRecordService();
       deleteNoteTaskInstances();
       deleteSetOfProcessDefinition();
       return null;
    }
}

Related topics

PDFs-videos-and-API-documentation

Creating-a-DataPageQuery-REST-interface

Handling-exceptions

Creating-a-custom-REST-resource

Login-information

Enabling-and-downloading-logs-from-BMC-Helix-Innovation-Studio

Enabling-browser-logging-in-a-Digital-Service-application

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*