--- layout: docs page_title: Read data description: >- Read versioned key/value data from the kv v2 plugin --- # Read versioned key/value data Read versioned data from an existing data path in the `kv` v2 plugin. - You have [set up a `kv` v2 plugin](/vault/docs/secrets/kv/kv-v2/setup). - Your authentication token has `read` permissions for the `kv` v2 plugin. Use [`vault kv get`](/vault/docs/command/kv/read) to read **all** the current key/value pairs on the given path: ```shell-session $ vault kv get \ -mount \ ``` For example: ```shell-session $ vault kv get -mount shared dev/square-api ======= Secret Path ======= shared/data/dev/square-api ======= Metadata ======= Key Value --- ----- created_time 2024-11-13T21:58:32.128442898Z custom_metadata deletion_time n/a destroyed false version 3 ===== Data ===== Key Value --- ----- prod 5678 sandbox 1234 ``` Use the `-field` flag to target specific key value pairs on the given path: ```shell-session $ vault kv get \ -mount \ -field \ ``` For example: ```shell-session $ vault kv get -mount shared -field prod dev/square-api 5678 ``` @include 'gui-instructions/plugins/kv/open-overview.mdx' - Select the **Secret** tab. - Click the eye icon to view the desired key value. ![Partial screenshot of the Vault GUI showing two key/value pairs at the path dev/square-api. The "prod" key is visible](/img/gui/kv/read-data.png) Call the [`/{plugin_mount_path}/data/{secret_path}`](/vault/api-docs/secret/kv/kv-v2#read-secret-version) endpoint to read all the key/value pairs at the secret path: ```shell-session $ curl \ --request GET \ --header "X-Vault-Token: ${VAULT_TOKEN}" \ ${VAULT_ADDR}/v1//data/ ``` For example: ```shell-session $ curl \ --request GET \ --header "X-Vault-Token: ${VAULT_TOKEN}" \ ${VAULT_ADDR}/v1/shared/data/dev/square-api | jq { "request_id": "992da4a2-f2d1-5786-ea53-1e8ea6440a7c", "lease_id": "", "renewable": false, "lease_duration": 0, "data": { "data": { "prod": "5679", "sandbox": "1234", "smoke": "abcd" }, "metadata": { "created_time": "2024-11-15T02:41:02.556301319Z", "custom_metadata": null, "deletion_time": "", "destroyed": false, "version": 7 } }, "wrap_info": null, "warnings": null, "auth": null, "mount_type": "kv" } ```