:doc:`APIGateway <../../apigateway>` / Client / import_documentation_parts

**************************
import_documentation_parts
**************************



.. py:method:: APIGateway.Client.import_documentation_parts(**kwargs)

  

  Imports documentation parts

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apigateway-2015-07-09/ImportDocumentationParts>`_  


  **Request Syntax**
  ::

    response = client.import_documentation_parts(
        restApiId='string',
        mode='merge'|'overwrite',
        failOnWarnings=True|False,
        body=b'bytes'|file
    )
    
  :type restApiId: string
  :param restApiId: **[REQUIRED]** 

    The string identifier of the associated RestApi.

    

  
  :type mode: string
  :param mode: 

    A query parameter to indicate whether to overwrite ( ``overwrite``) any existing DocumentationParts definition or to merge ( ``merge``) the new definition into the existing one. The default value is ``merge``.

    

  
  :type failOnWarnings: boolean
  :param failOnWarnings: 

    A query parameter to specify whether to rollback the documentation importation ( ``true``) or not ( ``false``) when a warning is encountered. The default value is ``false``.

    

  
  :type body: bytes or seekable file-like object
  :param body: **[REQUIRED]** 

    Raw byte array representing the to-be-imported documentation parts. To import from an OpenAPI file, this is a JSON object.

    

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

    
    ::

      {
          'ids': [
              'string',
          ],
          'warnings': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 

      A collection of the imported DocumentationPart identifiers.

      
      

      - **ids** *(list) --* 

        A list of the returned documentation part identifiers.

        
        

        - *(string) --* 
    
      

      - **warnings** *(list) --* 

        A list of warning messages reported during import of documentation parts.

        
        

        - *(string) --* 
    
  
  **Exceptions**
  
  *   :py:class:`APIGateway.Client.exceptions.BadRequestException`

  
  *   :py:class:`APIGateway.Client.exceptions.ConflictException`

  
  *   :py:class:`APIGateway.Client.exceptions.LimitExceededException`

  
  *   :py:class:`APIGateway.Client.exceptions.NotFoundException`

  
  *   :py:class:`APIGateway.Client.exceptions.UnauthorizedException`

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

  