To view a list of media files, use the following request:
1
2
| GET/catalogs/:id/media.xml
GET/catalogs/:id/media.json
|
XML Request Example
1
| curl -i -X GET -u user:userpass --url http://onapp.test/catalogs/12/media.xml -H 'Accept: application/xml' -H 'Content-type: application/xml'
|
JSON Request Example
1
| curl -i -X GET -u user:userpass --url http://onapp.test/catalogs/12/media.json -H 'Accept: application/json' -H 'Content-type: application/json'
|
XML Output Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <vcloud_media type="array">
<vcloud_media>
<status>1</status>
<user_id>null</user_id>
<description>test</description>
<data_store_id>2</data_store_id>
<image_type>iso</image_type>
<created_at>2016-02-04T14:19:26+02:00</created_at>
<updated_at>2016-02-04T14:19:26+02:00</updated_at>
<label>Kostya000</label>
<catalog_item_id>3</catalog_item_id>
<identifier>6677d99d-a3af-40d0-aa4a-907b41ab2559</identifier>
<vdc_id>1</vdc_id>
<id>1</id>
<size>414187520</size>
</vcloud_media>
<vcloud_media>...</vcloud_media>
</vcloud_media>
|
Where:
status - the status of media file
user_id - owner ID
description - the media file description
data_store_id - the ID of the data store to which the media file is assigned
image_type - the type of the media file
created_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
updated_at - the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format
label - the name of the media file
catalog_item_id - ID of the catalog
identifier - the identifier of the media file
vdc_id - the ID of the resource pool
id - the ID of the media file
size - the size of media file