Post Schema to API Gateway

POST {{baseUrl}}/restapis?mode=import

This request posts the schemaContent to AWS API Gateway in awsRegion. It is called when a new schema is uploaded to AWS API Gateway. In the test scripts, awsAPIId is set to the AWS API Gateway ID.

The successful response returns a 201 OK and a RestApi resource representing the newly created API in API Gateway.

Request Params

KeyDatatypeRequiredDescription
modestring

HEADERS

KeyDatatypeRequiredDescription
x-mock-response-namestring

RESPONSES

status: Created

{"_links":{"curies":[{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-authorizer-{rel}.html","name":"authorizer","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-deployment-{rel}.html","name":"deployment","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-documentationpart-{rel}.html","name":"documentationpart","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-documentationversion-{rel}.html","name":"documentationversion","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-gatewayresponse-{rel}.html","name":"gatewayresponse","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-model-{rel}.html","name":"model","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-requestvalidator-{rel}.html","name":"requestvalidator","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-resource-{rel}.html","name":"resource","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-restapi-{rel}.html","name":"restapi","templated":true},{"href":"http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-stage-{rel}.html","name":"stage","templated":true}],"self":{"href":"/restapis/{{awsAPIId}}"},"authorizer:by-id":{"href":"/restapis/{{awsAPIId}}/authorizers/{authorizer_id}","templated":true},"authorizer:create":{"href":"/restapis/{{awsAPIId}}/authorizers"},"deployment:by-id":{"href":"/restapis/{{awsAPIId}}/deployments/{deployment_id}{?embed}","templated":true},"deployment:create":{"href":"/restapis/{{awsAPIId}}/deployments"},"documentationpart:by-id":{"href":"/restapis/{{awsAPIId}}/documentation/parts/{part_id}","templated":true},"documentationpart:create":{"href":"/restapis/{{awsAPIId}}/documentation/parts"},"documentationpart:import":{"href":"/restapis/{{awsAPIId}}/documentation/parts?failonwarnings=false{\u0026mode}","templated":true},"documentationversion:by-version":{"href":"/restapis/{{awsAPIId}}/documentation/versions/{doc_version}","templated":true},"documentationversion:create":{"href":"/restapis/{{awsAPIId}}/documentation/versions"},"gatewayresponse:by-type":{"href":"/restapis/{{awsAPIId}}/gatewayresponses/{response_type}","templated":true},"gatewayresponse:put":{"href":"/restapis/{{awsAPIId}}/gatewayresponses/{response_type}","templated":true},"model:by-name":{"href":"/restapis/{{awsAPIId}}/models/{model_name}?flatten=false","templated":true},"model:create":{"href":"/restapis/{{awsAPIId}}/models"},"requestvalidator:by-id":{"href":"/restapis/{{awsAPIId}}/requestvalidators/{requestvalidator_id}","templated":true},"requestvalidator:create":{"href":"/restapis/{{awsAPIId}}/requestvalidators"},"resource:by-id":{"href":"/restapis/{{awsAPIId}}/resources/{resource_id}{?embed}","templated":true},"resource:create":{"href":"/restapis/{{awsAPIId}}/resources/0a00a0aa00"},"restapi:authorizers":{"href":"/restapis/{{awsAPIId}}/authorizers"},"restapi:delete":{"href":"/restapis/{{awsAPIId}}"},"restapi:deployments":{"href":"/restapis/{{awsAPIId}}/deployments{?limit}","templated":true},"restapi:documentation-parts":{"href":"/restapis/{{awsAPIId}}/documentation/parts"},"restapi:documentation-versions":{"href":"/restapis/{{awsAPIId}}/documentation/versions"},"restapi:gateway-responses":{"href":"/restapis/{{awsAPIId}}/gatewayresponses"},"restapi:models":{"href":"/restapis/{{awsAPIId}}/models"},"restapi:request-validators":{"href":"/restapis/{{awsAPIId}}/requestvalidators"},"restapi:resources":{"href":"/restapis/{{awsAPIId}}/resources{?limit,embed}","templated":true},"restapi:stages":{"href":"/restapis/{{awsAPIId}}/stages{?deployment_id}","templated":true},"restapi:update":{"href":"/restapis/{{awsAPIId}}"},"stage:by-name":{"href":"/restapis/{{awsAPIId}}/stages/{stage_name}","templated":true},"stage:create":{"href":"/restapis/{{awsAPIId}}/stages"}},"apiKeySource":"HEADER","createdDate":"2021-00-00T00:00:00Z","disableExecuteApiEndpoint":false,"endpointConfiguration":{"vpcEndpointIds":null,"types":"EDGE","ipv6":false},"id":"{{awsAPIId}}","name":"The Best API","version":"1.2.3","warnings":""}