---
title: "Retrieve an attribute"
method: GET
path: "/attributes/{id}"
tags: ["Attributes"]
---

# Retrieve an attribute

`GET /attributes/{id}`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/attributes/{id}`
- Auth: HTTP bearer

Fetch an attribute by id, including all of its applications. 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select **Read Attributes** under the Setup & Administration category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

## Path parameters

- `id` string, required

## Query parameters

- `entityType` 'driver' | 'asset' | 'workOrder', required

## Response `200`

The attribute corresponding to request id.

- AttributeExpandedResponse
  - `data` AttributeExpanded
    - `attributeType` 'single-select' | 'multi-select' | 'text' | 'freeform-multi-select' | 'number' | 'date': Denotes the data type of the attribute's values. Valid values: `single-select`, `multi-select`, `text`, `freeform-multi-select`, `number`, `date`.
    - `entityType` 'driver' | 'asset' | 'workOrder': Denotes the type of entity, driver, asset, or workOrder. Valid values: `driver`, `asset`, `workOrder`.
    - `id` string: The samsara id of the attribute object.
    - `name` string: Name of attribute.
    - `numberValues` number[]: Number values that can be associated with this attribute. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
    - `stringValues` string[]: String values that can be associated with this attribute. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
    - `unit` 'NO_UNIT' | 'METER' | 'POUND' | 'TON' | 'KILOGRAM' | 'INCH' | 'FOOT' | 'GALLON' | 'LITER' | 'BARREL' | 'POUND_PER_SQUARE_INCH' | 'BAR' | 'KILOPASCAL' | 'FAHRENHEIT' | 'CELSIUS' | 'USD' | 'CAD' | 'EUR' | 'GBP' | 'MXN' | 'HOUR' | 'MINUTE' | 'DAY' | 'MILE_PER_HOUR' | 'KILOMETER_PER_HOUR' | 'HORSEPOWER' | 'KILOWATT' | 'BTU_PER_HOUR' | 'KILOWATT_HOUR' | 'BTU' | 'HERTZ' | 'REVOLUTION_PER_MINUTE' | 'DECIBEL': Unit of the attribute (only for Number attributes).
    - `values` AttributeValueTiny[]: Representation of values that includes ids. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
      - `id` string: The samsara id of this value object.
      - `stringValue` string: The human-readable string for this value.
    - `entities` AttributeEntity[], required: Entities that this attribute is applied onto
      - `dateValues` string[]: Date values that are associated with this attribute (RFC 3339 date format: YYYY-MM-DD).
      - `entityId` integer
      - `externalIds` object: The [external IDs](https://developers.samsara.com/docs/external-ids) for the given object.
      - `name` string
      - `numberValues` number[]: Number values that are associated with this attribute. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
      - `stringValues` string[]: String values that are associated with this attribute. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
      - `values` AttributeValueTiny[]: Representation of values that includes ids. Note: this field is `null` for `text` and `freeform-multi-select` attribute types.`
        - `id` string: The samsara id of this value object.
        - `stringValue` string: The human-readable string for this value.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
