---
title: "Query secrets or directories by path"
method: GET
path: "/secrets/query"
tags: ["secrets"]
---

# Query secrets or directories by path

`GET /secrets/query`

Query secrets or directories by path

## Query parameters

- `path` string, required
- `object_type` string

## Response `200`

Directory or secrets matching input were found

- SecretQueryResult — List secrets and directories result under the name queried
  - `dir_name_list` string[] — directories under the name queried
  - `secret` SecretDefStatus — Secret Entity Definition
    - `name` string, required — The secret name
    - `resources` SecretResourcesDefStatus, required — Secret details
      - `payload_content_type` string — The media type for the content of payload. This determines how to parse the contents of payload.
      - `object_type` string — The object type to determine whether it is a secret or directory.
      - `payload_content_encoding` string — The encoding used for the payload to be able to include it in the JSON request. Currently only base64 is supported, required if payload is encoded.
      - `payload_type` string — Used to indicate the type of secret being stored.
      - `user_metadata` string — Metadata provided by a user or system for informational purposes.
      - `path` string — The secret path
      - `payload` string — The secret’s data to be stored. payload_content_type must also be supplied if payload is included.
      - `expiration` string, date-time — UTC date and time in RFC-3339 format when secret expires.
  - `secret_name_list` string[] — secrets under the name queried

## Other responses

- `default` — failed to query the secrets

---

[API](https://skmtc.net/nutanix/apis/nutanix-intentful-api.md) · [All operations](https://skmtc.net/nutanix/apis/nutanix-intentful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nutanix/nutanix-intentful-api/revisions/40395083ab31/schema)
