# Get Storage Credential

get ` https://app.mk.io/api/v1/projects/:project_name/media/storage/:storage_name/credentials/:credential_id`

Returns a single Storage Credential. Any secret data will be sanitized in the response.

RBAC Capability Required: `infra.storagetoken.get`

## Authentication

Authorization Bearer

Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Path parameters

| Parameter         | Type    | Required | Description                                     |
|-------------------|---------|----------|-------------------------------------------------|
| project_name      | string  | Yes      | Name of the project                             |
| storage_name      | string  | Yes      | Name of the storage                             |
| credential_id     | string  | Yes      | Format: uuid                                   |

## Response

### 200 A single Storage Credential.

#### metadata (object) [SasTokenMetadataSchema](https://docs.mediakind.com/api-reference/media-api/schemas/sastokenmetadataschema) Required

Metadata about the credential.

| Property             | Type      | Required  | Description                                         |
|----------------------|-----------|-----------|-----------------------------------------------------|
| created              | string    | No        | Format: date-time The time when the resource was created|
| createdBy            | string    | No        | Format: uuid ID of the user who created the resource|
| createdByEmail       | string    | No        | Email of the user who created the resource          |
| id                   | string    | Yes       | Format: uuid The ID of the resource                 |
| updated              | string    | No        | Format: date-time The time when the resource was last updated|
| updatedBy           | string    | No        | Format: uuid ID of the user who last updated the resource|
| updatedByEmail       | string    | No        | Email of the user who last updated the resource     |
| spec                 | object    | Yes       | The specification of the credential.                |

#### spec Variants

- **Microsoft.Storage**  
    - **credential (object) [AzureCredentialRead](https://docs.mediakind.com/api-reference/media-api/schemas/azurecredentialread) Required**  
        | Property         | Type      | Required  | Description                                         |
        |------------------|-----------|-----------|-----------------------------------------------------|
        | sasToken         | string    | Yes       | SAS Token for Azure Storage Account, including leading ?|
        | signedExpiry     | string    | Yes       | Format: date-time The expiry time of the token.   |
        | signedStart      | string or null | Yes    | Format: date-time The start time of the token.    |
        | type             | enum or null | Yes     | Allowed values: Microsoft.Storage, AWS.S3, Google.Storage|

- **AWS.S3**
    - **credential (object) [AWSCredential](https://docs.mediakind.com/api-reference/media-api/schemas/awscredential) Required**
        | Property          | Type      | Required  | Description                                         |
        |-------------------|-----------|-----------|-----------------------------------------------------|
        | accessKeyId       | string    | Yes       | Pattern: ^A[KS]IA[0-9A-Z]{16}$ The access key ID for the bucket. |
        | secretAccessKey    | string    | Yes       | Pattern: ^[A-Za-z0-9+/=]{40}$ The secret access key for the bucket. |
        | type              | enum or null | Yes     | Allowed values: Microsoft.Storage, AWS.S3, Google.Storage|

- **Google.Storage**
    - **credential (object) [GoogleCredential](https://docs.mediakind.com/api-reference/media-api/schemas/googlecredential) Required**
        | Property          | Type      | Required  | Description                                         |
        |-------------------|-----------|-----------|-----------------------------------------------------|
        | gacmap            | map from strings to string | Yes  | Google Application Credentials in JSON format.     |

## Errors

### 400 Bad Request

| Property    | Type      | Required  | Description                                         |
|-------------|-----------|-----------|-----------------------------------------------------|
| error (object) [ErrorDetail](https://docs.mediakind.com/api-reference/media-api/schemas/errordetail) Required | Pertinent information about the error |
| code        | string    | Yes       | The error code.                                   |
| detail      | string    | Yes       | The error message.                               |
| extraDetail | map from strings to any | No      | Extra information regarding this error.        |
| ref         | string    | Yes       | A reference to the request that caused the error.  |
| status      | integer   | Yes       | The HTTP status code                               |

### 401 Unauthorized

... (Similar structure for other error codes like 403, 404, etc.)
