> ## 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.

# List recent data usage records



## OpenAPI

````yaml /api/1/openapi.yaml get /usage/data/
openapi: 3.0.0
info:
  title: Hologram REST API v1
  description: >-
    The Hologram HTTP API is a REST-style interface for managing Hologram SIMs,
    accounts, and cloud data. Using this API, you can activate SIMs, get your
    devices' approximate location, send SMS messages to your devices, update
    data usage limits, and much more.


    In Hologram's API, a "device" represents a SIM card. Each item returned by
    `/devices` endpoints represents a single SIM card. You can find more
    information about Hologram terminology in our
    [Glossary](https://docs.hologram.io/guides/get-started/glossary) and the
    Hologram [Connectivity
    overview](https://docs.hologram.io/guides/get-started/sim-connectivity-overview).
    The device ID and SIM ID are effectively the same and represent one SIM, but
    device ID is used in older API endpoints and SIM ID is used in newer API
    endpoints.


    ## Base URL


    ```

    https://dashboard.hologram.io/api/1

    ```


    ## Authentication


    Hologram supports **HTTP Basic authentication** using API keys. Set the
    username to `apikey` and use your API key as the password.


    ### Using cURL


    ```

    curl --verbose GET \

    'https://dashboard.hologram.io/api/1/users/me' \

    -u apikey:YOUR_API_KEY

    ```


    ### Using authorization header


    You can also base64 encode `apikey:YOUR_API_KEY` and include it in the
    Authorization header:


    ```

    curl --verbose GET \

    'https://dashboard.hologram.io/api/1/users/me' \

    --header "Authorization: Basic BASE64_ENCODED_CREDENTIALS"

    ```


    ## API access levels


    - **Read Access**: Available to Editor roles and higher.

    - **Write Access**: Varies by endpoint based on role access, generally
    limited to Admin and Manager roles.


    Users without appropriate permissions will receive 403 errors for restricted
    operations.


    ## Requests


    Request bodies can be provided in either JSON or form-urlencoded formats:


    ### JSON format (recommended)


    ```

    curl --request POST \

    --header "Content-Type: application/json" \

    --header "Authorization: Basic YOUR_ENCODED_CREDENTIALS" \

    --data '{"deviceid": 56668, "body": "Hello SIM!"}' \

    'https://dashboard.hologram.io/api/1/sms/incoming'

    ```


    ### Form-urlencoded format


    ```

    curl --request POST \

    --header "Content-Type: application/x-www-form-urlencoded" \

    --header "Authorization: Basic YOUR_ENCODED_CREDENTIALS" \

    --data 'deviceid=56668&body=Hello%20SIM!' \

    'https://dashboard.hologram.io/api/1/sms/incoming'

    ```


    ## Responses


    **Important:** All Hologram dates and times are stored and displayed in
    **UTC**.


    ### Response format


    All API responses are JSON objects that include the following fields:


    * `success` (boolean) - Indicates whether the request was successful.

    * `data` (object or array) - Contains the requested data or information
    about the operation performed. Only present when `success` is true.

    * `error` (string) - Information about why the request failed. Only present
    when `success` is false.


    ### Limited responses


    Most GET responses will also include the following fields if a limit is
    included as part of the query string:


    * `limit` (number) - The query limit. Some endpoints have this value built
    in and others often have a maximum value.

    * `size` (number) - The number of values returned by the query.

    * `continues` (boolean, optional) - Only returned if there are more values
    than were returned in the response.

    * `links` (object) - Contains information related to the query performed.
      * `path` (string) - The API endpoint path.
      * `base` (string) - API base URL.
      * `next` (string) - URL with query string to get the next results.

    ## Rate limiting


    In order to provide a consistent quality of service to all of our customers,
    we enforce a rate limit on all API requests. If you exceed the rate limit
    you will receive a HTTP 429 response with a JSON response body like this:


    ```

    {
      "success": false,
      "error": "API rate limit exceeded"
    }

    ```


    If you receive this response, you should refrain from making requests for
    5-10 seconds and then retry the request.


    ## Generating an API key


    Find your account API key in your
    [dashboard](https://dashboard.hologram.io/settings/api) under the
    **Settings** section in the main menu, then opening the **API** page.


    Your API can be used to access all organizations you are a member of.


    **Caution:** **Keep your API key secure** and never store it in publicly
    accessible places like GitHub repositories.


    ## Organization IDs


    Your API key gives you access to all organizations you are a member of. If
    no organization is specified in an API request, the request will be
    performed for your personal organization.


    Many endpoints accept an `orgid` parameter to filter for SIMs within a
    specific organization. Learn how to find your organization's ID in [this
    guide](https://docs.hologram.io/dashboard/orgs-and-users/organization-overview).


    ## OpenAPI and Swagger links


    OpenAPI -
    [https://dashboard.hologram.io/api/1/docs/openapi.json](https://dashboard.hologram.io/api/1/docs/openapi.json)


    Swagger -
    [https://dashboard.hologram.io/api/1/docs](https://dashboard.hologram.io/api/1/docs)


    ## Support


    For API support, questions, or additional assistance, please [contact our
    support team](https://docs.hologram.io/guides/get-started/contact-support).
  version: '1'
servers:
  - url: https://dashboard.hologram.io/api/1
    description: Hologram REST API v1
security: []
tags:
  - name: SIMs (Devices)
    description: SIMs (Devices)
  - name: SIM Configuration
    description: SIM Configuration
    x-group: SIM Configuration - Conductor
  - name: Organizations
    description: Organizations
  - name: Personal account
    description: Personal account
  - name: Async Change Requests
    description: Async Change Requests
  - name: Events and Alerts
    description: Events and Alerts
paths:
  /usage/data/:
    get:
      tags:
        - SIMs (Devices)
      summary: List recent data usage records
      operationId: getRecentUsage
      parameters:
        - name: limit
          in: query
          description: Maximum number of results to return (max 5000)
          required: false
          schema:
            type: integer
            default: 100
            maximum: 5000
        - name: before
          in: query
          description: >-
            Return records with ID less than this value (cursor-based
            pagination)
          required: false
          schema:
            type: integer
        - name: after
          in: query
          description: >-
            Return records with ID greater than this value (cursor-based
            pagination)
          required: false
          schema:
            type: integer
        - name: linkid
          in: query
          description: Filter by a specific cellular link (SIM profile) ID
          required: false
          schema:
            type: integer
        - name: linkids
          in: query
          description: Comma-separated list of link (SIM profile) IDs to filter by
          required: false
          schema:
            type: string
        - name: tagids
          in: query
          description: Comma-separated list of device tag IDs to filter by
          required: false
          schema:
            type: string
        - name: timestart
          in: query
          description: Unix timestamp; return records from this time onward
          required: false
          schema:
            type: integer
        - name: timeend
          in: query
          description: Unix timestamp; return records up to this time
          required: false
          schema:
            type: integer
        - name: islive
          in: query
          description: When true, include only live (non-paused) devices
          required: false
          schema:
            type: boolean
        - name: getdeviceinfo
          in: query
          description: When true, include device metadata in each record
          required: false
          schema:
            type: boolean
        - name: getplaninfo
          in: query
          description: When true, include data plan metadata in each record
          required: false
          schema:
            type: boolean
        - name: getprofileinfo
          in: query
          description: When true, include SIM profile metadata in each record
          required: false
          schema:
            type: boolean
        - name: getcountryinfo
          in: query
          description: When true, include country metadata in each record
          required: false
          schema:
            type: boolean
        - name: getlocationinfo
          in: query
          description: When true, include location metadata in each record
          required: false
          schema:
            type: boolean
        - name: startafter
          in: query
          description: Return results with record ID less than this value
          required: false
          schema:
            type: integer
        - name: higherthanid
          in: query
          description: Return results with record ID greater than this value
          required: false
          schema:
            type: integer
        - name: simcardids
          in: query
          description: Comma-separated list of SIM card IDs
          required: false
          schema:
            type: string
        - name: tagid
          in: query
          description: Filter by device tag ID
          required: false
          schema:
            type: integer
        - name: tagname
          in: query
          description: Filter by device tag name
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageDataListResponse'
        '401':
          description: Unauthorized
      security:
        - apiKeyAuth: []
components:
  schemas:
    UsageDataListResponse:
      properties:
        success:
          $ref: '#/components/schemas/SuccessProperty'
        limit:
          description: Maximum number of records returned per page
          type: integer
        size:
          description: Number of records in this response
          type: integer
        continues:
          description: True if more records are available
          type: boolean
        lastid:
          description: >-
            record_id of the last record returned; pass as startafter to fetch
            the next page
          type: integer
        links:
          $ref: '#/components/schemas/PaginationLinks'
        data:
          type: array
          items:
            $ref: '#/components/schemas/UsageDataRecord'
      type: object
    SuccessProperty:
      description: Indicates whether the request was successful.
      type: boolean
      example: true
    PaginationLinks:
      properties:
        path:
          description: The API endpoint path
          type: string
        base:
          description: The API base URL
          type: string
        next:
          description: URL to retrieve the next page of results
          type: string
      type: object
    UsageDataRecord:
      properties:
        linkid:
          description: Cellular link (SIM) ID
          type: integer
        record_id:
          description: Unique usage record ID, used for cursor-based pagination
          type: integer
        session_begin:
          description: Session start time (UTC)
          type: string
        timestamp:
          description: Session end time (UTC)
          type: string
        bytes:
          description: Bytes transferred in this session
          type: integer
        imeisv:
          description: Raw IMEISV (15-digit IMEI + 2-digit software version)
          type: string
        imei:
          description: IMEI derived from the IMEISV
          type: string
        cellid:
          description: Cell tower ID
          type: integer
        lac:
          description: Location Area Code
          type: integer
        radio_access_technology:
          description: Radio access technology (e.g. LTE, 3G)
          type: string
        network_name:
          description: Carrier network name
          type: string
        sim:
          description: SIM ICCID
          type: string
        simcardid:
          description: SIM card ID
          type: integer
        data_plan_id:
          description: Data plan subscription ID active during this session
          type: integer
        tags:
          description: Device tags at time of record
          type: array
          items:
            type: string
        country:
          description: Country code (present when getcountryinfo=true)
          type: string
        profile_name:
          description: SIM profile name (present when getprofileinfo=true)
          type: string
        latitude:
          description: Approximate latitude (present when getlocationinfo=true)
          type: number
          nullable: true
        longitude:
          description: Approximate longitude (present when getlocationinfo=true)
          type: number
          nullable: true
      type: object
  securitySchemes:
    apiKeyAuth:
      type: http
      description: >-
        HTTP Basic authentication using API keys. Set the username to `apikey`
        and the password to your API key. You can find your API key on the
        Hologram Dashboard under Account Settings.
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.