Updated on 2022-09-01 GMT+08:00

Querying the Access Control Policy List

Function

This API is used to query the list of all access control policies.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

GET

/v1.0/apigw/acls[?page_size, page_no, id, name, acl_type, entity_type]

  • A combination of different query conditions can be added at the end of the URI by using question marks (?) and ampersands (&).
  • Query conditions include: id, name, acl_type, entity_type, page_size, and page_no.

The following table lists the parameters in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

No

String

Access control policy ID

name

No

String

Access control policy name

acl_type

No

String

Access control type, which can be PERMIT or DENY

entity_type

No

String

Object type, which can be IP or DOMAIN

page_size

No

Integer

Number of records displayed on each page. The default value is 20.

page_no

No

Integer

Page number. The default value is 1.

precise_search

No

String

Parameter name (name) for exact matching

Request

N/A

Response

Table 3 Parameter description

Parameter

Type

Description

size

Integer

Number of access control policies displayed on the current page

total

Integer

Total number of access control policies

acls

Dictionary

Access control policy list

Table 4 Parameter description of acls

Parameter

Type

Description

id

String

Access control policy ID

acl_name

String

Access control policy name

acl_type

String

Access control type, which can be:

  • PERMIT (whitelist)
  • DENY (blacklist)

acl_value

String

Access control objects

entity_type

String

Object type, which can be:

  • IP
  • DOMAIN

update_time

Timestamp

Time when the access control policy was last updated

bind_num

Integer

Number of APIs to which the access control policy has been bound

Example response:

{
	"total": 1,
	"size": 1,
	"acls": [{
		"id": "d402b35e-1054-4280-b1c5-0d741a28c995",
		"acl_name": "goodone",
		"entity_type": "DOMAIN",
		"acl_type": "PERMIT",
		"acl_value": "19asdfaf-adfadf",
		"update_time": "2017-11-18T14:27:36.918578+08:00",
                "bind_num":1
	}]
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

500

Server Internal Error