get file access information.md
Get file access information
Media API · Assets
POST https://app.mk.io/api/v1/projects/{project_name}/media/assets/{asset_name}/getFileAccessInfo
This endpoint returns the information needed to access files within your asset.
The storage account containing the asset must be configured with a valid SAS token.
The response includes
storageAccountName: the storage account name,containerName: the name of the container within the storage account,jwt: a token to be passed along with your request,url: the URL to access the container.subpath: the subpath to the location of the asset within the container.
Please see our online documentation for examples of how to use these.
RBAC Capability Required: ams.asset.create or ams.asset.update
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_name |
string | Yes | — |
asset_name |
string | Yes | — |
Example request
curl -X POST "https://app.mk.io/api/v1/projects/{project_name}/media/assets/{asset_name}/getFileAccessInfo" \
-H "Authorization: Bearer <token>"
Responses
200 — Access Information
containerName· string · Required — The name of the container within the storage account.jwt· string · Required — A JWT token to authenticate the request.storageAccountName· string · Required — The name of the storage account.subPath· string · Optional · 0-256 characters — Optional subpath for instances where your asset is not in the root of the container.url· string · Required — The URL to use to access the container.
Example:
{
"containerName": "string",
"jwt": "string",
"storageAccountName": "string",
"subPath": "path/to/asset",
"url": "string"
}
400 — Bad Request
error· object · Required — Pertinent information about the errorcode· string · Required — The error code.detail· string · Required — The error message.extraDetail· map from strings to any · Optional — Extra information regarding this error.[any key]· any — map of additional properties
ref· string · Required — A reference to the request that caused the error.status· integer · Required — The HTTP status code
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: [post]_/api/v1/projects/{project_name}/media/assets/{asset_name}/getFileAccessInfo