Scaleway logo
Secret Manager API

Versions store the sensitive data contained in your secrets (API keys, passwords, or certificates)


Access a secret's version using the secret's name and path

GET
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets-by-path/versions/{revision}/access

Access sensitive data in a secret's version specified by the region, secret_name, secret_path and revision parameters.

Access a secret's version using the secret's name and path › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • an integer (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Access a secret's version using the secret's name and path › query Parameters

secret_path
​string · required

Secret's path.

secret_name
​string · required

Secret's name.

project_id
​string · required

ID of the Project to target. (UUID format)

Access a secret's version using the secret's name and path › Responses

200
secret_id
​string

ID of the secret. (UUID format)

revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

data
​string

The base64-encoded secret payload of the version.

data_crc32
​integer | null · uint32

The CRC32 checksum of the data as a base-10 integer. This field is only available if a CRC32 was supplied during the creation of the version.

Type of the secret. See the Secret.Type enum for a description of values.

Enum values:
unknown_type
opaque
certificate
key_value
basic_credentials
database_credentials
ssh_key
Default: unknown_type

List versions of a secret using the secret's ID

GET
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions

Retrieve the list of a given secret's versions specified by the secret_id and region parameters.

List versions of a secret using the secret's ID › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

List versions of a secret using the secret's ID › query Parameters

page
​google.protobuf.Int32Value · int32
page_size
​integer · uint32

Filter results by status.

Enum values:
unknown_status
enabled
disabled
deleted
scheduled_for_deletion

List versions of a secret using the secret's ID › Responses

200

Single page of versions.

total_count
​integer · uint64

Number of versions.


Create a version

POST
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions

Create a version of a given secret specified by the region and secret_id parameters.

Create a version › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

Create a version › Request Body

data
​string

The base64-encoded secret payload of the version.

description
​string | null

Description of the version.

disable_previous
​boolean | null

Disable the previous secret version. (Optional.) If there is no previous version or if the previous version was already disabled, does nothing.

data_crc32
​integer | null · uint32

(Optional.) The CRC32 checksum of the data as a base-10 integer. If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests.

Create a version › Responses

200
revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

srn
​string · pattern: ^srn://secret-manage…

The SRN of the secret version.

secret_id
​string

ID of the secret. (UUID format)

Current status of the version.

  • unknown_status: the version is in an invalid state.
  • enabled: the version is accessible.
  • disabled: the version is not accessible but can be enabled.
  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
  • deleted: the version is permanently deleted. It is not possible to recover it.
Enum values:
unknown_status
enabled
disabled
deleted
scheduled_for_deletion
Default: unknown_status
created_at
​string | null · date-time

Date and time of the version's creation. (RFC 3339 format)

updated_at
​string | null · date-time

Last update of the version. (RFC 3339 format)

deleted_at
​string | null · date-time

Date and time of the version's deletion. (RFC 3339 format)

description
​string | null

Description of the version.

latest
​boolean

Returns true if the version is the latest.

Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

region
​string

Region of the version.


Get metadata of a secret's version using the secret's ID

GET
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}

Retrieve the metadata of a secret's given version specified by the region, secret_id and revision parameters.

Get metadata of a secret's version using the secret's ID › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Get metadata of a secret's version using the secret's ID › Responses

200
revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

srn
​string · pattern: ^srn://secret-manage…

The SRN of the secret version.

secret_id
​string

ID of the secret. (UUID format)

Current status of the version.

  • unknown_status: the version is in an invalid state.
  • enabled: the version is accessible.
  • disabled: the version is not accessible but can be enabled.
  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
  • deleted: the version is permanently deleted. It is not possible to recover it.
Enum values:
unknown_status
enabled
disabled
deleted
scheduled_for_deletion
Default: unknown_status
created_at
​string | null · date-time

Date and time of the version's creation. (RFC 3339 format)

updated_at
​string | null · date-time

Last update of the version. (RFC 3339 format)

deleted_at
​string | null · date-time

Date and time of the version's deletion. (RFC 3339 format)

description
​string | null

Description of the version.

latest
​boolean

Returns true if the version is the latest.

Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

region
​string

Region of the version.


Update metadata of a version

PATCH
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}

Edit the metadata of a secret's given version, specified by the region, secret_id and revision parameters.

Update metadata of a version › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Update metadata of a version › Request Body

description
​string | null

Description of the version.

Ephemeral properties of the version. (Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

Update metadata of a version › Responses

200
revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

srn
​string · pattern: ^srn://secret-manage…

The SRN of the secret version.

secret_id
​string

ID of the secret. (UUID format)

Current status of the version.

  • unknown_status: the version is in an invalid state.
  • enabled: the version is accessible.
  • disabled: the version is not accessible but can be enabled.
  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
  • deleted: the version is permanently deleted. It is not possible to recover it.
Enum values:
unknown_status
enabled
disabled
deleted
scheduled_for_deletion
Default: unknown_status
created_at
​string | null · date-time

Date and time of the version's creation. (RFC 3339 format)

updated_at
​string | null · date-time

Last update of the version. (RFC 3339 format)

deleted_at
​string | null · date-time

Date and time of the version's deletion. (RFC 3339 format)

description
​string | null

Description of the version.

latest
​boolean

Returns true if the version is the latest.

Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

region
​string

Region of the version.


Delete a version

DELETE
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}

Delete a secret's version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone.

Delete a version › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Delete a version › Responses

No data returned

Access a secret's version using the secret's ID

GET
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}/access

Access sensitive data in a secret's version specified by the region, secret_id and revision parameters.

Access a secret's version using the secret's ID › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Access a secret's version using the secret's ID › Responses

200
secret_id
​string

ID of the secret. (UUID format)

revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

data
​string

The base64-encoded secret payload of the version.

data_crc32
​integer | null · uint32

The CRC32 checksum of the data as a base-10 integer. This field is only available if a CRC32 was supplied during the creation of the version.

Type of the secret. See the Secret.Type enum for a description of values.

Enum values:
unknown_type
opaque
certificate
key_value
basic_credentials
database_credentials
ssh_key
Default: unknown_type

Disable a version

POST
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}/disable

Make a specific version inaccessible. You must specify the region, secret_id and revision parameters.

Disable a version › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Disable a version › Request Body

Disable a version › Responses

200
revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

srn
​string · pattern: ^srn://secret-manage…

The SRN of the secret version.

secret_id
​string

ID of the secret. (UUID format)

Current status of the version.

  • unknown_status: the version is in an invalid state.
  • enabled: the version is accessible.
  • disabled: the version is not accessible but can be enabled.
  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
  • deleted: the version is permanently deleted. It is not possible to recover it.
Enum values:
unknown_status
enabled
disabled
deleted
scheduled_for_deletion
Default: unknown_status
created_at
​string | null · date-time

Date and time of the version's creation. (RFC 3339 format)

updated_at
​string | null · date-time

Last update of the version. (RFC 3339 format)

deleted_at
​string | null · date-time

Date and time of the version's deletion. (RFC 3339 format)

description
​string | null

Description of the version.

latest
​boolean

Returns true if the version is the latest.

Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

region
​string

Region of the version.


Enable a version

POST
https://api.scaleway.com
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}/enable

Make a specific version accessible. You must specify the region, secret_id and revision parameters.

Enable a version › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
secret_id
​string · required

ID of the secret. (UUID format)

revision
​string · required

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:

  • a number (the revision number)
  • "latest" (the latest revision)
  • "latest_enabled" (the latest enabled revision).

Enable a version › Request Body

Enable a version › Responses

200
revision
​integer · uint32

Version number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.

srn
​string · pattern: ^srn://secret-manage…

The SRN of the secret version.

secret_id
​string

ID of the secret. (UUID format)

Current status of the version.

  • unknown_status: the version is in an invalid state.
  • enabled: the version is accessible.
  • disabled: the version is not accessible but can be enabled.
  • scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.
  • deleted: the version is permanently deleted. It is not possible to recover it.
Enum values:
unknown_status
enabled
disabled
deleted
scheduled_for_deletion
Default: unknown_status
created_at
​string | null · date-time

Date and time of the version's creation. (RFC 3339 format)

updated_at
​string | null · date-time

Last update of the version. (RFC 3339 format)

deleted_at
​string | null · date-time

Date and time of the version's deletion. (RFC 3339 format)

description
​string | null

Description of the version.

latest
​boolean

Returns true if the version is the latest.

Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.

deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

region
​string

Region of the version.