---
title: "Gets keys from key-value collection"
method: GET
path: "/_fabric/{fabric}/_api/kv/{collection}/keys"
tags: ["Key Value"]
---

# Gets keys from key-value collection

`GET /_fabric/{fabric}/_api/kv/{collection}/keys`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/kv/:collection/keys/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch keys from key-value collection.

## Path parameters

- `fabric` string, string, required
- `collection` string, string, required

## Query parameters

- `groupID` string, string
- `offset` string
- `limit` string
- `order` string

## Response `200`

Successfully fetched the key-value keys.

- KvArrayRc200
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `result` string[]: An array of keys. If there are no results, the array is returned as empty.

## Other responses

- `404`: Failed to find specified fabric or collection.

---

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