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

# Get value from key-value collection

`GET /_fabric/{fabric}/_api/kv/{collection}/value/{key}`

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

Fetch value from key-value collection.

Note that you should only 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
- `key` string, string, required

## Response `200`

Successfully fetched the key-value pair.

- KvKeyExamplesRc200
  - `_id` string: ID of the collection.
  - `_key` string: _key details of collection.
  - `_rev` string: _rev details of collection.
  - `expireAt` integer: Expiration details of collection.n
  - `value` string: Value of the collection.

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