---
title: "Get Labels For App"
method: POST
path: "/v1/logs/labels"
tags: ["logs"]
---

# Get Labels For App

`POST /v1/logs/labels`

Fetch labels' keys or values from the logs.

1. If 'key' is provided, it searches for values associated with the specified label key(s).
2. If 'key' is NOT provided, it fetches the label keys for the given app keys.

Parameters:
- key (str, optional): Optional parameter to search for specific label keys.
- keys (List[str]): List of app keys to fetch labels for.

Returns:
- List[str]: A list of label keys or values, depending on the use case.

## Query parameters

- `key` string, nullable

## Request body

- FilteredSearch
  - `params` GetTableSortParams[] — The sorting parameters for the query
    - `col` string, required
    - `order` 'asc' | 'desc', required
    - `multiple` boolean, nullable, required
  - `date_from` string, date-time, required — The earliest date we are searching for.
  - `date_to` string, date-time, nullable — The latest date we are searching for.
  - `app_ids` string[] — The list of API Keys we want to filter for. Leave the list empty to disable filtering (and return data for all apps) instead.

## Response `200`

Successful Response

- string[]

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pulze/apis/pulze-ai-api.md) · [All operations](https://skmtc.net/pulze/apis/pulze-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pulze/pulze-ai-api/revisions/a5e0b539abc5/schema)
