---
title: "Get key-value pairs from collection"
method: POST
path: "/_fabric/{fabric}/_api/kv/{collection}/values"
tags: ["Key Value"]
---

# Get key-value pairs from collection

`POST /_fabric/{fabric}/_api/kv/{collection}/values`

## 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/values/post.ts> (a function with typed inputs; its response is checked against the schema)

Fetch key-value pairs from collection. Optional list of keys.

**Note:** Max limit is 100 keys per request.

Note that you should specify multipart/form-data as the response content type when you are retrieving from a blob collection.

## Path parameters

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

## Query parameters

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

## Request body

- string[]

## Response `200`

Successfully fetched an array of key-value pairs from collection. If no keys are found and empty array is returned.

- KvGetValuesExamplesRc200
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `result` object[]: An array of key-value pairs from collection. If no keys are found and empty array is returned.
    - `_key` string
    - `value` string
    - `expireAt` number

## Other responses

- `404`: Failed to find specified key-value pair.

---

[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)
