> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hologram.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Determine device's location via the REST API

> Retrieve approximate device location from the last session via the Devices endpoint.

## How to determine device's location via the REST API

You can query a device to retrieve its most recent location approximation via the REST API. The response includes a `lastsession` object with latitude and longitude when the network provides it.

<Note>
  **Note:** If you're new to APIs, use a REST client and include your API key in the `Authorization` header. Pagination is supported via `limit` and `startafter`.
</Note>

<Step title="Get device details">
  Replace `YOUR_DEVICE_ID` with the integer device ID.

  <RequestExample>
    ```bash cURL theme={null}
    curl -X GET \
      'https://dashboard.hologram.io/api/1/devices/YOUR_DEVICE_ID' \
      -u apikey:YOUR_HOLOGRAM_API_KEY
    ```
  </RequestExample>
</Step>

<Warning>
  **Warning:** Not every network provides location information, and not every session includes it. For historical data, use session history or data usage by session reports.
</Warning>
