RouteResponses - Amazon API Gateway

RouteResponses

Represents the collection of responses for a route. Supported only for WebSocket APIs.

URI

/v2/apis/apiId/routes/routeId/routeresponses

HTTP methods

GET

Operation ID: GetRouteResponses

Gets the RouteResponses for a Route.

Path parameters
NameTypeRequiredDescription
routeIdStringTrue

The route ID.

apiIdStringTrue

The API identifier.

Query parameters
NameTypeRequiredDescription
nextTokenStringFalse

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

maxResultsStringFalse

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

Responses
Status codeResponse modelDescription
200RouteResponses

Success

400BadRequestException

One of the parameters in the request is invalid.

404NotFoundException

The resource specified in the request was not found.

429LimitExceededException

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

POST

Operation ID: CreateRouteResponse

Creates a RouteResponse for a Route.

Path parameters
NameTypeRequiredDescription
apiIdStringTrue

The API identifier.

routeIdStringTrue

The route ID.

Responses
Status codeResponse modelDescription
201RouteResponse

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

400BadRequestException

One of the parameters in the request is invalid.

404NotFoundException

The resource specified in the request was not found.

409ConflictException

The resource already exists.

429LimitExceededException

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

Schemas

Request bodies

{ "routeResponseKey": "string", "responseParameters": { }, "responseModels": { }, "modelSelectionExpression": "string" }

Response bodies

{ "items": [ { "routeResponseId": "string", "routeResponseKey": "string", "responseParameters": { }, "responseModels": { }, "modelSelectionExpression": "string" } ], "nextToken": "string" }
{ "routeResponseId": "string", "routeResponseKey": "string", "responseParameters": { }, "responseModels": { }, "modelSelectionExpression": "string" }
{ "message": "string" }
{ "message": "string", "resourceType": "string" }
{ "message": "string" }
{ "message": "string", "limitType": "string" }

Properties

BadRequestException

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

PropertyTypeRequiredDescription
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.

PropertyTypeRequiredDescription
message

string

False

Describes the error encountered.

CreateRouteResponseInput

Represents the input parameters for an CreateRouteResponse request.

PropertyTypeRequiredDescription
modelSelectionExpression

string

False

The model selection expression for the route response. Supported only for WebSocket APIs.

responseModels

RouteModels

False

The response models for the route response.

responseParameters

RouteParameters

False

The route response parameters.

routeResponseKey

string

True

The route response key.

LimitExceededException

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

PropertyTypeRequiredDescription
limitType

string

False

The limit type.

message

string

False

Describes the error encountered.

NotFoundException

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

PropertyTypeRequiredDescription
message

string

False

Describes the error encountered.

resourceType

string

False

The resource type.

ParameterConstraints

Validation constraints imposed on parameters of a request (path, query string, headers).

PropertyTypeRequiredDescription
required

boolean

False

Whether or not the parameter is required.

RouteModels

The route models.

PropertyTypeRequiredDescription

*

string

False

RouteParameters

The route parameters.

PropertyTypeRequiredDescription

*

object

False

RouteResponse

Represents a route response.

PropertyTypeRequiredDescription
modelSelectionExpression

string

False

Represents the model selection expression of a route response. Supported only for WebSocket APIs.

responseModels

RouteModels

False

Represents the response models of a route response.

responseParameters

RouteParameters

False

Represents the response parameters of a route response.

routeResponseId

string

False

Represents the identifier of a route response.

routeResponseKey

string

True

Represents the route response key of a route response.

RouteResponses

Represents a collection of route responses.

PropertyTypeRequiredDescription
items

Array of type RouteResponse

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.

See also

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

GetRouteResponses

CreateRouteResponse