--- title: "Retrieve Provider Secret" api: "GET /api/v1/providers/secrets/{id}" description: "Fetch metadata about a specific provider secret by its ID." --- Retrieve metadata about a specific provider secret. The actual secret values are never returned - only information about the secret. ## Path Parameters - `id` (required) - The UUID of the secret to retrieve ## Query Parameters ### Field Selection - `fields[provider-secrets]` - Specify which fields to return: `inserted_at`, `updated_at`, `name`, `secret_type`, `provider` ### Include Related Resources - `include` - Include related resources: `provider` ## Example Request ```bash curl -X GET "https://api.prowler.com/api/v1/providers/secrets/{id}?include=provider" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/vnd.api+json" ``` ## Response ### Success Response (200 OK) Returns secret metadata: ```json { "data": { "type": "provider-secrets", "id": "secret-uuid", "attributes": { "name": "Production AWS Role", "secret_type": "role", "inserted_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z" }, "relationships": { "provider": { "data": { "type": "providers", "id": "provider-uuid" } } } }, "included": [ { "type": "providers", "id": "provider-uuid", "attributes": { "provider": "aws", "uid": "123456789012", "alias": "Production AWS - US" } } ] } ``` ### Response Fields - `id` (UUID) - Unique identifier for the secret - `name` (string, nullable) - Descriptive name (3-100 characters) - `secret_type` (enum) - Type: `role`, `service_account`, or `static` - `inserted_at` (datetime, read-only) - When secret was created - `updated_at` (datetime, read-only) - Last modification time ### Error Responses **404 Not Found** - Secret does not exist ```json { "errors": [ { "status": "404", "title": "Not Found", "detail": "Secret not found" } ] } ``` Secret values are never returned via the API. If you need to update credentials, use the update endpoint with new secret data.