Amazon API Gateway REST API Reference

requestvalidator:by-id

Gets the RequestValidator of a given identifier for a specified API.

HTTP Request

GET /restapis/<restapi_id>/requestvalidators/{requestvalidator_id}

Template Variable

Response

RequestValidator

Remarks

Example: Get the specified RequestValidator of an API

Request

The following example request retrieves the RequestValidator instance of a specified identifier (1t3hul) for the given RestApi (mkhqppt4e4):

GET /restapis/mkhqppt4e4/requestvalidators/1t3hul HTTP/1.1
Content-Type: application/json
Host: apigateway.us-east-1.amazonaws.com
X-Amz-Date: 20170223T172652Z
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": {
    "self": {
      "href": "/restapis/mkhqppt4e4/requestvalidators/1t3hul"
    },
    "request-validator-delete": {
      "href": "/restapis/mkhqppt4e4/requestvalidators/1t3hul"
    },
    "request-validator-update": {
      "href": "/restapis/mkhqppt4e4/requestvalidators/1t3hul"
    }
  },
  "id": "1t3hul",
  "name": "params-only",
  "validateRequestBody": false,
  "validateRequestParameters": true
}

When the retrieved RequestValidator is associated with a method, Amazon API Gateway will validate the request by verifying the required request parameters are valid before forwarding the request to the back end.

See Also

AWS CLI