ServiceAPI Properties

In this section, the ServiceAPI class properties are presented in alphabetical order.

Description

Use the HttpMethod property to return the HTTP method that was invoked for the transaction.

Example

If %This.ServiceAPI.HttpMethod = %AppService_HTTP_GET then
   /* process a GET request */
End-If;

Description

Use the InputRows property to get values on the specified row.

Example

&Inst = %This.ServiceAPI.InputRows [1].getParameter("instrument");

Description

Use the IsChatbot property to determine whether the request came from ODA.

Example

if %This.ServiceAPI.IsChatbot then
/* perform Chatbot specific update */
End-if;

Description

Use the OutputRows property to set values on the specified row.

Example

%This.ServiceAPI.OutputRows [1].setParameter("numPlayers", 3);

Description

Use the OverrideResultStateDesc property to override the result state description.

Example

%This.ServiceAPI.ResultState = "Failure";
%This.ServiceAPI.OverrideResultStateDesc = "bad data";

Description

Use the ResultState property to set the result state to be returned for the request.

Example

%This.ServiceAPI.ResultState = "SUCCESS - PLAY MUSIC";

Description

The root resource of the URI that was used to invoke the application service request.

Example

&RootResource = %This.ServiceAPI.RootResource;

Description

The service ID that is used to invoke the application service request.

Example

&SrvID = %This.ServiceAPI.ServiceID;

Description

Use the URIIndex property to return the URI index that is invoked as defined on the application service.

Example

If %This.ServiceAPI.HttpMethod = %AppService_HTTP_GET Then
   If %This.ServiceAPI.URIIndex = 1 Then
      /* process request */
   End-if;
End-if;