Querying IP Address Groups
Function
Querying IP Address Groups
URI
GET /v1/{project_id}/waf/ip-groups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. To obtain it, go to Cloud management console and hover the cursor over your username. On the displayed window, choose My Credentials.Then, in the Projects area, view Project ID of the corresponding project. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
You can obtain the ID by calling the ListEnterpriseProject API of EPS. |
page |
No |
Integer |
Page number. The default value is 1. Default: 1 |
pagesize |
No |
Integer |
Number of records on each page. A maximum of 100 records can be displayed on a page. The default value is 10. Default: 10 |
name |
No |
String |
Name of the IP address group. Fuzzy search is supported. |
ip |
No |
String |
IP addresses or IP address ranges. If this parameter is specified, the address group that contains the specified IP address or IP address ranges are queried. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Content-Type |
Yes |
String |
Content type. Default: application/json;charset=utf8 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of IP address groups in the current enterprise project. Only local address groups are listed. |
items |
Array of IpGroupBody objects |
Details about IP address groups |
cloudTotal |
Integer |
Total number of IP address groups, including local and shared address groups. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of the IP address group |
name |
String |
IP address group name |
ips |
String |
Address group IP addresses (IP addresses or IP address ranges are separated by commas (,). |
size |
Integer |
Length of the IP address group |
rules |
Array of RuleInfo objects |
List of rules that use the IP address group |
share_info |
ShareInfo object |
Sharing information |
description |
String |
Address group description |
Parameter |
Type |
Description |
---|---|---|
rule_id |
String |
Rule ID |
rule_name |
String |
Rule name |
policy_id |
String |
Policy ID |
policy_name |
String |
Policy Name |
Parameter |
Type |
Description |
---|---|---|
share_count |
Integer |
Total number of the users who share the address group. |
accept_count |
Integer |
Number of users who accept the sharing |
process_status |
Integer |
Status |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Requests
The following example shows how to query the address group list in a project. The project ID is specified by project_id.
GET https://{Endpoint}/v1/{project_id}/waf/ip-groups?enterprise_project_id=0
Example Responses
Status code: 200
Request succeeded.
{ "total" : 1, "items" : [ { "description" : "", "id" : "c36e896b18ee486a81026fce8e69fb1a", "ips" : "xxx.xx.xx.xx", "name" : "sfddf", "rules" : [ ], "share_info" : { "accept_count" : 0, "process_status" : 0, "share_count" : 0 } } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Request failed. |
401 |
The token does not have required permissions. |
500 |
Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.