Amazon API Gateway REST API Reference

usageplankey:by-id

Gets the UsagePlanKey resource of a given Id.

HTTP Request

GET /usageplans/<usageplanId>/keys/{keyId}

Template Variable

Response

UsagePlanKey

Remarks

Example

Request
GET /usageplans/n371pt/keys/4wj0d1lt91 HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
Content-Length: 58
X-Amz-Date: 20160805T180524Z
Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160805/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sigv4_hash}
Response

The successful response returns a 200 OK status code and a payload containing the specified UsagePlanKey resource.

{
  "_links": {
    "self": {
      "href": "/usageplans/n371pt/keys/4wj0d1lt91"
    }
  },
  "id": "4wj0d1lt91",
  "name": "MyApiKey",
  "type": "API_KEY"
}

See Also

Create and Use Usage Plans