Scaleway logo
Secret Manager API

Secrets are logical containers made up of zero or more immutable versions, that contain sensitive data


List secrets

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

Retrieve the list of secrets created within an Organization and/or Project. If the user has permissions for all current and future projects: Either organization_id or project_id is required. If the user has permissions for all current projects or only specific projects: The project_id is required. The region parameter in path is needed in both case.

List secrets › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

List secrets › query Parameters

scheduled_for_deletion
​boolean · required

Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.

organization_id
​string

Filter by Organization ID (optional). (UUID format)

project_id
​string

Filter by Project ID (optional). (UUID format)

Enum values:
name_asc
name_desc
created_at_asc
created_at_desc
updated_at_asc
updated_at_desc
Default: name_asc
page
​google.protobuf.Int32Value · int32
page_size
​integer · uint32
tags
​string[]

List of tags to filter on (optional).

name
​string

Filter by secret name (optional).

path
​string

Filter by exact path (optional).

ephemeral
​boolean

Filter by ephemeral / not ephemeral (optional).

Filter by secret type (optional).

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

List secrets › Responses

200

Single page of secrets matching the requested criteria.

total_count
​integer · uint64

Count of all secrets matching the requested criteria.


Create a secret

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

Create a secret in a given region specified by the region parameter.

Create a secret › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

Create a secret › Request Body

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

tags
​string[]

List of the secret's tags.

description
​string | null

Description of the secret.

Type of the secret. (Optional.) See the Secret.Type enum for a description of values. If not specified, the type is Opaque.

Enum values:
unknown_type
opaque
certificate
key_value
basic_credentials
database_credentials
ssh_key
Default: unknown_type
path
​string | null

Path of the secret. (Optional.) Location of the secret in the directory structure. If not specified, the path is /.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

protected
​boolean

Returns true if secret protection is applied to a given secret. A protected secret cannot be deleted.

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID will be used to encrypt and decrypt secret versions. If not specified, Secret Manager will use a Key Manager internal key. (UUID format)

Create a secret › Responses

200
id
​string

ID of the secret. (UUID format)

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

The SRN of the secret.

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

status
​scaleway.secret_manager.v1beta1.Secret.Status · enum

Current status of the secret.

  • ready: the secret can be read, modified and deleted.
  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
Enum values:
unknown_status
ready
locked
Default: unknown_status
created_at
​string | null · date-time

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

updated_at
​string | null · date-time

Last update of the secret. (RFC 3339 format)

tags
​string[]

List of the secret's tags.

version_count
​integer · uint32

Number of versions for this secret.

description
​string | null

Updated description of the secret.

managed
​boolean

Returns true for secrets that are managed by another product.

protected
​boolean

Returns true for protected secrets that cannot be deleted.

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
path
​string

Path of the secret. Location of the secret in the directory structure.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

List of Scaleway resources that can access and manage the secret.

Enum values:
unknown_product
edge_services
s2s_vpn
deletion_requested_at
​string | null · date-time

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

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)

region
​string

Region of the secret.


Get metadata using the secret's ID

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

Retrieve the metadata of a secret specified by the region and secret_id parameters.

Get metadata 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)

Get metadata using the secret's ID › Responses

200
id
​string

ID of the secret. (UUID format)

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

The SRN of the secret.

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

status
​scaleway.secret_manager.v1beta1.Secret.Status · enum

Current status of the secret.

  • ready: the secret can be read, modified and deleted.
  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
Enum values:
unknown_status
ready
locked
Default: unknown_status
created_at
​string | null · date-time

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

updated_at
​string | null · date-time

Last update of the secret. (RFC 3339 format)

tags
​string[]

List of the secret's tags.

version_count
​integer · uint32

Number of versions for this secret.

description
​string | null

Updated description of the secret.

managed
​boolean

Returns true for secrets that are managed by another product.

protected
​boolean

Returns true for protected secrets that cannot be deleted.

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
path
​string

Path of the secret. Location of the secret in the directory structure.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

List of Scaleway resources that can access and manage the secret.

Enum values:
unknown_product
edge_services
s2s_vpn
deletion_requested_at
​string | null · date-time

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

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)

region
​string

Region of the secret.


Update metadata of a secret

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

Edit a secret's metadata such as name, tag(s), description and ephemeral policy. The secret to update is specified by the secret_id and region parameters.

Update metadata of a secret › 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)

Update metadata of a secret › Request Body

name
​string | null

Secret's updated name (optional).

tags
​array | null

Secret's updated list of tags (optional).

description
​string | null

Description of the secret.

path
​string | null

Path of the folder. (Optional.) Location of the folder in the directory structure. If not specified, the path is /.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire.

Update metadata of a secret › Responses

200
id
​string

ID of the secret. (UUID format)

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

The SRN of the secret.

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

status
​scaleway.secret_manager.v1beta1.Secret.Status · enum

Current status of the secret.

  • ready: the secret can be read, modified and deleted.
  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
Enum values:
unknown_status
ready
locked
Default: unknown_status
created_at
​string | null · date-time

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

updated_at
​string | null · date-time

Last update of the secret. (RFC 3339 format)

tags
​string[]

List of the secret's tags.

version_count
​integer · uint32

Number of versions for this secret.

description
​string | null

Updated description of the secret.

managed
​boolean

Returns true for secrets that are managed by another product.

protected
​boolean

Returns true for protected secrets that cannot be deleted.

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
path
​string

Path of the secret. Location of the secret in the directory structure.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

List of Scaleway resources that can access and manage the secret.

Enum values:
unknown_product
edge_services
s2s_vpn
deletion_requested_at
​string | null · date-time

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

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)

region
​string

Region of the secret.


Delete a secret

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

Delete a given secret specified by the region and secret_id parameters.

Delete a secret › 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)

Delete a secret › Responses

No data returned

Allow a product to use the secret

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

Allow a product to use the secret › 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)

Allow a product to use the secret › Request Body

product
​scaleway.secret_manager.v1beta1.Product · enum

ID of the product to add. See Product enum for description of values.

Enum values:
unknown_product
edge_services
s2s_vpn
Default: unknown_product

Allow a product to use the secret › Responses

No data returned

Enable secret protection

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

Enable secret protection for a given secret specified by the secret_id parameter. Enabling secret protection means that your secret can be read and modified, but it cannot be deleted.

Enable secret protection › 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 to enable secret protection for. (UUID format)

Enable secret protection › Request Body

Enable secret protection › Responses

200
id
​string

ID of the secret. (UUID format)

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

The SRN of the secret.

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

status
​scaleway.secret_manager.v1beta1.Secret.Status · enum

Current status of the secret.

  • ready: the secret can be read, modified and deleted.
  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
Enum values:
unknown_status
ready
locked
Default: unknown_status
created_at
​string | null · date-time

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

updated_at
​string | null · date-time

Last update of the secret. (RFC 3339 format)

tags
​string[]

List of the secret's tags.

version_count
​integer · uint32

Number of versions for this secret.

description
​string | null

Updated description of the secret.

managed
​boolean

Returns true for secrets that are managed by another product.

protected
​boolean

Returns true for protected secrets that cannot be deleted.

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
path
​string

Path of the secret. Location of the secret in the directory structure.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

List of Scaleway resources that can access and manage the secret.

Enum values:
unknown_product
edge_services
s2s_vpn
deletion_requested_at
​string | null · date-time

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

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)

region
​string

Region of the secret.


Restore a secret

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

Restore a secret and all its versions scheduled for deletion specified by the region and secret_id parameters.

Restore a secret › path Parameters

region
​string · enum · required

The region you want to target

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

(UUID format)

Restore a secret › Request Body

Restore a secret › Responses

200
id
​string

ID of the secret. (UUID format)

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

The SRN of the secret.

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

status
​scaleway.secret_manager.v1beta1.Secret.Status · enum

Current status of the secret.

  • ready: the secret can be read, modified and deleted.
  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
Enum values:
unknown_status
ready
locked
Default: unknown_status
created_at
​string | null · date-time

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

updated_at
​string | null · date-time

Last update of the secret. (RFC 3339 format)

tags
​string[]

List of the secret's tags.

version_count
​integer · uint32

Number of versions for this secret.

description
​string | null

Updated description of the secret.

managed
​boolean

Returns true for secrets that are managed by another product.

protected
​boolean

Returns true for protected secrets that cannot be deleted.

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
path
​string

Path of the secret. Location of the secret in the directory structure.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

List of Scaleway resources that can access and manage the secret.

Enum values:
unknown_product
edge_services
s2s_vpn
deletion_requested_at
​string | null · date-time

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

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)

region
​string

Region of the secret.


Disable secret protection

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

Disable secret protection for a given secret specified by the secret_id parameter. Disabling secret protection means that your secret can be read, modified and deleted.

Disable secret protection › 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 to disable secret protection for. (UUID format)

Disable secret protection › Request Body

Disable secret protection › Responses

200
id
​string

ID of the secret. (UUID format)

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

The SRN of the secret.

project_id
​string

ID of the Project containing the secret. (UUID format)

name
​string

Name of the secret.

status
​scaleway.secret_manager.v1beta1.Secret.Status · enum

Current status of the secret.

  • ready: the secret can be read, modified and deleted.
  • locked: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
Enum values:
unknown_status
ready
locked
Default: unknown_status
created_at
​string | null · date-time

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

updated_at
​string | null · date-time

Last update of the secret. (RFC 3339 format)

tags
​string[]

List of the secret's tags.

version_count
​integer · uint32

Number of versions for this secret.

description
​string | null

Updated description of the secret.

managed
​boolean

Returns true for secrets that are managed by another product.

protected
​boolean

Returns true for protected secrets that cannot be deleted.

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
path
​string

Path of the secret. Location of the secret in the directory structure.

Ephemeral policy of the secret. (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.

List of Scaleway resources that can access and manage the secret.

Enum values:
unknown_product
edge_services
s2s_vpn
deletion_requested_at
​string | null · date-time

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

key_id
​string | null

ID of the Scaleway Key Manager key. (Optional.) The Scaleway Key Manager key ID used to encrypt and decrypt secret versions. (UUID format)

region
​string

Region of the secret.


Restore a version

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

Restore a secret's version specified by the region, secret_id and revision parameters.

Restore 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

(UUID format)

revision
​string · required

Restore a version › Request Body

Restore 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.