Adding a Tenant IP Address Whitelist
Function
Add a tenant IP address whitelist.
URI
POST /v4/tenant/trusted-ip-addresses
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Request Body
| Parameter | Type | Description |
|---|---|---|
| ip_type | String | Format type. The value can be a specified IP address, IP address segment, or CIDR block. |
| ip_start | String | Start IP address. |
| ip_end | String | End IP Address. |
| view_flag | String | Whether to allow access to the repository. |
| download_flag | String | Whether to allow code download. |
| upload_flag | String | Whether to allow code commit. |
| remark | String | Remarks. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | String | Association result. |
| user_id | Integer | User ID. |
| domain_id | String | Tenant ID. |
| ip_range | String | IP address segment. |
| ip_type | Integer | Response error. |
| ip_start | String | Start IP address. |
| ip_end | String | End IP Address. |
| view_flag | Integer | Whether to allow access to the repository. |
| download_flag | Integer | Whether to allow code download. |
| upload_flag | Integer | Whether to allow code commit. |
| remark | String | Remarks. |
| created_at | String | Creation time. |
| updated_at | String | Update time. |
| order_flag | Integer | Sorting order. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
POST https://{endpoint}/v4/tenant/setting/trusted-ip-addresses Example Responses
Status code: 200
{
"id": "58119",
"remark": "",
"ip_range": "2.2.2.5",
"ip_type": 0,
"ip_start": "2.2.2.5",
"ip_end": "2.2.2.5",
"view_flag": 1,
"download_flag": 1,
"upload_flag": 1,
"created_at": "Nov 6, 2024 4:58:05 PM",
"updated_at": "Nov 6, 2024 4:58:05 PM",
"order_flag": 1,
"user_id": 7574,
"domain_id": "********************************"
} Status Code
| Status Code | Description |
|---|---|
| 200 | OK |
Error code.
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.