Amazon API Gateway
API Reference

Model

Represents a data model for an API. See Create Models and Mapping Templates for Request and Response Mappings.

URI

/v2/apis/apiId/models/modelId

HTTP Methods

GET

Operation ID: GetModel

Gets a Model.

Path Parameters

Name Type Required Description
modelId String True

The model ID.

apiId String True

The API identifier.

Responses

Status Code Response Model Description
200 Model

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: DeleteModel

Deletes a Model.

Path Parameters

Name Type Required Description
modelId String True

The model ID.

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: UpdateModel

Updates a Model.

Path Parameters

Name Type Required Description
modelId String True

The model ID.

apiId String True

The API identifier.

Responses

Status Code Response Model Description
200 Model

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

{ "name": "string", "description": "string", "schema": "string", "contentType": "string" }

Response Bodies

Example Model

{ "modelId": "string", "name": "string", "description": "string", "schema": "string", "contentType": "string" }

Example BadRequestException

{ "message": "string" }

Example NotFoundException

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

Example ConflictException

{ "message": "string" }

Example LimitExceededException

{ "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.

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

Model

Property Type Required Description
modelId

string

False

The model identifier.

name

string

True

The name of the model. Must be alphanumeric.

description

string

False

The description of the model.

schema

string

False

The schema for the model. For application/json models, this should be JSON schema draft 4 model.

contentType

string

False

The content-type for the model, for example, "application/json".

See Also

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

UpdateModelInput

Represents the input parameters for an UpdateModel request.

Property Type Required Description
name

string

False

The name of the model.

description

string

False

The description of the model.

schema

string

False

The schema for the model. For application/json models, this should be JSON schema draft 4 model.

contentType

string

False

The content-type for the model, for example, "application/json".

See Also