---
title: "List Trace Item Attributes"
url: https://docs.sentry.io/api/discover/list-trace-item-attributes/
---

# List Trace Item Attributes | Sentry Docs

GET /api/0/organizations/{organization\_id\_or\_slug}/trace-items/attributes/

List the attribute keys available on a given trace item dataset (spans, logs, trace metrics, etc.), with optional substring and structured filtering.

Pass `expand=context` (experimental) to include each attribute's metadata: a brief description, examples, and deprecation details.

### Path Parameters

* `organization_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the organization the resource belongs to.

### Query Parameters:

* `statsPeriod` *(string)*

  The period of time for the query, will override the start & end parameters, a number followed by one of:

  * `d` for days
  * `h` for hours
  * `m` for minutes
  * `s` for seconds
  * `w` for weeks

  For example, `24h`, to mean query data starting from 24 hours ago to now.

* `start` *(string)*

  The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

* `end` *(string)*

  The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

* `environment` *(array(string))*

  The name of environments to filter by.

* `project` *(array(undefined))*

  The IDs or slugs of projects to filter by. Project slugs are unique within each organization. Omit this parameter to include all accessible projects. `-1` is also accepted to include all accessible projects. For example, the following are valid parameters:

  * `/?project=1234&project=56789`
  * `/?project=android&project=javascript-react`
  * `/?project=-1`

* `dataset` *(string)*

  **choices**:

  * `logs
    preprod
    processing_errors
    spans
    tracemetrics`

  The trace item dataset to list attributes for. One of `itemType` or `dataset` is required.

* `itemType` *(string)*

  **choices**:

  * `logs
    preprod
    processing_errors
    spans
    tracemetrics`

  Deprecated alias of `dataset`. Use `dataset` instead.

* `attributeType` *(array(string))*

  **choices**:

  * `array
    boolean
    number
    string`

  Filter to attributes of one or more types. Defaults to all types.

* `substringMatch` *(string)*

  Restrict results to attribute names containing this substring (case-sensitive).

* `query` *(string)*

  Sentry [search syntax](https://docs.sentry.io/concepts/search.md) to filter trace items before computing attributes.

* `expand` *(array(string))*&#x45;xperimental

  **choices**:

  * `context`

  **Experimental:** This parameter is under active development and may change.

  Optional fields to expand. Pass `context` to include attribute metadata (brief, examples, deprecation, etc.).

* `cursor` *(string)*

  A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.

### Scopes

You need to [authenticate via bearer auth token.](https://docs.sentry.io/api/auth.md)

`<auth_token>` requires one of the following scopes:

* `org:admin`
* `org:read`
* `org:write`

```
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/trace-items/attributes/ \
 -H 'Authorization: Bearer <auth_token>'
```

RESPONSESCHEMA

```
Copied
[
  {
    "key": "device.class",
    "name": "device.class",
    "attributeSource": {
      "source_type": "sentry"
    },
    "attributeType": "string"
  },
  {
    "key": "tags[Batch Size,number]",
    "name": "Batch Size",
    "attributeSource": {
      "source_type": "user"
    },
    "attributeType": "number"
  }
]
```

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
