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

# Get library analytics component action data.

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

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

## Path parameters

- `file_key` string, required

## Query parameters

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

## Response `200`

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

- object
  - `rows` union, required — An array of analytics data.
    - LibraryAnalyticsComponentActionsByAsset[]
      - `week` string, required — The date in ISO 8601 format. e.g. 2023-12-13
      - `component_key` string, required — Unique, stable id of the component.
      - `component_name` string, required — Name of the component.
      - `component_set_key` string — Unique, stable id of the component set that this component belongs to.
      - `component_set_name` string — Name of the component set that this component belongs to.
      - `detachments` number, required — The number of detach events for this period.
      - `insertions` number, required — The number of insertion events for this period.
    - LibraryAnalyticsComponentActionsByTeam[]
      - `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.

---

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