---
title: "Get a secret"
method: GET
path: "/v1/apps/{appId}/secrets/{secretName}"
tags: ["Secrets"]
deprecated: true
---

# Get a secret

`GET /v1/apps/{appId}/secrets/{secretName}`

## Request

- Base URL: `https://api.spice.ai`
- URL: `https://api.spice.ai/v1/apps/{appId}/secrets/{secretName}`
- Auth: HTTP bearer

> **Deprecated.**

Legacy alias of `/v1/projects/{projectId}/secrets/{secretName}`. Projects were previously called apps. Returns a specific secret by name. The secret value is always masked.

## Path parameters

- `appId` integer, required
- `secretName` string, required

## Headers

- `X-Org-Name` string

## Response `200`

Secret details (value is masked)

- Secret
  - `id` integer: Unique identifier for the secret
  - `name` string: Name of the secret
  - `value` string: Always masked with asterisks
  - `created_at` string, date-time: Timestamp when the secret was created
  - `updated_at` string, date-time: Timestamp when the secret was last updated

## Other responses

- `400`: Invalid project ID
- `401`: Unauthorized
- `403`: Insufficient scope or admin or owner role required
- `404`: Project or secret not found
- `500`: Internal server error

---

[API](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api.md) - [All operations](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/revisions/5f3b75dd847d?raw)
