Esempi

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
    }
  ]
}

Parametri

Nome parametro Descrizione
location_id
opzionale

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opzionale

Set the current organization context for the request

Validations:

  • Must be a Integer

medium
richiesto

Validations:

  • Must be a Hash

medium[name]
richiesto

Nome del dispositivo

Validations:

  • Must be a String

medium[path]
richiesto

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:

  • Must be a String

medium[os_family]
opzionale , consentito nil

Famiglia del sistema operativo, valori disponibili: AIX, Altlinux, Archlinux, Coreos, Debian, Freebsd, Gentoo, Junos, NXOS, Rancheros, Redhat, Solaris, Suse, VRP, Windows, Xenserver

Validations:

  • Must be a String

medium[operatingsystem_ids]
opzionale , consentito nil

Validations:

  • Must be an array of any type

medium[location_ids]
opzionale , consentito nil

SOSTITUIRE le posizioni con gli id dati

Validations:

  • Must be an array of any type

medium[organization_ids]
opzionale , consentito nil

SOSTITUIRE le organizzazioni con gli id dati

Validations:

  • Must be an array of any type