LocationService / Client / list_device_positions

list_device_positions#

LocationService.Client.list_device_positions(**kwargs)#

A batch request to retrieve all device positions.

See also: AWS API Documentation

Request Syntax

response = client.list_device_positions(
    FilterGeometry={
        'Polygon': [
            [
                [
                    123.0,
                ],
            ],
        ]
    },
    MaxResults=123,
    NextToken='string',
    TrackerName='string'
)
Parameters:
  • FilterGeometry (dict) –

    The geomerty used to filter device positions.

    • Polygon (list) –

      The set of arrays which define the polygon. A polygon can have between 4 and 1000 vertices.

      • (list) –

        • (list) –

          • (float) –

  • MaxResults (integer) –

    An optional limit for the number of entries returned in a single call.

    Default value: 100

  • NextToken (string) –

    The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

    Default value: null

  • TrackerName (string) –

    [REQUIRED]

    The tracker resource containing the requested devices.

Return type:

dict

Returns:

Response Syntax

{
    'Entries': [
        {
            'Accuracy': {
                'Horizontal': 123.0
            },
            'DeviceId': 'string',
            'Position': [
                123.0,
            ],
            'PositionProperties': {
                'string': 'string'
            },
            'SampleTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Entries (list) –

      Contains details about each device’s last known position.

      • (dict) –

        Contains the tracker resource details.

        • Accuracy (dict) –

          The accuracy of the device position.

          • Horizontal (float) –

            Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth’s surface.

        • DeviceId (string) –

          The ID of the device for this position.

        • Position (list) –

          The last known device position. Empty if no positions currently stored.

          • (float) –

        • PositionProperties (dict) –

          The properties associated with the position.

          • (string) –

            • (string) –

        • SampleTime (datetime) –

          The timestamp at which the device position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

    • NextToken (string) –

      A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Exceptions

  • LocationService.Client.exceptions.InternalServerException

  • LocationService.Client.exceptions.AccessDeniedException

  • LocationService.Client.exceptions.ValidationException

  • LocationService.Client.exceptions.ThrottlingException