Updated on 2022-02-21 GMT+08:00

Querying a Custom Authorizer List

Function

This API is used to query a list of custom authorizers that match specified conditions.

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/authorizers[?page_size, page_no, id, name, 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, 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

ID of a custom authorizer

name

No

String

Name of the custom authorizer

type

No

String

Type of the custom authorizer

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 custom authorizers that match the query conditions

size

Integer

Length of the returned custom authorizer list

authorizer_list

Array

Custom authorizer list

Table 4 Parameter description of authorizer_list

Parameter

Type

Description

id

String

ID of the custom authorizer

name

String

Name of the custom authorizer

type

String

Type of the custom authorizer, which can be:

  • FRONTEND
  • BACKEND

authorizer_type

String

Value: FUNC

authorizer_uri

String

Function URN

identities

Array

Certification source

ttl

Integer

Cache duration

user_data

String

User data

create_time

Time

Time when the custom authorizer is created

Table 5 Parameter description of identities

Parameter

Type

Description

name

String

Parameter name

location

String

Parameter location, which can be:

  • HEADER
  • QUERY

Example response:

{
    "total":1,
    "size":1,
    "authorizer_list":[
        {
            "name":"Authorizer_9dlh",
            "type":"FRONTEND",
            "authorizer_type":"FUNC",
            "authorizer_uri":"urn:fss:regionexample:dbb5762c88f045c6a1427a952bcae284:function:default:test111",
            "identities":[
                {
                    "name":"Authorization",
                    "location":"HEADER",
                }
            ],
            "ttl":10,
            "user_data":"aaaa",
            "id":"7345e3fe4047491ebd8ecb0acd665a4c",
            "create_time":"2020-01-19T11:48:56Z"
        }
    ]
}

Status Codes

Table 6 Status codes

Status Code

Description

201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Server Internal Error