Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

get_entities

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

Request Syntax

response = client.get_entities(
    ids=[
        'string',
    ],
    namespaceVersion=123
)
Parameters
  • ids (list) --

    [REQUIRED]

    An array of entity IDs.

    The IDs should be in the following format.

    urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME
    • (string) --
  • namespaceVersion (integer) -- The version of the user's namespace. Defaults to the latest version of the user's namespace.
Return type

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

  • IoTThingsGraph.Client.exceptions.InvalidRequestException
  • IoTThingsGraph.Client.exceptions.ResourceNotFoundException
  • IoTThingsGraph.Client.exceptions.ThrottlingException
  • IoTThingsGraph.Client.exceptions.InternalFailureException