http://apigateway.{region}.amazonaws.com/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body.
The string identifier of the associated RestApi.
Specifies a test invoke method request's resource ID.
Specifies a test invoke method request's HTTP method.
The simulated request body of an incoming invocation request.
A key-value map of headers to simulate an incoming invocation request.
A key-value map of stage variables to simulate an invocation on a deployed Stage.
The headers as a map from string to list of values to simulate an incoming invocation request.
A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'http://apigateway.{region}.amazonaws.com/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}http://apigateway.{region}.amazonaws.com/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body.
The string identifier of the associated RestApi.
Specifies a test invoke method request's resource ID.
Specifies a test invoke method request's HTTP method.
The simulated request body of an incoming invocation request.
A key-value map of headers to simulate an incoming invocation request.
A key-value map of stage variables to simulate an invocation on a deployed Stage.
The headers as a map from string to list of values to simulate an incoming invocation request.
A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'http://apigateway.{region}.amazonaws.com/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}