Developer Function: Script: $p.apiUrl
## Overview
This section explains the methods that can be used to obtain URL values when making an API request via an Ajax POST request.
## Syntax
##### JavaScript
```
$p.apiUrl(
<Site ID>,
<Action Type>
);
```
## Description Of Each Parameter
|Parameter name|Description|
|:--|:--|
|Site ID|Site ID for which you want to get the URL|
|Action type|get, create, update, delete|
## Usage Example
(1) Create a folder or table. In this example, the site ID is 109 and the action type is get.
(2) Create a new [Script](/en/manual/table-management-script), write the script content below, check [List](/en/manual/table-management-grid) as the output destination, and update. For Wiki, check "Edit" as the output destination.
##### JavaScript
```
alert('The generated URL is [' + $p.apiUrl(99999,'get') + ']');
```
(3) Go to the list screen.
##### Result
```
The generated URL is [/api/items/99999/get].
```