---
title: "List the accessible databases for a keyid"
method: GET
path: "/_api/key/{keyid}/database"
tags: ["API Keys"]
---

# List the accessible databases for a keyid

`GET /_api/key/{keyid}/database`

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

Fetch the list of databases available to the specified *keyid*.

Returns a JSON object with the per-database access privileges for the specified *keyid*. The result object contains databases names as object keys, and associated privileges for the database as values.

If you specified *full*, the result contains permissions for the databases as well as permissions for the collections and streams.

**Note**: Requires *administrator* permissions.

## Path parameters

- `keyid` string, string, required

## Query parameters

- `full` boolean

## Response `200`

Successfully fetched database list.

- ApiKeyGetHttpExamplesRc200
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `result` object[]
    - `_system` string: Access level of system is described.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.
- `403`: Failed because you do not have access to the server.
- `404`: Failed to find specified API key.

---

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