list url paths.md
List URL paths
Media API · Streaming Locators
POST https://app.mk.io/api/v1/projects/{project_name}/media/streamingLocators/{locator_name}/listPaths
ListPaths returns the set of valid streaming paths for a given Streaming Locator. A distinct set of paths is returned for each type of DRM configured, per the 'EnabledProtocols' property of the streaming policy.
RBAC Capability Required: ams.streaminglocator.create
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_name |
string | Yes | — |
locator_name |
string | Yes | — |
Request body
Content type: application/json
urlStyle· enum · Optional · Defaults to AMS — The style of URL associated to the streaming endpoint. Default is 'AMS'.- Allowed values:
AMS,Aquila,Unified
- Allowed values:
Example request
curl -X POST "https://app.mk.io/api/v1/projects/{project_name}/media/streamingLocators/{locator_name}/listPaths" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"urlStyle": "AMS"
}'
Responses
200 — Streaming locator paths returned.
downloadPaths· list of strings · Required — The download paths for the locator.- Array items (string):
drm· map from strings to object · Required — The license acquisition URLs for configured DRM types.[any key]· object — map of additional propertiescertificateUrl· string · Optional — The URL for obtaining the streaming certificate.licenseAcquisitionUrl· string · Required — The license acquisition URL for the DRM.
streamingPaths· list of objects · Required — The streaming paths for the locator.- Array items (object):
encryptionScheme· enum · Required — The encryption scheme used for the path.- Allowed values:
NoEncryption,EnvelopeEncryption,CommonEncryptionCenc,CommonEncryptionCbcs
- Allowed values:
paths· list of strings · Required — The paths for the locator.- Array items (string):
streamingProtocol· enum · Required — The streaming protocol used for the path.- Allowed values:
Hls,Dash,Download,SmoothStreaming
- Allowed values:
- Array items (object):
Example:
{
"downloadPaths": [
"string"
],
"drm": {
"key": {
"certificateUrl": "string",
"licenseAcquisitionUrl": "string"
}
},
"streamingPaths": [
{
"encryptionScheme": "NoEncryption",
"paths": [
"string"
],
"streamingProtocol": "Hls"
}
]
}
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
}