Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.1.0
info:
title: Amazon API Gateway Resources API
version: '2015-07-09'
description: Generated from AWS's published Smithy model for Amazon API Gateway. 5 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://apigateway.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/restapis/{restApiId}/resources/{parentId}:
post:
operationId: CreateResource
summary: Create Resource
description: Creates a Resource resource.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Resource'
'400':
description: BadRequestException
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestException'
'409':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
'429':
description: LimitExceededException; TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/LimitExceededException'
'404':
description: NotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundException'
'401':
description: UnauthorizedException
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedException'
parameters:
- name: restApiId
in: path
required: true
schema:
type: string
description: The string identifier of the associated RestApi.
- name: parentId
in: path
required: true
schema:
type: string
description: The parent resource's identifier.
requestBody:
content:
application/json:
schema:
type: object
properties:
pathPart:
type: string
description: The last path segment for this resource.
required:
- pathPart
tags:
- Resources
/restapis/{restApiId}/resources/{resourceId}:
delete:
operationId: DeleteResource
summary: Delete Resource
description: Deletes a Resource resource.
responses:
'200':
description: Success
content:
application/json:
schema:
type: string
'400':
description: BadRequestException
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestException'
'409':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
'404':
description: NotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
'401':
description: UnauthorizedException
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedException'
parameters:
- name: restApiId
in: path
required: true
schema:
type: string
description: The string identifier of the associated RestApi.
- name: resourceId
in: path
required: true
schema:
type: string
description: The identifier of the Resource resource.
tags:
- Resources
get:
operationId: GetResource
summary: Get Resource
description: Lists information about a resource.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Resource'
'404':
description: NotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
'401':
description: UnauthorizedException
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedException'
parameters:
- name: restApiId
in: path
required: true
schema:
type: string
description: The string identifier of the associated RestApi.
- name: resourceId
in: path
required: true
schema:
type: string
description: The identifier for the Resource resource.
- name: embed
in: query
schema:
type: array
items:
type: string
description: A query parameter to retrieve the specified resources embedded in the returned Resource representation
in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports
only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list
and contain the "methods" string. For example, GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods.
tags:
- Resources
patch:
operationId: UpdateResource
summary: Update Resource
description: Changes information about a Resource resource.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Resource'
'400':
description: BadRequestException
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestException'
'409':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
'404':
description: NotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
'401':
description: UnauthorizedException
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedException'
parameters:
- name: restApiId
in: path
required: true
schema:
type: string
description: The string identifier of the associated RestApi.
- name: resourceId
in: path
required: true
schema:
type: string
description: The identifier of the Resource resource.
requestBody:
content:
application/json:
schema:
type: object
properties:
patchOperations:
type: array
items:
$ref: '#/components/schemas/PatchOperation'
description: For more information about supported patch operations, see Patch Operations.
tags:
- Resources
/restapis/{restApiId}/resources:
get:
operationId: GetResources
summary: Get Resources
description: Lists information about a collection of Resource resources.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Resources'
'400':
description: BadRequestException
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestException'
'404':
description: NotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
'401':
description: UnauthorizedException
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedException'
parameters:
- name: restApiId
in: path
required: true
schema:
type: string
description: The string identifier of the associated RestApi.
- name: position
in: query
schema:
type: string
description: The current pagination position in the paged result set.
- name: limit
in: query
schema:
type: integer
description: The maximum number of returned results per page. The default value is 25 and the maximum value is 500.
- name: embed
in: query
schema:
type: array
items:
type: string
description: A query parameter used to retrieve the specified resources embedded in the returned Resources resource
in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports
only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list
and contain the "methods" string. For example, GET /restapis/{restapi_id}/resources?embed=methods.
tags:
- Resources
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: apigateway
schemas:
BadRequestException:
type: object
properties:
message:
type: string
ConflictException:
type: object
properties:
message:
type: string
Integration:
type: object
properties:
type:
type: string
enum:
- HTTP
- AWS
- MOCK
- HTTP_PROXY
- AWS_PROXY
description: 'Specifies an API method integration type. The valid value is one of the following: For the HTTP and
HTTP proxy integrations, each integration can specify a protocol (http/https), port and path. Standard 80 and
443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connectionType
of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load
balancer of a VPC.'
httpMethod:
type: string
description: Specifies the integration's HTTP method type. For the Type property, if you specify MOCK, this property
is optional. For Lambda integrations, you must set the integration method to POST. For all other types, you must
specify this property.
uri:
type: string
description: 'Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or HTTP_PROXY integrations,
the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification for standard integrations.
If connectionType is VPC_LINK specify the Network Load Balancer DNS name. For AWS or AWS_PROXY integrations, the
URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region}
is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service
(e.g., s3); and {subdomain} '
connectionType:
type: string
enum:
- INTERNET
- VPC_LINK
description: The type of the network connection to the integration endpoint. The valid value is INTERNET for connections
through the public routable internet or VPC_LINK for private connections between API Gateway and a network load
balancer in a VPC. The default value is INTERNET.
connectionId:
type: string
description: The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
credentials:
type: string
description: Specifies the credentials required for the integration, if any. For AWS integrations, three options
are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To
require that the caller's identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
To use resource-based permissions on supported Amazon Web Services services, specify null.
requestParameters:
type: object
additionalProperties:
type: string
description: A key-value map specifying request parameters that are passed from the method request to the back end.
The key is an integration request parameter name and the associated value is a method request parameter value
or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method
request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring,
path, or header and name must be a valid and unique method request parameter name.
requestTemplates:
type: object
additionalProperties:
type: string
description: Represents a map of Velocity templates that are applied on the request payload based on the value of
the Content-Type header sent by the client. The content type value is the key in this map, and the template (as
a String) is the value.
passthroughBehavior:
type: string
description: 'Specifies how the method request body of an unmapped content type will be passed through the integration
request to the back end without transformation. A content type is unmapped if no mapping template is defined in
the integration or the content type does not match any of the mapped content types, as specified in requestTemplates.
The valid value is one of the following: WHEN_NO_MATCH: passes the method request body through the integration
request to the back end without transformation when the method request content type does not match any content
type associated with the mapping templates '
contentHandling:
type: string
enum:
- CONVERT_TO_BINARY
- CONVERT_TO_TEXT
description: 'Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY
and CONVERT_TO_TEXT, with the following behaviors: If this property is not defined, the request payload will be
passed through from the method request to integration request without modification, provided that the passthroughBehavior
is configured to support payload pass-through.'
timeoutInMillis:
type: integer
description: Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
You can increase the default value to longer than 29 seconds for Regional or private APIs only.
cacheNamespace:
type: string
description: Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the
cacheNamespace. You can specify the same cacheNamespace across resources to return the same cached data for requests
to different resources.
cacheKeyParameters:
type: array
items:
type: string
description: A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters,
these parameters must also be specified for Method requestParameters.
integrationResponses:
type: object
additionalProperties:
$ref: '#/components/schemas/IntegrationResponse'
description: Specifies the integration's responses.
tlsConfig:
$ref: '#/components/schemas/TlsConfig'
responseTransferMode:
type: string
enum:
- BUFFERED
- STREAM
description: The response transfer mode of the integration.
integrationTarget:
type: string
description: The ALB or NLB listener to send the request to.
IntegrationResponse:
type: object
properties:
statusCode:
type: string
description: Specifies the status code that is used to map the integration response to an existing MethodResponse.
selectionPattern:
type: string
description: Specifies the regular expression (regex) pattern used to choose an integration response based on the
response from the back end. For example, if the success response returns nothing and the error response returns
some string, you could use the .+ regex to match error response. However, make sure that the error response does
not contain any newline (\n) character in such cases. If the back end is an Lambda function, the Lambda function
error header is matched. For all other HTTP and Amazon Web Services back ends, the HTTP status code is matched.
responseParameters:
type: object
additionalProperties:
type: string
description: A key-value map specifying response parameters that are passed to the method response from the back
end. The key is a method response header parameter name and the mapped value is an integration response header
value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response
body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique
header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression},
where name is
responseTemplates:
type: object
additionalProperties:
type: string
description: Specifies the templates used to transform the integration response body. Response templates are represented
as a key/value map, with a content-type as the key and a template as the value.
contentHandling:
type: string
enum:
- CONVERT_TO_BINARY
- CONVERT_TO_TEXT
description: 'Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY
and CONVERT_TO_TEXT, with the following behaviors: If this property is not defined, the response payload will
be passed through from the integration response to the method response without modification.'
LimitExceededException:
type: object
properties:
retryAfterSeconds:
type: string
message:
type: string
Method:
type: object
properties:
httpMethod:
type: string
description: The method's HTTP verb.
authorizationType:
type: string
description: The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions,
CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.
authorizerId:
type: string
description: The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.
apiKeyRequired:
type: boolean
description: A boolean flag specifying whether a valid ApiKey is required to invoke this method.
requestValidatorId:
type: string
description: The identifier of a RequestValidator for request validation.
operationName:
type: string
description: A human-friendly operation identifier for the method. For example, you can assign the operationName
of ListPets for the GET /pets method in the PetStore example.
requestParameters:
type: object
additionalProperties:
type: boolean
description: A key-value map defining required or optional method request parameters that can be accepted by API
Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where
location is querystring, path, or header and name is a valid and unique parameter name. The value associated with
the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method
request parameter names defined here are available in Integration to be mapped to integration request parameters
or templates.
requestModels:
type: object
additionalProperties:
type: string
description: A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the
request payloads of given content types (as the mapping key).
methodResponses:
type: object
additionalProperties:
$ref: '#/components/schemas/MethodResponse'
description: Gets a method response associated with a given HTTP status code.
methodIntegration:
$ref: '#/components/schemas/Integration'
authorizationScopes:
type: array
items:
type: string
description: A list of authorization scopes configured on the method. The scopes are used with a COGNITO_USER_POOLS
authorizer to authorize the method invocation. The authorization works by matching the method scopes against the
scopes parsed from the access token in the incoming request. The method invocation is authorized if any method
scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method
scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
MethodResponse:
type: object
properties:
statusCode:
type: string
description: The method response's status code.
responseParameters:
type: object
additionalProperties:
type: boolean
description: A key-value map specifying required or optional response parameters that API Gateway can send back
to the caller. A key defines a method response header and the value specifies whether the associated method response
header is required or not. The expression of the key must match the pattern method.response.header.{name}, where
name is a valid and unique header name. API Gateway passes certain integration response data to the method response
headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration
response data that can be mapped include an
responseModels:
type: object
additionalProperties:
type: string
description: Specifies the Model resources used for the response's content-type. Response models are represented
as a key/value map, with a content-type as the key and a Model name as the value.
NotFoundException:
type: object
properties:
message:
type: string
PatchOperation:
type: object
properties:
op:
type: string
enum:
- add
- remove
- replace
- move
- copy
- test
description: An update operation to be performed with this PATCH request. The valid value can be add, remove, replace
or copy. Not all valid operations are supported for a given resource. Support of the operations depends on specific
operational contexts. Attempts to apply an unsupported operation on a resource will return an error message..
path:
type: string
description: 'The op operation''s target, as identified by a JSON Pointer value that references a location within
the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the
path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}),
the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names
must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated
with it.'
value:
type: string
description: 'The new target value of the update operation. It is applicable for the add or replace operation. When
using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a
Linux shell, e.g., ''{"a": ...}''.'
from:
type: string
description: The copy update operation's source as identified by a JSON-Pointer value referencing the location within
the targeted resource to copy the value from. For example, to promote a canary deployment, you copy the canary
deployment ID to the affiliated deployment ID by calling a PATCH request on a Stage resource with "op":"copy",
"from":"/canarySettings/deploymentId" and "path":"/deploymentId".
Resource:
type: object
properties:
id:
type: string
description: The resource's identifier.
parentId:
type: string
description: The parent resource's identifier.
pathPart:
type: string
description: The last path segment for this resource.
path:
type: string
description: The full path for this resource.
resourceMethods:
type: object
additionalProperties:
$ref: '#/components/schemas/Method'
description: Gets an API resource's method of a given HTTP verb.
Resources:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/Resource'
description: The current page of elements from this collection.
position:
type: string
description: The current pagination position in the paged result set.
TlsConfig:
type: object
properties:
insecureSkipVerification:
type: boolean
description: Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint
is issued by a supported certificate authority. This isn’t recommended, but it enables you to use certificates
that are signed by private certificate authorities, or certificates that are self-signed. If enabled, API Gateway
still performs basic certificate validation, which includes checking the certificate's expiration date, hostname,
and presence of a root certificate authority. Supported only for HTTP and HTTP_PROXY integrations. Enabling insecureSkipVerification
isn't recommended, espe
TooManyRequestsException:
type: object
properties:
retryAfterSeconds:
type: string
message:
type: string
UnauthorizedException:
type: object
properties:
message:
type: string
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/api-gateway/service/2015-07-09/api-gateway-2015-07-09.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)