Here you can download a file with example configurations for the scripted REST API: [SOC] - Scripted REST API. Import the pack to your instance and try the following example settings.
Example 1. Get a system property value without authorization
To verify the example:
- Go to the main page of your instance.
- Add to the URL bar the following value: /v1/api/c_simple/api_module_path/api_action_path?param_1=value_1.
- Copy the result URL.
- Go to the URL in Incognito mode.
As a result, you receive a response from the API action /record/sys_api_action/164054047017513732 with a system property value simple.auth_page.support_phone.
Example 2. Create a task record with an attachment
To verify the example:
- Open the record /record/sys_script/164053985417710860 .
- Click Run to run the script.
As a result, you receive a response from the API action /record/sys_api_action/161831494014244852.
On the bottom of the script form, there is a link to the created task record. See the screenshot below:

The record contains two attachments with base 64 files transferred in lines 14-15 of the script in Step 1. See the screenshot below:
Features and recommendations
- API action script is executed regardless of ACL.
- Authorization of requests to the Scripted REST API is not possible with Basic Auth. To authorize, use the solution described above in the Authorization section.
- A reply to the API action containing a key error with a value Undefined index: SimpleApiResponse means the script API action contains an error.
- To avoid data corruption, convert JSON data type into type String using a JSON.stringify() method.
- If the execution time of the API action script exceeds the Timeout, move a part of the script to the Event Script and call a system event with an API action script.