> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # ListSecretInfo # Package: secrets # Namespace: SecretsVaultService # Method link: https://dev.wix.com/docs/api-reference/business-management/secrets/list-secret-info.md ## Permission Scopes: Manage Secrets: SCOPE.VELO.MANAGE_SECRETS ## Introduction Retrieves a list of secrets. > **Note:** This method doesn't return the secret's value for security reasons. To retrieve the value, call [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value.md). --- ## REST API ### Schema ``` Method: listSecretInfo Description: Retrieves a list of secrets. > **Note:** This method doesn't return the secret's value for security reasons. To retrieve the value, call [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value.md). URL: https://www.wixapis.com/api/v1/secrets Method: GET Return type: ListSecretInfoResponse - name: secrets | type: array | description: A list of secrets with encrypted values. - name: id | type: string | description: Unique secret GUID. - name: name | type: string | description: A unique, human-friendly name for the secret. Use it to retrieve the secret value with Get Secret Value. **Note:** You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported. - name: description | type: string | description: Optional text describing the secret's purpose or any other notes about it. - name: value | type: string | description: The encrypted confidential value. - name: createdDate | type: string | description: Date and time when the secret was created. - name: updatedDate | type: string | description: Date and time when the secret was updated. ``` ### Examples ### ListSecretInfo ```curl ~~~cURL curl -X GET 'https://www.wixapis.com/_api/cloud-secrets-vault-server/api/v1/secrets' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.secrets.SecretsVaultService.listSecretInfo() Description: Retrieves a list of secrets. > **Note:** This method doesn't return the secret's value for security reasons. To retrieve the value, call [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value.md). Return type: PROMISE - name: secrets | type: array | description: A list of secrets with encrypted values. - name: _id | type: string | description: Unique secret GUID. - name: name | type: string | description: A unique, human-friendly name for the secret. Use it to retrieve the secret value with Get Secret Value. **Note:** You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported. - name: description | type: string | description: Optional text describing the secret's purpose or any other notes about it. - name: value | type: string | description: The encrypted confidential value. - name: _createdDate | type: Date | description: Date and time when the secret was created. - name: _updatedDate | type: Date | description: Date and time when the secret was updated. ``` ### Examples ### listSecretInfo ```javascript import { secrets } from '@wix/secrets'; async function listSecretInfo() { const response = await secrets.listSecretInfo(); }; ``` ### listSecretInfo (with elevated permissions) ```javascript import { secrets } from '@wix/secrets'; import { auth } from '@wix/essentials'; async function myListSecretInfoMethod() { const elevatedListSecretInfo = auth.elevate(secrets.listSecretInfo); const response = await elevatedListSecretInfo(); } ``` ### listSecretInfo (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { secrets } from '@wix/secrets'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { secrets }, // Include the auth strategy and host as relevant }); async function listSecretInfo() { const response = await myWixClient.secrets.listSecretInfo(); }; ``` ---