> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:script

> Use arc:script to create script blocks that respond to specific REST methods, enabling REST-like services in ArcScript.

export const siteNameShort = "Arc";

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 {siteNameShort}Script.
* **language**: Whether to use the Python scripting language while writing scripts. See [Writing Python](../writing-python) for details.

## 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.

```xml theme={null}
<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>
```
