:doc:`ApiGatewayV2 <../../apigatewayv2>` / Client / get_models

**********
get_models
**********



.. py:method:: ApiGatewayV2.Client.get_models(**kwargs)

  

  Gets the Models for an API.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModels>`_  


  **Request Syntax**
  ::

    response = client.get_models(
        ApiId='string',
        MaxResults='string',
        NextToken='string'
    )
    
  :type ApiId: string
  :param ApiId: **[REQUIRED]** 

    The API identifier.

    

  
  :type MaxResults: string
  :param MaxResults: 

    The maximum number of elements to be returned for this resource.

    

  
  :type NextToken: string
  :param NextToken: 

    The next page of elements from this collection. Not valid for the last element of the collection.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Items': [
              {
                  'ContentType': 'string',
                  'Description': 'string',
                  'ModelId': 'string',
                  'Name': 'string',
                  'Schema': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Success

      
      

      - **Items** *(list) --* 

        The elements from this collection.

        
        

        - *(dict) --* 

          Represents a data model for an API. Supported only for WebSocket APIs. See `Create Models and Mapping Templates for Request and Response Mappings <https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html>`__.

          
          

          - **ContentType** *(string) --* 

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

            
          

          - **Description** *(string) --* 

            The description of the model.

            
          

          - **ModelId** *(string) --* 

            The model identifier.

            
          

          - **Name** *(string) --* 

            The name of the model. Must be alphanumeric.

            
          

          - **Schema** *(string) --* 

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

            
      
    
      

      - **NextToken** *(string) --* 

        The next page of elements from this collection. Not valid for the last element of the collection.

        
  
  **Exceptions**
  
  *   :py:class:`ApiGatewayV2.Client.exceptions.NotFoundException`

  
  *   :py:class:`ApiGatewayV2.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`ApiGatewayV2.Client.exceptions.BadRequestException`

  