v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1472221377.0 KB

Updates an Api resource.

patch/v2/apis/{apiId}

Path parameters

apiIdstring required

The API identifier.

Request body

apiKeySelectionExpressionstring

An expression used to extract information at runtime. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions">Selection Expressions</a> for more information.

credentialsArnstring

Represents an Amazon Resource Name (ARN).

descriptionstring

A string with a length between [0-1024].

disableSchemaValidationboolean

Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

disableExecuteApiEndpointboolean

Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.

namestring

A string with a length between [1-128].

routeKeystring

After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions">Selection Expressions</a> for a list of expressions and each expression's associated selection key type.

routeSelectionExpressionstring

An expression used to extract information at runtime. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions">Selection Expressions</a> for more information.

targetstring

A string representation of a URI with a length between [1-2048].

versionstring

A string with a length between [1-64].

Response

Success

ApiEndpointstring

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.

ApiGatewayManagedboolean

Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API Gateway. A managed API can be deleted only through the tooling or service that created it.

ApiIdstring

The API ID.

ApiKeySelectionExpressionstring

An API key selection expression. Supported only for WebSocket APIs. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions">API Key Selection Expressions</a>.

CreatedDatestring date-time

The timestamp when the API was created.

Descriptionstring

The description of the API.

DisableSchemaValidationboolean

Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

DisableExecuteApiEndpointboolean

Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.

ImportInfoString[]

The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

Namestring

The name of the API.

ProtocolType'WEBSOCKET' | 'HTTP'

The API protocol.

RouteSelectionExpressionstring

The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

Tagsobject

A collection of tags associated with the API.

Versionstring

A version identifier for the API.

WarningsString[]

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