Liệt kê job
Mô tả: Truy vấn danh sách các job¶
Phương thức GET¶
URL: https://vms-api.swiftfederation.com/v7.4.0/job
Yêu cầu (Request)¶
- Header
Content-Type
:application/json; charset=UTF-8
-
Authorization
:Bearer <access_token>
-
Tham số truy vấn (Query Parameters)
Trường | Bắt buộc | Kiểu dữ liệu | Mô tả |
---|---|---|---|
file_name |
Không | String | Tên của stream cần lọc |
status |
Không | String | Trạng thái job: initial , pulling , pulled , transcoding , transcoded , distributing , distributed , failed |
page_offset |
Không | int | Vị trí bắt đầu của trang. Mặc định là 0 |
page_length |
Không | int | Số lượng phần tử mỗi trang. Mặc định là 20 , tối thiểu 10 , tối đa 100 |
Phản hồi (Response)¶
- Header
-
Theo chuẩn HTTP
-
Body
Trường | Bắt buộc | Kiểu dữ liệu | Mô tả |
---|---|---|---|
request_id |
Có | String | Mã định danh duy nhất cho yêu cầu |
jobs |
Có | Array | Danh sách job, tham khảo Job Object |
Ví dụ¶
Yêu cầu¶
GET https://vms-api.swiftfederation.com/v7.4.0/job
Content-Type: application/json; charset=UTF-8
Authorization: Bearer <token>
Phản hồi¶
{
"request_id": "2653a61b4d0044d0af0a1a6d6840afad.21.16346340371050001",
"jobs": [
{
"id": 24780,
"file_name": "s1.mp4",
"status": "Distributed",
"started": 1634633383605,
"ended": 1634633403779,
"origin": [
{
"protocol": "hls",
"manifest": "20211019/24780/1/3/820/manifest.m3u8",
"playlist": [
{ "preset": "Transmuxing_only", "uri": "20211019/24780/1/3/820/951/playlist.m3u8" },
{ "preset": "640x360,300kbps", "uri": "20211019/24780/1/3/820/965/playlist.m3u8" },
{ "preset": "960x540,500kbps", "uri": "20211019/24780/1/3/820/966/playlist.m3u8" },
{ "preset": "Audio_only", "uri": "20211019/24780/1/3/820/997/audio_only/playlist.m3u8" }
],
"drm": "none"
},
{
"protocol": "hls",
"manifest": "20211019/24780/1/3/918/manifest.m3u8",
"playlist": [
{ "preset": "360p (640x360,300kbps)", "uri": "20211019/24780/1/3/918/1020/playlist.m3u8" }
],
"drm": "none"
}
]
},
{
"id": 24779,
"file_name": "s1.mp4",
"status": "Distributed",
"started": 1634633284502,
"ended": 1634633303869,
"origin": [
{
"protocol": "hls",
"manifest": "20211019/24779/1/3/918/manifest.m3u8",
"playlist": [
{ "preset": "360p (640x360,300kbps)", "uri": "20211019/24779/1/3/918/1020/playlist.m3u8" }
],
"drm": "none"
}
]
}
]
}
Giải thích thêm:
status
: Trạng thái hiện tại của job (ví dụ:Distributed
nghĩa là đã hoàn tất phân phối).origin
: Danh sách các luồng đầu ra (output) theo giao thức, ví dụ như HLS.manifest
: Đường dẫn tới file manifest chính của HLS.playlist
: Danh sách các phiên bản được mã hóa ở các chất lượng khác nhau.drm
: Loại mã hóa nội dung (DRM) áp dụng cho luồng đó.