:doc:`IoTThingsGraph <../../iotthingsgraph>` / Client / get_entities

************
get_entities
************



.. py:method:: IoTThingsGraph.Client.get_entities(**kwargs)

  

  Gets definitions of the specified entities. Uses the latest version of the user's namespace by default. This API returns the following TDM entities.

   

  
  * Properties
   
  * States
   
  * Events
   
  * Actions
   
  * Capabilities
   
  * Mappings
   
  * Devices
   
  * Device Models
   
  * Services
  

   

  This action doesn't return definitions for systems, flows, and deployments.

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotthingsgraph-2018-09-06/GetEntities>`_  


  **Request Syntax**
  ::

    response = client.get_entities(
        ids=[
            'string',
        ],
        namespaceVersion=123
    )
    
  :type ids: list
  :param ids: **[REQUIRED]** 

    An array of entity IDs.

     

    The IDs should be in the following format.

     

    ``urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME``

    

  
    - *(string) --* 

    

  :type namespaceVersion: integer
  :param namespaceVersion: 

    The version of the user's namespace. Defaults to the latest version of the user's namespace.

    

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

    
    ::

      {
          'descriptions': [
              {
                  'id': 'string',
                  'arn': 'string',
                  'type': 'DEVICE'|'SERVICE'|'DEVICE_MODEL'|'CAPABILITY'|'STATE'|'ACTION'|'EVENT'|'PROPERTY'|'MAPPING'|'ENUM',
                  'createdAt': datetime(2015, 1, 1),
                  'definition': {
                      'language': 'GRAPHQL',
                      'text': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **descriptions** *(list) --* 

        An array of descriptions for the specified entities.

        
        

        - *(dict) --* 

          Describes the properties of an entity.

          
          

          - **id** *(string) --* 

            The entity ID.

            
          

          - **arn** *(string) --* 

            The entity ARN.

            
          

          - **type** *(string) --* 

            The entity type.

            
          

          - **createdAt** *(datetime) --* 

            The time at which the entity was created.

            
          

          - **definition** *(dict) --* 

            The definition document of the entity.

            
            

            - **language** *(string) --* 

              The language used to define the entity. ``GRAPHQL`` is the only valid value.

              
            

            - **text** *(string) --* 

              The GraphQL text that defines the entity.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`IoTThingsGraph.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTThingsGraph.Client.exceptions.InternalFailureException`

  