# Get sandbox site - GetSandboxSite

## Overview

Get sandbox site




## Usage

You can choose any of the following methods to initiate an API request:
- Multi-language OpenSDK /  /
- [CloudShell](https://shell.ucloud.cn/)

## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetSandboxSite`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.ucloud.cn/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](https://docs.ucloud.cn/api/summary/signature)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [Region and Zone List](https://docs.ucloud.cn/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the [GetProjectList API](https://docs.ucloud.cn/api/summary/get_project_list) |No|
| **Zone** | string | Zone. See [Region and Zone List](https://docs.ucloud.cn/api/summary/regionlist) |**Yes**|
| **SandboxID** | string | Sandbox ID |**Yes**|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Site** | [*Site*](#site) | Site |**Yes**|

#### Data Model

#### Site

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Name** | string | Name |**Yes**|
| **Ready** | boolean | Ready |**Yes**|
| **ID** | string | Site ID |**Yes**|
| **SandboxID** | string | Sandbox ID |**Yes**|
| **Host** | string | Access Host |**Yes**|
| **KeyID** | string | Key ID |**Yes**|
| **UpdateTime** | int | Update time |**Yes**|
| **AccessCode** | string | AccessCode |**Yes**|
| **ConnectKey** | string | Connect Key |**Yes**|
| **Envs** | array[string] | Site env. format: ["key=value"] |No|
| **CustomDomain** | string | Custom Domain |No|
| **CustomDomainStatus** | string | Custom Domain Status |No|
| **CustomDomainError** | string | Custom Domain Error |No|
| **IPAccess** | [*SiteIPAccess*](#siteipaccess) | IP Access |No|

#### SiteIPAccess

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **IPList** | array[string] | IP List |No|
| **Mode** | string | IP restriction mode "": no IP restriction, "allow": custom whitelist, "deny": custom blacklist |No|

## Example

### Request Example
```
https://api.ucloud.cn/?Action=GetSandboxSite
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=jxcEgoPx
&SandboxID=GAEUrsgw
```

### Response Example
```json
{
  "Action": "GetSandboxSiteResponse",
  "RetCode": 0,
  "Site": {}
}
```
