GET /api/media 200 { "total": 6, "subtotal": 6, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "path": "http://mirror.centos.org/centos/6.0/os/$arch", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 980190962, "name": "CentOS 5.4" }, { "path": "http://firmware.fake-huawei.com", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 32055736, "name": "Huawei VRP 5" }, { "path": "http://download.opensuse.org/distribution/$version/repo/oss", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 750842046, "name": "OpenSUSE" }, { "path": "http://brsla01/vol/solgi_5.10/sol$minor_$release_$arch", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 442321401, "name": "Solaris 10" }, { "path": "http://sg.archive.ubuntu.com", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 1011586618, "name": "Ubuntu Mirror" }, { "path": "http://nothing.intersting.com", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 338446587, "name": "unused" } ] }
Имя параметра | Описание |
---|---|
operatingsystem_id необязательно |
Код операционной системы Validations:
|
location_id необязательно |
Ограничить местоположением Validations:
|
organization_id необязательно |
Ограничить организацией Validations:
|
search необязательно |
отфильтровать результаты Validations:
|
order необязательно |
Sort field and order, eg. ‘id DESC’ Validations:
|
page необязательно |
Номер страницы, начиная с 1 Validations:
|
per_page необязательно |
Число элементов на странице Validations:
|
Field name | Тип | Possible values |
---|---|---|
family | string | |
location | string | |
location_id | integer | |
name | string | |
organization | string | |
organization_id | integer | |
path | string |
GET /api/media/980190962-CentOS%205-4 200 { "path": "http://mirror.centos.org/centos/6.0/os/$arch", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:17 UTC", "id": 980190962, "name": "CentOS 5.4", "operatingsystems": [ { "id": 309172073, "name": "centos", "title": "centos 5.3" }, { "id": 1073012828, "name": "Redhat", "title": "RHEL 6.1" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Имя параметра | Описание |
---|---|
location_id необязательно |
Set the current location context for the request Validations:
|
organization_id необязательно |
Set the current organization context for the request Validations:
|
id обязательно |
Validations:
|
POST /api/media { "medium": { "name": "new medium", "path": "http://www.newmedium.com/", "organization_ids": [ 114267492 ], "os_family": "AIX" } } 201 { "path": "http://www.newmedium.com/", "os_family": "AIX", "created_at": "2019-11-07 08:32:25 UTC", "updated_at": "2019-11-07 08:32:25 UTC", "id": 1011586624, "name": "new medium", "operatingsystems": [], "locations": [], "organizations": [ { "id": 114267492, "name": "Empty Organization", "title": "Empty Organization", "description": null } ] }
Имя параметра | Описание |
---|---|
location_id необязательно |
Set the current location context for the request Validations:
|
organization_id необязательно |
Set the current organization context for the request Validations:
|
medium обязательно |
Validations:
|
medium[name] обязательно |
Имя носителя Validations:
|
medium[path] обязательно |
The path to the medium, can be a URL or a valid NFS server (exclusive of the architecture). for example http://mirror.centos.org/centos/$version/os/$arch where $arch will be substituted for the host’s actual OS architecture and $version, $major and $minor will be substituted for the version of the operating system. Solaris and Debian media may also use $release. Validations:
|
medium[os_family] необязательно , nil разрешен |
Семейство операционных систем, доступные значения: AIX, Altlinux, Archlinux, Coreos, Debian, Freebsd, Gentoo, Junos, NXOS, Rancheros, Redhat, Solaris, Suse, VRP, Windows, Xenserver Validations:
|
medium[operatingsystem_ids] необязательно , nil разрешен |
Validations:
|
medium[location_ids] необязательно , nil разрешен |
ЗАМЕСТИТЬ местоположения с заданным кодом Validations:
|
medium[organization_ids] необязательно , nil разрешен |
ЗАМЕСТИТЬ организации с заданным кодом Validations:
|
PUT /api/media/980190962 { "name": "TFvRQenyAq", "medium": { "name": "TFvRQenyAq" } } 200 { "path": "http://mirror.centos.org/centos/6.0/os/$arch", "os_family": null, "created_at": "2019-11-07 08:32:17 UTC", "updated_at": "2019-11-07 08:32:25 UTC", "id": 980190962, "name": "TFvRQenyAq", "operatingsystems": [ { "id": 309172073, "name": "centos", "title": "centos 5.3" }, { "id": 1073012828, "name": "Redhat", "title": "RHEL 6.1" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Имя параметра | Описание |
---|---|
location_id необязательно |
Set the current location context for the request Validations:
|
organization_id необязательно |
Set the current organization context for the request Validations:
|
id обязательно |
Validations:
|
medium обязательно |
Validations:
|
medium[name] необязательно |
Имя носителя Validations:
|
medium[path] необязательно |
The path to the medium, can be a URL or a valid NFS server (exclusive of the architecture). for example http://mirror.centos.org/centos/$version/os/$arch where $arch will be substituted for the host’s actual OS architecture and $version, $major and $minor will be substituted for the version of the operating system. Solaris and Debian media may also use $release. Validations:
|
medium[os_family] необязательно , nil разрешен |
Семейство операционных систем, доступные значения: AIX, Altlinux, Archlinux, Coreos, Debian, Freebsd, Gentoo, Junos, NXOS, Rancheros, Redhat, Solaris, Suse, VRP, Windows, Xenserver Validations:
|
medium[operatingsystem_ids] необязательно , nil разрешен |
Validations:
|
medium[location_ids] необязательно , nil разрешен |
ЗАМЕСТИТЬ местоположения с заданным кодом Validations:
|
medium[organization_ids] необязательно , nil разрешен |
ЗАМЕСТИТЬ организации с заданным кодом Validations:
|
DELETE /api/media/338446587 { "medium": {} } 200 { "id": 338446587, "name": "unused", "path": "http://nothing.intersting.com", "created_at": "2019-11-07T08:32:17.701Z", "updated_at": "2019-11-07T08:32:17.701Z", "media_path": null, "config_path": null, "image_path": null, "os_family": null }
Имя параметра | Описание |
---|---|
location_id необязательно |
Set the current location context for the request Validations:
|
organization_id необязательно |
Set the current organization context for the request Validations:
|
id обязательно |
Validations:
|