APIGateway / Client / get_model



Describes an existing model defined for a RestApi resource.

See also: AWS API Documentation

Request Syntax

response = client.get_model(
  • restApiId (string) –


    The RestApi identifier under which the Model exists.

  • modelName (string) –


    The name of the model as an identifier.

  • flatten (boolean) – A query parameter of a Boolean value to resolve ( true) all external model references and returns a flattened model schema or not ( false) The default is false.

Return type:



Response Syntax

    'id': 'string',
    'name': 'string',
    'description': 'string',
    'schema': 'string',
    'contentType': 'string'

Response Structure

  • (dict) –

    Represents the data structure of a method’s request or response payload.

    • id (string) –

      The identifier for the model resource.

    • name (string) –

      The name of the model. Must be an alphanumeric string.

    • description (string) –

      The description of the model.

    • schema (string) –

      The schema for the model. For application/json models, this should be JSON schema draft 4 model. Do not include “*/” characters in the description of any properties because such “*/” characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API’s SDK generated by API Gateway to fail.

    • contentType (string) –

      The content-type for the model.