Help Center> API Gateway> API Reference (Paris Region)> Shared Gateway APIs> Binding Access Control Policies> Querying the List of Access Control Policies Bound to an API
Updated on 2022-02-21 GMT+08:00

Querying the List of Access Control Policies Bound to an API

Function

This API is used to query the list of access control policies that have been bound to a specified API.

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/acl-bindings/binded-acls[?page_no,page_size,api_id,env_id,env_name,acl_id,acl_name]

  • A combination of different query conditions can be added at the end of the URI by using question marks (?) and ampersands (&).
  • Query conditions include: api_id, env_id, env_name, acl_id, acl_name, page_size, and page_no.

The following table lists the parameters in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

api_id

Yes

String

API ID

env_id

No

String

Environment ID

env_name

No

String

Environment name

acl_id

No

String

Access control policy ID

acl_name

No

String

Access control policy name

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.

Request

N/A

Response

Table 3 Parameter description

Parameter

Type

Description

total

Integer

Number of access control policies bound to the API

size

Integer

Number of returned access control policies

acls

Dictionary

Access control policy list

Table 4 Parameter description of acls

Parameter

Type

Description

acl_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
  • ADMIN

env_id

String

ID of the environment in which the access control policy takes effect

env_name

String

Name of the environment in which the access control policy takes effect

bind_id

String

Binding ID

bind_time

Timestamp

Time when the access control policy is bound to the API

Example response:

{
  "total": 1,
  "size": 1,
  "acls": [
    {
      "acl_id": "206bb985d8a04ec09f13c3e51ef77095",
      "acl_name": "acl_001",
      "entity_type": "IP",
      "acl_type": "PERMIT",
      "acl_value": "192.168.1.14,192.168.2.0/24,192.168.1.8-192.168.1.110",
      "env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID",
      "env_name": "RELEASE",
      "bind_id": "4ffc0da71ddd4c22add8ff801e19846c",
      "bind_time": "2018-07-27T11:27:10Z"
    }
  ]
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

403

Forbidden

404

Not Found

500

Server Internal Error