레퍼런스 · 재생목록
재생목록 상세 조회
GET
/v1/playlists/{uid}
uid로 재생목록 하나를 조회합니다. 재생 순서대로 정렬된 항목과 이 재생목록을 사용하는 TV도 함께 반환합니다.
경로 매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
uid | string | 재생목록의 uid. |
응답 필드
uidstring- 재생목록 식별자.
namestring- 재생목록 이름.
organizationobject- 재생목록이 속한 회사:
uid및name. total_timeinteger- 재생목록의 총 재생 시간(초).
total_time_is_approximateboolean- 총 재생 시간이 추정값이면
true. itemsarray- 재생목록의 항목(재생 순서대로).
items[].positioninteger- 재생목록에서 항목의 위치.
items[].typestring- 파일이면
file, 엔터테인먼트 콘텐츠이면entertainment. 다른 유형이 나타날 수도 있습니다. items[].uidstring- 파일 또는 엔터테인먼트 콘텐츠의 식별자.
items[].display_timeinteger | null- 항목에 설정된 표시 시간(초). 설정되지 않았으면
null. items[].fileobject | null- 파일 정보로, ‘파일 목록 조회’와 같은 필드를 가집니다. 항목이 파일이 아니거나 사용자가 해당 회사의 파일을 볼 수 없으면
null. tvsarray- 이 재생목록을 사용하는 TV(
uid,name,organization). 사용자가 볼 수 있는 TV만 표시됩니다.
발생 가능한 오류
- 404
not_found엔드포인트가 존재하지 않거나, 항목이 존재하지 않거나, 사용자가 볼 수 없는 회사의 항목입니다. - 키 및 요청 한도 관련 오류는 모든 엔드포인트에 적용됩니다. 모든 오류 보기
요청
curl "https://api.on-cloud.live/v1/playlists/e4da3b7fbbce2345d7772b0674a318d5" \
-H "X-API-Key: $API_KEY"<?php
$ch = curl_init('https://api.on-cloud.live/v1/playlists/e4da3b7fbbce2345d7772b0674a318d5');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('API_KEY')],
]);
$response = json_decode(curl_exec($ch), true);const res = await fetch('https://api.on-cloud.live/v1/playlists/e4da3b7fbbce2345d7772b0674a318d5', {
headers: { 'X-API-Key': process.env.API_KEY }
});
const { data } = await res.json();응답200
{
"data": {
"uid": "e4da3b7fbbce2345d7772b0674a318d5",
"name": "Lista principal",
"organization": {
"uid": "8f14e45fceea167a5a36dedd4bea2543",
"name": "Loja Centro"
},
"total_time": 85,
"total_time_is_approximate": true,
"items": [
{
"position": 1,
"type": "file",
"uid": "a87ff679a2f3e71d9181a67b7542122c",
"display_time": null,
"file": {
"uid": "a87ff679a2f3e71d9181a67b7542122c",
"name": "Promoção de verão",
"type": "video",
"duration": 30,
"archived": false,
"organization": {
"uid": "8f14e45fceea167a5a36dedd4bea2543",
"name": "Loja Centro"
}
}
},
{
"position": 2,
"type": "entertainment",
"uid": "noticias",
"display_time": 15,
"file": null
},
{
"position": 3,
"type": "file",
"uid": "6512bd43d9caa6e02c990b0a82652dca",
"display_time": 10,
"file": {
"uid": "6512bd43d9caa6e02c990b0a82652dca",
"name": "Cardápio do dia",
"type": "image",
"duration": 10,
"archived": false,
"organization": {
"uid": "8f14e45fceea167a5a36dedd4bea2543",
"name": "Loja Centro"
}
}
}
],
"tvs": [
{
"uid": "c98cb8f9cc62887d1f6cf5693df9219c",
"name": "Recepção",
"organization": {
"uid": "8f14e45fceea167a5a36dedd4bea2543",
"name": "Loja Centro"
}
},
{
"uid": "45c48cce2e2d7fbdea1afc51c7c6ad26",
"name": "Vitrine",
"organization": {
"uid": "8f14e45fceea167a5a36dedd4bea2543",
"name": "Loja Centro"
}
}
]
}
}존재하지 않거나 접근 권한이 없는 항목404
{
"error": {
"code": "not_found",
"message": "Item not found or you do not have access to it."
}
}