Xem chi tiết image
/v2/images/{image_id}Xem chi tiết image theo ID được chỉ định.
Request
Tham số path
image_idstringbắt buộcUUID của image.
Request mẫu
Dùng curl
curl -ks -H 'Content-Type: application/json' \
-H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9292/v2/images/9775d86a-8bf8-4200-a4b5-d892e931e8f6
HTTP request
GET https://api.vietnix.cloud:9292/v2/images/{image_id}
Response
Tham số
checksumstringbắt buộcHash dùng cho dữ liệu image. Có thể là null.
container_formatenumbắt buộcĐịnh dạng container của image (ví dụ ami, ari, aki, bare, ovf, ova, docker). Có thể là null.
created_atstringbắt buộcNgày giờ tạo tài nguyên (ISO 8601).
disk_formatenumbắt buộcĐịnh dạng disk (ví dụ qcow2, raw, vmdk, vhd). Có thể là null.
filestringbắt buộcURL của file image máy ảo (đường dẫn tương đối).
idstringbắt buộcUUID của image.
min_diskintegerbắt buộcDung lượng disk tối thiểu (GB) cần để boot image. Có thể là null.
min_ramintegerbắt buộcDung lượng RAM tối thiểu (MB) cần để boot image. Có thể là null.
namestringbắt buộcTên image. Có thể là null.
os_hash_algostringbắt buộcThuật toán tính hash bảo mật cho image (mới trong 2.7). Có thể là null.
os_hash_valuestringbắt buộcHexdigest của hash bảo mật, tính bằng os_hash_algo (mới trong 2.7). Có thể là null.
os_hiddenbooleanbắt buộcNếu true, image bị ẩn khỏi danh sách image mặc định (mới trong 2.7).
ownerstringbắt buộcID của chủ sở hữu (project/tenant ID). Có thể là null.
protectedbooleanbắt buộcNếu true, image không thể bị xoá.
schemastringbắt buộcURL của schema image.
selfstringbắt buộcURL của image máy ảo.
sizeintegerbắt buộcKích thước dữ liệu image, tính bằng byte. Có thể là null.
statusstringbắt buộcTrạng thái image (ví dụ active).
tagsarraybắt buộcDanh sách tag của image, có thể rỗng.
updated_atstringbắt buộcNgày giờ cập nhật tài nguyên (ISO 8601) hoặc null.
virtual_sizeintegerbắt buộcKích thước ảo của image. Có thể là null.
visibilitystringbắt buộcMức hiển thị của image (ví dụ public, private, shared).
direct_urlstringURL trực tiếp tới file image trong external store. Chỉ có khi show_image_direct_url được bật trên Image service.
locationsarrayMảng object vị trí (mỗi object có url và metadata) khi show_multiple_locations được bật trên Image service.
Mã trạng thái
Thành công
| Mã | Mô tả |
|---|---|
| 200 - OK | Request thành công. |
Lỗi
| Mã | Mô tả |
|---|---|
| 400 - Bad Request | Nội dung request không hợp lệ. |
| 401 - Unauthorized | Cần xác thực trước khi gửi request. |
| 403 - Forbidden | Policy không cho phép user hiện tại thực hiện thao tác này. |
| 404 - Not Found | Không tìm thấy tài nguyên. |
Response mẫu
Response body
{
"image_validated": "yes",
"name": "alpine",
"disk_format": "qcow2",
"container_format": "bare",
"visibility": "shared",
"size": 120061952,
"virtual_size": 127926272,
"status": "active",
"checksum": "7625f1f6a355d3a042a1f39b79ab3513",
"protected": false,
"min_ram": 0,
"min_disk": 1,
"owner": "f33507157a634f1cac71e06a70fb558e",
"os_hidden": false,
"os_hash_algo": "sha512",
"os_hash_value": "d0eec0ffc7c1c60dd1c3f42a653086825b3e4ddcf07f49475c31e35da53c5e3c0df7e962c6d570591c3d5e2f8587aef54e1b40a016d944bca3cbaedec8f7f213",
"id": "9775d86a-8bf8-4200-a4b5-d892e931e8f6",
"created_at": "2025-10-22T08:40:44Z",
"updated_at": "2025-10-22T08:54:14Z",
"direct_url": "file:///mnt/vstorage/vols/datastores/glance/9775d86a-8bf8-4200-a4b5-d892e931e8f6",
"tags": [],
"self": "/v2/images/9775d86a-8bf8-4200-a4b5-d892e931e8f6",
"file": "/v2/images/9775d86a-8bf8-4200-a4b5-d892e931e8f6/file",
"schema": "/v2/schemas/image"
}