AmazonApiGatewayV2
  1. Root
AmazonApiGatewayV2
  • Root
    • /v2/apis
      POST
    • /v2/apis
      GET
    • /v2/apis
      PUT
    • /v2/domainnames/{domainName}/apimappings
      POST
    • /v2/domainnames/{domainName}/apimappings
      GET
    • /v2/apis/{apiId}/authorizers
      POST
    • /v2/apis/{apiId}/authorizers
      GET
    • /v2/apis/{apiId}/deployments
      POST
    • /v2/apis/{apiId}/deployments
      GET
    • /v2/domainnames
      POST
    • /v2/domainnames
      GET
    • /v2/apis/{apiId}/integrations
      POST
    • /v2/apis/{apiId}/integrations
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses
      POST
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses
      GET
    • /v2/apis/{apiId}/models
      POST
    • /v2/apis/{apiId}/models
      GET
    • /v2/apis/{apiId}/routes
      POST
    • /v2/apis/{apiId}/routes
      GET
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses
      POST
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses
      GET
    • /v2/apis/{apiId}/stages
      POST
    • /v2/apis/{apiId}/stages
      GET
    • /v2/vpclinks
      POST
    • /v2/vpclinks
      GET
    • /v2/apis/{apiId}/stages/{stageName}/accesslogsettings
      DELETE
    • /v2/apis/{apiId}
      DELETE
    • /v2/apis/{apiId}
      GET
    • /v2/apis/{apiId}
      PUT
    • /v2/apis/{apiId}
      PATCH
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      DELETE
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      GET
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      PATCH
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      DELETE
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      GET
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      PATCH
    • /v2/apis/{apiId}/cors
      DELETE
    • /v2/apis/{apiId}/deployments/{deploymentId}
      DELETE
    • /v2/apis/{apiId}/deployments/{deploymentId}
      GET
    • /v2/apis/{apiId}/deployments/{deploymentId}
      PATCH
    • /v2/domainnames/{domainName}
      DELETE
    • /v2/domainnames/{domainName}
      GET
    • /v2/domainnames/{domainName}
      PATCH
    • /v2/apis/{apiId}/integrations/{integrationId}
      DELETE
    • /v2/apis/{apiId}/integrations/{integrationId}
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}
      PATCH
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      DELETE
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      PATCH
    • /v2/apis/{apiId}/models/{modelId}
      DELETE
    • /v2/apis/{apiId}/models/{modelId}
      GET
    • /v2/apis/{apiId}/models/{modelId}
      PATCH
    • /v2/apis/{apiId}/routes/{routeId}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}
      GET
    • /v2/apis/{apiId}/routes/{routeId}
      PATCH
    • /v2/apis/{apiId}/routes/{routeId}/requestparameters/{requestParameterKey}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      GET
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      PATCH
    • /v2/apis/{apiId}/stages/{stageName}/routesettings/{routeKey}
      DELETE
    • /v2/apis/{apiId}/stages/{stageName}
      DELETE
    • /v2/apis/{apiId}/stages/{stageName}
      GET
    • /v2/apis/{apiId}/stages/{stageName}
      PATCH
    • /v2/vpclinks/{vpcLinkId}
      DELETE
    • /v2/vpclinks/{vpcLinkId}
      GET
    • /v2/vpclinks/{vpcLinkId}
      PATCH
    • /v2/apis/{apiId}/exports/{specification}
      GET
    • /v2/apis/{apiId}/stages/{stageName}/cache/authorizers
      DELETE
    • /v2/apis/{apiId}/models/{modelId}/template
      GET
    • /v2/tags/{resource-arn}
      GET
    • /v2/tags/{resource-arn}
      POST
    • /v2/tags/{resource-arn}
      DELETE
  1. Root

/v2/apis/{apiId}/routes/{routeId}

PATCH
/v2/apis/{apiId}/routes/{routeId}
Updates a Route.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/v2/apis//routes/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "apiKeyRequired": true,
    "authorizationScopes": [
        "string"
    ],
    "authorizationType": "NONE",
    "authorizerId": "string",
    "modelSelectionExpression": "string",
    "operationName": "string",
    "requestModels": {
        "property1": "string",
        "property2": "string"
    },
    "requestParameters": {
        "property1": {
            "Required": true
        }
    },
    "routeKey": "string",
    "routeResponseSelectionExpression": "string",
    "target": "string"
}'
Response Response Example
200 - Example 1
{
  "ApiGatewayManaged": true,
  "ApiKeyRequired": true,
  "AuthorizationScopes": {},
  "AuthorizationType": "NONE",
  "AuthorizerId": "string",
  "ModelSelectionExpression": "string",
  "OperationName": "string",
  "RequestModels": {
    "property1": "string",
    "property2": "string"
  },
  "RequestParameters": {
    "property1": {
      "Required": true
    }
  },
  "RouteId": "string",
  "RouteKey": "string",
  "RouteResponseSelectionExpression": "string",
  "Target": "string"
}

Request

Path Params
apiId
string 
required
The API identifier.
routeId
string 
required
The route ID.
Body Params application/json
apiKeyRequired
boolean 
optional
Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
authorizationScopes
array[string]
optional
A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
authorizationType
enum<string> 
optional
The authorization type. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
Allowed values:
NONEAWS_IAMCUSTOMJWT
authorizerId
string 
optional
The identifier.
modelSelectionExpression
string 
optional
An expression used to extract information at runtime. See Selection Expressions for more information.
operationName
string 
optional
A string with a length between [1-64].
requestModels
object 
optional
The route models.
Additional properties
string 
optional
A string with a length between [1-128].
requestParameters
object 
optional
The route parameters.
Additional properties
object (ParameterConstraints) 
optional
Validation constraints imposed on parameters of a request (path, query string, headers).
routeKey
string 
optional
After evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.
routeResponseSelectionExpression
string 
optional
An expression used to extract information at runtime. See Selection Expressions for more information.
target
string 
optional
A string with a length between [1-128].
Examples

Responses

🟢200Success
application/json
Body
ApiGatewayManaged
boolean 
optional
Specifies whether a route is managed by API Gateway. If you created an API using quick create, the defaultrouteismanagedbyAPIGateway.Youcan′tmodifythedefault route key.
ApiKeyRequired
boolean 
optional
Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
AuthorizationScopes
object 
optional
A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
AuthorizationType
enum<string> 
optional
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
Allowed values:
NONEAWS_IAMCUSTOMJWT
AuthorizerId
string 
optional
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
string 
optional
The model selection expression for the route. Supported only for WebSocket APIs.
OperationName
string 
optional
The operation name for the route.
RequestModels
object 
optional
The request models for the route. Supported only for WebSocket APIs.
RequestParameters
object 
optional
The request parameters for the route. Supported only for WebSocket APIs.
RouteId
string 
optional
The route ID.
RouteKey
string 
optional
The route key for the route.
RouteResponseSelectionExpression
string 
optional
The route response selection expression for the route. Supported only for WebSocket APIs.
Target
string 
optional
The target for the route.
🟠480NotFoundException
🟠481TooManyRequestsException
🟠482BadRequestException
🟠483ConflictException
Modified at 2023-08-15 05:49:07
Previous
/v2/apis/{apiId}/routes/{routeId}
Next
/v2/apis/{apiId}/routes/{routeId}/requestparameters/{requestParameterKey}
Built with