Amazon API Gateway REST API Reference

authorizer:by-id

Gets the Authorizer resource representing a custom authorizer of a specified identifier.

HTTP Request

GET /restapis/<restapi_id>/authorizers/{authorizer_id}

Template Variable

Response

Authorizer

Remarks

Example: Retrieve a custom authorizer of a given authorizer identifier

Request

GET /restapis/mxsmn867vb/authorizers/40j2n8 HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20170223T231032Z
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 a 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/mxsmn867vb/authorizers/40j2n8"
    },
    "authorizer:delete": {
      "href": "/restapis/mxsmn867vb/authorizers/40j2n8"
    },
    "authorizer:update": {
      "href": "/restapis/mxsmn867vb/authorizers/40j2n8"
    }
  },
  "authType": "custom",
  "authorizerResultTtlInSeconds": 300,
  "authorizerUri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:myApiAuthroizer/invocations",
  "id": "40j2n8",
  "identitySource": "method.request.header.Auth",
  "name": "my-cust-auth",
  "type": "TOKEN"
}

See Also

AWS CLI