Amazon API Gateway
API Reference

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Apis

Represents your APIs as a collection. A collection offers a paginated view of your APIs.

URI

/v2/apis

HTTP Methods

GET

Operation ID: GetApis

Gets a collection of Api resources.

Query Parameters

Name Type Required Description
nextToken String False

The next page of elements from this collection. Not valid for the last element of the collection.

maxResults String False

The maximum number of elements to be returned for this resource.

Responses

Status Code Response Model Description
200 Apis

Success

400 BadRequestException

One of the parameters in the request is invalid.

404 NotFoundException

The resource specified in the request was not found.

429 LimitExceededException

The client is sending more than the allowed number of requests per unit of time.

POST

Operation ID: CreateApi

Creates an Api resource.

Responses

Status Code Response Model Description
201 Api

The request has succeeded and has resulted in the creation of a resource.

400 BadRequestException

One of the parameters in the request is invalid.

404 NotFoundException

The resource specified in the request was not found.

409 ConflictException

The resource already exists.

429 LimitExceededException

The client is sending more than the allowed number of requests per unit of time.

Schemas

Request Bodies

Example POST

{ "name": "string", "description": "string", "version": "string", "protocolType": enum, "routeSelectionExpression": "string", "apiKeySelectionExpression": "string", "disableSchemaValidation": boolean, "tags": { } }

Response Bodies

Example Apis

{ "items": [ { "apiId": "string", "name": "string", "description": "string", "version": "string", "protocolType": enum, "routeSelectionExpression": "string", "apiKeySelectionExpression": "string", "disableSchemaValidation": boolean, "warnings": [ "string" ], "apiEndpoint": "string", "createdDate": "string", "tags": { } } ], "nextToken": "string" }

Example Api

{ "apiId": "string", "name": "string", "description": "string", "version": "string", "protocolType": enum, "routeSelectionExpression": "string", "apiKeySelectionExpression": "string", "disableSchemaValidation": boolean, "warnings": [ "string" ], "apiEndpoint": "string", "createdDate": "string", "tags": { } }

Example BadRequestException

{ "message": "string" }

Example NotFoundException

{ "message": "string", "resourceType": "string" }

Example ConflictException

{ "message": "string" }

Example LimitExceededException

{ "message": "string", "limitType": "string" }

Properties

Api

Represents an API.

Property Type Required Description
apiId

string

False

The API ID.

name

string

True

The name of the API.

description

string

False

The description of the API.

version

string

False

A version identifier for the API.

protocolType

ProtocolType

True

The API protocol: Currently only WEBSOCKET is supported.

routeSelectionExpression

string

True

The route selection expression for the API.

apiKeySelectionExpression

string

False

An API key selection expression. See API Key Selection Expressions.

disableSchemaValidation

boolean

False

Avoid validating models when creating a deployment.

warnings

Array of type string

False

The warning messages reported when failonwarnings is turned on during API import.

apiEndpoint

string

Format: uri

False

The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

createdDate

string

Format: date-time

False

The timestamp when the API was created.

tags

Tags

False

A collection of tags associated with the API.

Apis

Represents a collection of APIs.

Property Type Required Description
items

Array of type Api

False

The elements from this collection.

nextToken

string

False

The next page of elements from this collection. Not valid for the last element of the collection.

BadRequestException

The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

Property Type Required Description
message

string

False

Describes the error encountered.

ConflictException

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details.

Property Type Required Description
message

string

False

Describes the error encountered.

CreateApiInput

Represents the input parameters for a CreateApi request.

Property Type Required Description
name

string

True

The name of the API.

description

string

False

The description of the API.

version

string

False

A version identifier for the API.

protocolType

ProtocolType

True

The API protocol: Currently only WEBSOCKET is supported.

routeSelectionExpression

string

True

The route selection expression for the API.

apiKeySelectionExpression

string

False

An API key selection expression. See API Key Selection Expressions.

disableSchemaValidation

boolean

False

Avoid validating models when creating a deployment.

tags

Tags

False

The collection of tags. Each tag element is associated with a given resource.

LimitExceededException

A limit has been exceeded. See the accompanying error message for details.

Property Type Required Description
message

string

False

Describes the error encountered.

limitType

string

False

The limit type.

NotFoundException

The resource specified in the request was not found. See the message field for more information.

Property Type Required Description
message

string

False

Describes the error encountered.

resourceType

string

False

The resource type.

ProtocolType

Represents a protocol type.

  • WEBSOCKET

Tags

Represents a collection of tags associated with the resource.

Property Type Required Description

*

string

False

See Also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

GetApis

CreateApi