:doc:`WorkDocs <../../workdocs>` / Client / get_document

************
get_document
************



.. py:method:: WorkDocs.Client.get_document(**kwargs)

  

  Retrieves details of a document.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument>`_  


  **Request Syntax**
  ::

    response = client.get_document(
        AuthenticationToken='string',
        DocumentId='string',
        IncludeCustomMetadata=True|False
    )
    
  :type AuthenticationToken: string
  :param AuthenticationToken: 

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

    

  
  :type DocumentId: string
  :param DocumentId: **[REQUIRED]** 

    The ID of the document.

    

  
  :type IncludeCustomMetadata: boolean
  :param IncludeCustomMetadata: 

    Set this to ``TRUE`` to include custom metadata in the response.

    

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

    
    ::

      {
          'Metadata': {
              'Id': 'string',
              'CreatorId': 'string',
              'ParentFolderId': 'string',
              'CreatedTimestamp': datetime(2015, 1, 1),
              'ModifiedTimestamp': datetime(2015, 1, 1),
              'LatestVersionMetadata': {
                  'Id': 'string',
                  'Name': 'string',
                  'ContentType': 'string',
                  'Size': 123,
                  'Signature': 'string',
                  'Status': 'INITIALIZED'|'ACTIVE',
                  'CreatedTimestamp': datetime(2015, 1, 1),
                  'ModifiedTimestamp': datetime(2015, 1, 1),
                  'ContentCreatedTimestamp': datetime(2015, 1, 1),
                  'ContentModifiedTimestamp': datetime(2015, 1, 1),
                  'CreatorId': 'string',
                  'Thumbnail': {
                      'string': 'string'
                  },
                  'Source': {
                      'string': 'string'
                  }
              },
              'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
              'Labels': [
                  'string',
              ]
          },
          'CustomMetadata': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Metadata** *(dict) --* 

        The metadata details of the document.

        
        

        - **Id** *(string) --* 

          The ID of the document.

          
        

        - **CreatorId** *(string) --* 

          The ID of the creator.

          
        

        - **ParentFolderId** *(string) --* 

          The ID of the parent folder.

          
        

        - **CreatedTimestamp** *(datetime) --* 

          The time when the document was created.

          
        

        - **ModifiedTimestamp** *(datetime) --* 

          The time when the document was updated.

          
        

        - **LatestVersionMetadata** *(dict) --* 

          The latest version of the document.

          
          

          - **Id** *(string) --* 

            The ID of the version.

            
          

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

            The name of the version.

            
          

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

            The content type of the document.

            
          

          - **Size** *(integer) --* 

            The size of the document, in bytes.

            
          

          - **Signature** *(string) --* 

            The signature of the document.

            
          

          - **Status** *(string) --* 

            The status of the document.

            
          

          - **CreatedTimestamp** *(datetime) --* 

            The timestamp when the document was first uploaded.

            
          

          - **ModifiedTimestamp** *(datetime) --* 

            The timestamp when the document was last uploaded.

            
          

          - **ContentCreatedTimestamp** *(datetime) --* 

            The timestamp when the content of the document was originally created.

            
          

          - **ContentModifiedTimestamp** *(datetime) --* 

            The timestamp when the content of the document was modified.

            
          

          - **CreatorId** *(string) --* 

            The ID of the creator.

            
          

          - **Thumbnail** *(dict) --* 

            The thumbnail of the document.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **Source** *(dict) --* 

            The source of the document.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
        

        - **ResourceState** *(string) --* 

          The resource state.

          
        

        - **Labels** *(list) --* 

          List of labels on the document.

          
          

          - *(string) --* 
      
    
      

      - **CustomMetadata** *(dict) --* 

        The custom metadata on the document.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`WorkDocs.Client.exceptions.EntityNotExistsException`

  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedOperationException`

  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedResourceAccessException`

  
  *   :py:class:`WorkDocs.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`WorkDocs.Client.exceptions.FailedDependencyException`

  
  *   :py:class:`WorkDocs.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`WorkDocs.Client.exceptions.InvalidPasswordException`

  