Amazon API Gateway REST API Reference

restapi:authorizers

Gets an API's collection of custom authorizers that is represented as an Authorizers instance.

HTTP Request

GET /restapis/<restapi_id>/authorizers{?limit}

Template Variable

Response

Authorizers

Remarks

Example: Get the collection of custom authorizers defined for an API

Request

The following example request retrieves the collection of custom authorizers for an API:

GET /restapis/86l3267lf6/authorizers HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
Content-Length: 60
X-Amz-Date: 20170223T175134Z
Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
Response

The successful response returns the 200 OK status code and a payload similar to the following:

{
  "_links": {
    "curies": {
      "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-authorizer-{rel}.html&quot;,
      "name": "authorizer",
      "templated": true
    },
    "self": {
      "href": "/restapis/86l3267lf6/authorizers"
    },
    "authorizer:by-id": {
      "href": "/restapis/86l3267lf6/authorizers/{authorizer_id}",
      "templated": true
    },
    "authorizer:create": {
      "href": "/restapis/86l3267lf6/authorizers"
    },
    "item": {
      "href": "/restapis/86l3267lf6/authorizers/bs9803"
    }
  },
  "_embedded": {
    "item": {
      "_links": {
        "self": {
          "href": "/restapis/86l3267lf6/authorizers/bs9803"
        },
        "authorizer:delete": {
          "href": "/restapis/86l3267lf6/authorizers/bs9803"
        },
        "authorizer:update": {
          "href": "/restapis/86l3267lf6/authorizers/bs9803"
        }
      },
      "authType": "custom",
      "authorizerResultTtlInSeconds": 300,
      "authorizerUri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:myCustomAuthorizer/invocations",
      "id": "bs9803",
      "identitySource": "method.request.header.Authorization",
      "name": "myCustomAuth",
      "type": "TOKEN"
    }
  }
}

See Also

AWS CLI