Get public info

Chọn serving domain

Gọi Get domains và dùng một hostname đã map tới namespace, có DNS/TLS hoạt động. API v0 xác định namespace từ HTTP Host, không nhận namespace ở path và không yêu cầu Application Credential hoặc Namespace secret key trong request này. Không dùng API hostname chung để thay thế domain serving.

Request

Giữ đuôi file gốc rồi thêm .json: video.mp4 thành video.mp4.json. File trong thư mục videos/a.mp4 dùng /videos/a.mp4.json; URL-transcode ký tự đặc biệt.

curl --request GET \
  'https://<serving-domain>/videos/check_preview_profile1.mp4.json'

Response

HTTP 200:

{
  "namespace": "<namespace>",
  "video": "https://<serving-domain>/videos/check_preview_profile1.mp4",
  "mpd": "",
  "hls": "https://<serving-domain>/videos/check_preview_profile1.mp4/master.m3u8?v=<version>",
  "mhls": "https://<serving-domain>/videos/check_preview_profile1.mp4/mobile.m3u8?v=<version>",
  "mp4_qualities": [
    "https://<serving-domain>/videos/.check_preview_profile1.mp4.previewp.mp4",
    "https://<serving-domain>/videos/.check_preview_profile1.mp4.360p.mp4"
  ],
  "mp3": "",
  "thumb_url": "https://<serving-domain>/.v-thumb/videos/check_preview_profile1.mp4.jpg",
  "converted": 1
}

Response minh họa file gốc dùng profile version 2 đã có preview và 360p (ví dụ sau khi chạy thêm job transcode standard); thumb_url là URL thumbnail do MPS tạo. Dùng chính URL trả về, giữ query string (kể cả v), không tự ghép tên artifact.

Trường Cách dùng
hls, mhls HLS master/mobile tùy delivery của namespace. On-the-fly có thể trả đường dẫn /.hls/... thay vì dạng trên.
mp4_qualities Mảng chuỗi URL, không phải object theo ID. Với profile version 2, URL có dạng https://<serving-domain>/<folder>/.<filename>.<suffix>.mp4: <suffix> là <profile-id>p của profile.
video URL file video gốc.
mpd, mp3 URL DASH/audio khi có; có thể rỗng.
thumb_url Thumbnail theo dữ liệu hiện có; kiểu/giá trị rỗng có thể khác theo phiên bản metadata.
converted Cờ tương thích legacy 0/1; không chứng minh toàn bộ rendition yêu cầu đã hoàn tất.

Lỗi v0

  • HTTP 400, get_video_json_error_001: hostname không map được namespace.
  • HTTP 400, get_video_json_error_002: chưa có thông tin video hoặc file không tồn tại; không mặc định coi là 404.
  • HTTP 400, get_video_json_error_003: không khởi tạo/đọc được file theo path cung cấp.

Lỗi legacy có dạng {"get_video_json_error_002":"Missing video info."}, không dùng response envelope của API v1.