Amazon API Gateway
API Reference

Stage

Represents an API stage.

URI

/v2/apis/apiId/stages/stageName

HTTP Methods

GET

Operation ID: GetStage

Gets a Stage.

Path Parameters

Name Type Required Description
stageName String True

The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

apiId String True

The API identifier.

Responses

Status Code Response Model Description
200 Stage

Success

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.

See Also

DELETE

Operation ID: DeleteStage

Deletes a Stage.

Path Parameters

Name Type Required Description
stageName String True

The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

apiId String True

The API identifier.

Responses

Status Code Response Model Description
204 None

The request has succeeded, and there is no additional content to send in the response payload body.

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.

See Also

PATCH

Operation ID: UpdateStage

Updates a Stage.

Path Parameters

Name Type Required Description
stageName String True

The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

apiId String True

The API identifier.

Responses

Status Code Response Model Description
200 Stage

Success

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.

See Also

Schemas

Request Bodies

Example PATCH

{ "description": "string", "deploymentId": "string", "clientCertificateId": "string", "defaultRouteSettings": { "detailedMetricsEnabled": boolean, "loggingLevel": enum, "dataTraceEnabled": boolean, "throttlingBurstLimit": integer, "throttlingRateLimit": number }, "routeSettings": { }, "stageVariables": { }, "accessLogSettings": { "format": "string", "destinationArn": "string" } }

Response Bodies

Example Stage

{ "stageName": "string", "description": "string", "deploymentId": "string", "clientCertificateId": "string", "defaultRouteSettings": { "detailedMetricsEnabled": boolean, "loggingLevel": enum, "dataTraceEnabled": boolean, "throttlingBurstLimit": integer, "throttlingRateLimit": number }, "routeSettings": { }, "stageVariables": { }, "accessLogSettings": { "format": "string", "destinationArn": "string" }, "createdDate": "string", "lastUpdatedDate": "string" }

Example BadRequestException

{ "message": "string" }

Example NotFoundException

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

Example ConflictException

{ "message": "string" }

Example LimitExceededException

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

Properties

AccessLogSettings

Settings for logging access in a stage.

Property Type Required Description
format

string

False

A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

destinationArn

string

False

The ARN of the CloudWatch Logs log group to receive access logs.

See Also

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.

See Also

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.

See Also

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.

See Also

LoggingLevel (enum)

The logging level.

  • ERROR

  • INFO

  • false

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.

See Also

RouteSettings

Represents a collection of route settings.

Property Type Required Description
detailedMetricsEnabled

boolean

False

Specifies whether detailed metrics are enabled.

loggingLevel

LoggingLevel

False

Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.

dataTraceEnabled

boolean

False

Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.

throttlingBurstLimit

integer

Format: int32

False

Specifies the throttling burst limit.

throttlingRateLimit

number

Format: double

False

Specifies the throttling rate limit.

See Also

RouteSettingsMap

The route settings map.

Property Type Required Description

additionalProperties

object

False

See Also

Stage

Represents an API stage.

Property Type Required Description
stageName

string

True

The name of the stage.

description

string

False

The description of the stage.

deploymentId

string

False

The identifier of the Deployment that the Stage is associated with.

clientCertificateId

string

False

The identifier of a client certificate for a Stage.

defaultRouteSettings

RouteSettings

False

Default route settings for the stage.

routeSettings

RouteSettingsMap

False

Route settings for the stage.

stageVariables

StageVariablesMap

False

A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

accessLogSettings

AccessLogSettings

False

Settings for logging access in this stage.

createdDate

string

Format: date-time

False

The timestamp when the stage was created.

lastUpdatedDate

string

Format: date-time

False

The timestamp when the stage was last updated.

See Also

StageVariablesMap

The stage variable map.

Property Type Required Description

additionalProperties

string

False

See Also

UpdateStageInput

Represents the input parameters for an UpdateStage request.

Property Type Required Description
description

string

False

The description for the API stage.

deploymentId

string

False

The deployment identifier for the API stage.

clientCertificateId

string

False

The identifier of a client certificate for a Stage.

defaultRouteSettings

RouteSettings

False

The default route settings for the stage.

routeSettings

RouteSettingsMap

False

Route settings for the stage.

stageVariables

StageVariablesMap

False

A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

accessLogSettings

AccessLogSettings

False

Settings for logging access in this stage.

See Also