---
title: "Get library analytics variable action data."
method: GET
path: "/v1/analytics/libraries/{file_key}/variable/actions"
tags: ["Library Analytics"]
---

# Get library analytics variable action data.

`GET /v1/analytics/libraries/{file_key}/variable/actions`

Returns a list of library analytics variable actions data broken down by the requested dimension.

## Path parameters

- `file_key` string, required

## Query parameters

- `cursor` string
- `group_by` 'variable' | 'team', required
- `start_date` string
- `end_date` string

## Response `200`

Response from the GET /v1/analytics/libraries/{file_key}/variable/actions.

- object
  - `rows` union, required — An array of analytics data.
    - LibraryAnalyticsVariableActionsByAsset[]
      - `week` string, required — The date in ISO 8601 format. e.g. 2023-12-13
      - `variable_key` string, required — Unique, stable id of the variable.
      - `variable_name` string, required — The name of the variable.
      - `variable_type` string, required — The type of the variable.
      - `collection_key` string, required — Unique, stable id of the collection the variable belongs to.
      - `collection_name` string, required — The name of the collection the variable belongs to.
      - `detachments` number, required — The number of detach events for this period.
      - `insertions` number, required — The number of insertion events for this period.
    - LibraryAnalyticsVariableActionsByTeam[]
      - `week` string, required — The date in ISO 8601 format. e.g. 2023-12-13
      - `team_name` string, required — The name of the team using the library.
      - `workspace_name` string — The name of the workspace that the team belongs to.
      - `detachments` number, required — The number of detach events for this period.
      - `insertions` number, required — The number of insertion events for this period.
  - `next_page` boolean, required — Whether there is a next page of data that can be fetched.
  - `cursor` string — The cursor to use to fetch the next page of data. Not present if next_page is false.

## Other responses

- `400` — Bad request. Parameters are invalid or malformed. Please check the input formats. This error can also happen if the requested resources are too large to complete the request, which results in a timeout. Please reduce the number and size of objects requested.
- `401` — Token is missing or incorrect.
- `403` — The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort.
- `429` — In some cases API requests may be throttled or rate limited. Please wait a while before attempting the request again (typically a minute).
- `500` — An internal server error occurred.

## Changes

> 36 revisions in range; 33 could not be searched.

- **2023-12-14** `de5c0106668d` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/figma/apis/figma-api/changes/v1/analytics/libraries/:file_key/variable/actions/get.md)

---

[API](https://skmtc.dev/figma/apis/figma-api.md) · [All operations](https://skmtc.dev/figma/apis/figma-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/figma/figma-api/revisions/d7ab5681d84c/schema)
