arc:script
Version 24.2.9039
Version 24.2.9039
arc:script
Use the arc:script keyword to create script blocks that respond to REST methods.
Parameters
- method: The HTTP method (GET, POST, PUT/PATCH/MERGE, or DELETE) used to invoke the script. Specify multiple methods in a comma-separated list. You can use this to create REST-like services in ArcScript.
Control Attributes
None
Example
The following script defines the GetTransmissionDetails
service. It is only executed when GetTransmissionDetails
is accessed using the POST method. The input parameters are defined in the body of the HTTP request.
<arc:script xmlns:arc="http://www.arcesb.com/ns/ArcScript/2">
<arc:restrict user="admin" role="Administrators"/>
<arc:info title="GetTransmissionDetails" description="Retrieves the transmission details of the application.">
<input name="ConnectorId" desc="The id of the connector." required="true"/>
<input name="MessageId" desc="The message Id." required="true"/>
<input name="Direction" desc="The direction of the transmission." values="Incoming,Outgoing" required="true"/>
<output name="LogTimeCreated" desc="The time the log file was created."/>
<output name="LogType" desc="The type of the log file." />
<output name="LogFile" desc="The name of the log file." />
<output name="LogPath" desc="The path of the log file." />
</arc:info>
<arc:script method="POST">
<arc:push op="portGetTransmissionDetails" />
</arc:script>
</arc:script>