Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Lockbox
  • Getting started
  • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • PayloadService
      • SecretService
      • OperationService
    • REST
      • Overview
      • Payload
        • Overview
        • get
      • Secret
        • Overview
        • activate
        • addVersion
        • cancelVersionDestruction
        • create
        • deactivate
        • delete
        • get
        • list
        • listAccessBindings
        • listOperations
        • listVersions
        • scheduleVersionDestruction
        • setAccessBindings
        • update
        • updateAccessBindings
  1. API reference
  2. REST
  3. Secret
  4. list

Method list

  • HTTP request
  • Query parameters
  • Response

Retrieves the list of secrets in the specified folder.

HTTP request

GET https://lockbox.api.cloud.yandex.net/lockbox/v1/secrets

Query parameters

Parameter Description
folderId Required. ID of the folder to list secrets in. The maximum string length in characters is 50.
pageSize The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a [ListSecretsRequest.next_page_token] that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000.
pageToken Page token. To get the next page of results, set page_token to the [ListSecretsRequest.next_page_token] returned by a previous list request. The maximum string length in characters is 100.

Response

HTTP Code: 200 - OK

{
  "secrets": [
    {
      "id": "string",
      "folderId": "string",
      "createdAt": "string",
      "name": "string",
      "description": "string",
      "labels": "object",
      "kmsKeyId": "string",
      "status": "string",
      "currentVersion": {
        "id": "string",
        "secretId": "string",
        "createdAt": "string",
        "destroyAt": "string",
        "description": "string",
        "status": "string",
        "payloadEntryKeys": [
          "string"
        ]
      },
      "deletionProtection": true
    }
  ],
  "nextPageToken": "string"
}
Field Description
secrets[] object

A secret that may contain several versions of the payload.

secrets[].
id
string

ID of the secret.

secrets[].
folderId
string

ID of the folder that the secret belongs to.

secrets[].
createdAt
string (date-time)

Creation timestamp.

String in RFC3339 text format.

secrets[].
name
string

Name of the secret.

secrets[].
description
string

Description of the secret.

secrets[].
labels
object

Custom labels for the secret as key:value pairs. Maximum 64 per key.

secrets[].
kmsKeyId
string

Optional ID of the KMS key will be used to encrypt and decrypt the secret.

secrets[].
status
string

Status of the secret.

  • CREATING: The secret is being created.
  • ACTIVE: The secret is active and the secret payload can be accessed.

Can be set to INACTIVE using the deactivate method.

  • INACTIVE: The secret is inactive and unusable.

Can be set to ACTIVE using the deactivate method.

secrets[].
currentVersion
object

Current (i.e. the latest) version of the secret.

secrets[].
currentVersion.
id
string

ID of the version.

secrets[].
currentVersion.
secretId
string

ID of the secret that the version belongs to.

secrets[].
currentVersion.
createdAt
string (date-time)

Time when the version was created.

String in RFC3339 text format.

secrets[].
currentVersion.
destroyAt
string (date-time)

Time when the version is going to be destroyed. Empty unless the status is SCHEDULED_FOR_DESTRUCTION.

String in RFC3339 text format.

secrets[].
currentVersion.
description
string

Description of the version.

secrets[].
currentVersion.
status
string

Status of the secret.

  • ACTIVE: The version is active and the secret payload can be accessed.
  • SCHEDULED_FOR_DESTRUCTION: The version is scheduled for destruction, the time when it will be destroyed is specified in the destroyAt field.
  • DESTROYED: The version is destroyed and cannot be recovered.
secrets[].
currentVersion.
payloadEntryKeys[]
string

Keys of the entries contained in the version payload.

secrets[].
deletionProtection
boolean (boolean)

Flag that inhibits deletion of the secret.

nextPageToken string

This token allows you to get the next page of results for list requests. If the number of results is greater than the specified pageSize, use the next_page_token as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

In this article:
  • HTTP request
  • Query parameters
  • Response
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC