# List Storage Credentials

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

Returns the list of Storage Credentials for this Storage instance. 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

- **project_name**: string (Required)
- **storage_name**: string (Required)

## Response

**200** A list of Storage Credentials

- **@odata.nextLink**: string (Optional) - @odata.nextLink URL if the page length and number of items match.
- **supplemental**: object ([ListResponseSupplementalSchema](https://docs.mediakind.com/api-reference/media-api/schemas/listresponsesupplementalschema)) (Required)
  - **count**: integer (Required) - Number of items returned
  - **kind**: string (Required) - Type of items in the list
  - **operation**: string (Required) - Operation type. Should always say 'list'
  - **pagination**: object ([PaginationInfoSchema](https://docs.mediakind.com/api-reference/media-api/schemas/paginationinfoschema)) (Required)
    - **end**: integer (Required) - Position of the last item in the list
    - **records**: integer (Required) - Total number of items returned in the list
    - **start**: integer (Required) - Position of the first item in the list
    - **total**: integer (Required) - Total number of items in the project
  - **subscription**: object ([ProjectInfoSchema](https://docs.mediakind.com/api-reference/media-api/schemas/projectinfoschema)) (Optional)
    - **id**: string (Required) - Project ID
    - **name**: string (Required) - Project name
  - **value**: list of objects ([CredentialSchemaGet](https://docs.mediakind.com/api-reference/media-api/schemas/credentialschemaget)) (Required) - A list of credentials
    - **metadata**: object ([SasTokenMetadataSchema](https://docs.mediakind.com/api-reference/media-api/schemas/sastokenmetadataschema)) (Required)
      - **created**: string (Optional, format: date-time) - The time when the resource was created
      - **createdBy**: string (Optional, format: uuid) - ID of the user who created the resource
      - **createdByEmail**: string (Optional) - Email of the user who created the resource
      - **id**: string (Required, format: uuid) - The ID of the resource
      - **updated**: string (Optional, format: date-time) - The time when the resource was last updated
      - **updatedBy**: string (Optional, format: uuid) - ID of the user who last updated the resource
      - **updatedByEmail**: string (Optional) - Email of the user who last updated the resource
      - **spec**: object (Required) - The specification of the credential.
        - Select one variant discriminated by `type`:
          - **Microsoft.Storage**: object ([AzureCredentialSpecRead](https://docs.mediakind.com/api-reference/media-api/schemas/azurecredentialspecread))
            - **credential**: object ([AzureCredentialRead](https://docs.mediakind.com/api-reference/media-api/schemas/azurecredentialread)) (Required) - The credential for the Azure Storage Account
              - **sasToken**: string (Required, pattern: ^\\?([a-z]+=[^&]+)(&[a-z]+=[^&]+)+$) - SAS Token for Azure Storage Account, including leading ?
              - **signedExpiry**: string (Required, format: date-time) - The expiry time of the token.
              - **signedStart**: string or null (Required, format: date-time) - The start time of the token.
              - **type**: enum or null (Required) - The type of the credential. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage
          - **AWS.S3**: object ([AWSCredentialSpec](https://docs.mediakind.com/api-reference/media-api/schemas/awscredentialspec))
            - **credential**: object ([AWSCredential](https://docs.mediakind.com/api-reference/media-api/schemas/awscredential)) (Required) - The credential for the AWS S3 bucket.
              - **accessKeyId**: string (Required, pattern: ^A[KS]IA[0-9A-Z]{16}$) - The access key ID for the bucket.
              - **secretAccessKey**: string (Required, pattern: ^[A-Za-z0-9+/=]{40}$) - The secret access key for the bucket.
              - **type**: enum or null (Required) - The type of the credential. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage
          - **Google.Storage**: object ([GoogleCredentialSpec](https://docs.mediakind.com/api-reference/media-api/schemas/googlecredentialspec))
            - **credential**: object ([GoogleCredential](https://docs.mediakind.com/api-reference/media-api/schemas/googlecredential)) (Required) - The credential for the Google Storage bucket.
              - **gacm**: map from strings to string (Required) - Google Application Credentials in JSON format. You can generate this from the command line with `gcloud iam service-accounts keys create key.json --iam-account=<service_account>@<project>.iam.gserviceaccount.com` or download it from the GCP console.
              - **type**: enum or null (Required) - The type of the credential. Allowed values: Microsoft.Storage, AWS.S3, Google.Storage

## Errors

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

- **401 Unauthorized**
  - Similar structure as above.

- **403 Forbidden**
  - Similar structure as above.

- **404 Not Found**
  - Similar structure as above.

- **429 Too Many Requests**
  - Similar structure as above.

- **500 Internal Server Error**
  - Similar structure as above.
