TensorDock

API Documentation

Version 2.0

Secrets Management

Securely store and manage SSH keys and sensitive configuration

List Secrets
Retrieve all secrets for your organization
GET/api/v2/secrets

Response

{
  "data": {
    "secrets": [
      {
        "type": "GENERIC",
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "API Key"
      },
      {
        "type": "SSHKEY",
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "name": "Production SSH Key"
      }
    ]
  }
}
Create Secret
Create a new secret in your organization
POST/api/v2/secrets

Request Body

{
  "data": {
    "type": "secret",
    "attributes": {
      "name": "string",
      "value": "string",
      "type": "SSHKEY"
    }
  }
}

Response

{
  "data": {
    "type": "secret",
    "id": "string",
    "name": "string"
  }
}
Get Secret
Retrieve a specific secret by ID. Note: For secrets of type 'SECRET', the value will not be returned.
GET/api/v2/secrets/{id}

Parameters

  • id - The ID of the secret to retrieve

Response

{
  "data": {
    "type": "secret",
    "id": "string",
    "name": "string",
    "value": "string (not returned for type 'SECRET')"
  }
}
Delete Secret
Delete a secret from your organization
DELETE/api/v2/secrets/{id}

Parameters

  • id - The ID of the secret to delete

Response

{
  "data": {
    "type": "success",
    "message": "Secret deleted successfully"
  }
}