[ Web Proxy ]
URL:
Viewing: https://docs.digitalocean.com/reference/paperspace/gradient/commands/secrets/ [Back]  [Original]

secrets | DigitalOcean Documentation

For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).

secrets

Last verified 17 Jun 2025

Copy page as Markdown View page as Markdown
Warning: Deprecated

As of 15 July 2024, Gradient API endpoints are deprecated and no longer available for Paperspace users.

set

Set secret

Arguments

cluster, project, team

Examples

CLI
gradient secrets set project \
  --id "prjpkflqz" \
  --name "NewKey" \
  --value "NewValue"
cURL
curl -X PUT 'https://api.paperspace.io/projects/secrets/NewKey?projectId=prjpkflqz' \
-H 'x-api-key: d44808a2785d6a...' \
-H 'Content-Type: application/json' \
--data-raw '{
    "value": "NewValue"
}'
Python
from gradient import SecretsClient

api_key='d44808a2785d6a...'

secrets_client = SecretsClient(api_key)

print(secrets_client.set(
    entity='project',
    entity_id='prjpkflqz',
    name='NewKey',
    value='NewValue'
))

Options

Name Type Attributes Description
--id string required Entity ID
--name string required Secret name
--value string required Secret value
--apiKey string optional API key to use this time only
--optionsFile string optional Path to YAML with predefined options
--createOptionsFile string optional Generate template options file

Response

CLI
Set project secret 'NewKey'
cURL
Python
None

list

List secrets

Arguments

cluster, project, team

Examples

CLI
gradient secrets list project \
  --id "prjpkflqz"
cURL
Python
from gradient import SecretsClient

api_key='d44808a2785d6a...'

secrets_client = SecretsClient(api_key)

print(secrets_client.list(
    entity='project',
    entity_id='prjpkflqz'
))

Options

Name Type Attributes Description
--id string required Entity ID
--apiKey string optional API key to use this time only
--optionsFile string optional Path to YAML with predefined options
--createOptionsFile string optional Generate template options file

Response

CLI
+--------+
| Name   |
+--------+
| NewKey |
+--------+
cURL
[{ "name": "NewKey" }]
Python
[Secret(name='NewKey')]

delete

Delete secret

Arguments

cluster, project, team

Examples

CLI
gradient secrets delete project \
  --id "prjpkflqz" \
  --name "NewKey"
cURL
curl -X DELETE 'https://api.paperspace.io/projects/secrets/NewKey?projectId=prjpkflqz' \
-H 'x-api-key: d44808a2785d6a...'
Python
from gradient import SecretsClient

api_key='d44808a2785d6a...'

secrets_client = SecretsClient(api_key)

print(secrets_client.delete(
    entity='project',
    entity_id='prjpkflqz',
    name='NewKey'
))

Options

Name Type Attributes Description
--id string required Entity ID
--name string required Secret name
--apiKey string optional API key to use this time only
--optionsFile string optional Path to YAML with predefined options
--createOptionsFile string optional Generate template options file

Response

CLI
Deleted project secret 'NewKey'
cURL
Python
None

In this article...


We can't find any results for your search.

Try using different keywords or simplifying your search terms.


Web Proxy Viewer  |  New URL  |  Original Page