Querying the IP addresses of WAF
Function
This API is used to query WAF IP addresses.
URI
GET /v1/{project_id}/waf/config/source-ip
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. |
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 |
---|---|---|
source_ip |
Array of IpsItem objects |
Origin server information list |
last_modify |
Long |
Last time the WAF IP addresses are updated. |
Parameter |
Type |
Description |
---|---|---|
ips |
Array of strings |
WAF retrieval IP address |
update_time |
Long |
Time the WAF IP addresses are updated. |
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 WAF IP addresses in a project. The project ID is specified by project_id.
GET https://{endpoint}/v1/{project_id}/waf/config/source-ip
Example Responses
Status code: 200
IP addresses of WAF
{ "source_ip" : [ { "ips" : [ "122.112.208.32/28", "49.4.56.64/27", "2407:c080:804::/48" ], "update_time" : 1573779840000 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
IP addresses of WAF |
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.