get storage credential.md

Get Storage Credential

Media API · Storage

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

Path parameters

Name Type Required Description
project_name string Yes
storage_name string Yes
credential_id string Yes format: uuid

Example request

curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/media/storage/{storage_name}/credentials/{credential_id}" \
  -H "Authorization: Bearer <token>"

Responses

200 — A single Storage Credential.

Example:

{
  "metadata": {
    "created": "2024-01-01T00:00:00Z",
    "createdBy": "00000000-0000-0000-0000-000000000000",
    "createdByEmail": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "updated": "2024-01-01T00:00:00Z",
    "updatedBy": "00000000-0000-0000-0000-000000000000",
    "updatedByEmail": "string"
  },
  "spec": {
    "type": "Microsoft.Storage",
    "credential": {
      "sasToken": "?sv=2022-11-02&ss=bfqt&srt=co&sp=rwdlacupiyx&se=2024-11-12T00:05:04Z&st=2024-11-11T16:05:04Z&spr=https&sig=<redacted>",
      "signedExpiry": "2024-11-12T00:05:04Z",
      "signedStart": "2024-11-11T16:05:04Z"
    }
  }
}

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

Source spec: media-api · operationId: [get]_/api/v1/projects/{project_name}/media/storage/{storage_name}/credentials/{credential_id}