DatacenterDevicesResource


Create a device in the datacenter


To create a device for a specific enterprise, supply a link with rel ''enterprise'' and the device will be created for the location (enterprise-allowed datacenter). Otherwise, the device will be available for all enterprises in the datacenter

POST https://example.com/api/admin/datacenters/{datacenter}/devices

Roles : [ROLE_MANAGE_DEVICES]

Content-Type : device Accept : device

Error Codes

  • NETDEVICE-2 - Devices managed by the provider are immutable
  • NETDEVICE-3 - There is another default device

Example

List devices in a datacenter


GET https://example.com/api/admin/datacenters/{datacenter}/devices

Roles : [ROLE_PHYS_DC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String name parameter for ordering. Valid values {@link com.abiquo.server.core.cloud.Device.ORDER_BY}
has String If present filter to apply in the search.
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : devices

Example

Delete a device


Deletes a device

DELETE https://example.com/api/admin/datacenters/{datacenter}/devices/{device}

Roles : [ROLE_MANAGE_DEVICES]

Parameter Type Default Value Description
force boolean false If true deletes without public cloud credentials

Example

Get a device


Returns a device.

GET https://example.com/api/admin/datacenters/{datacenter}/devices/{device}

Roles : [ROLE_PHYS_DC_ENUMERATE]

Accept : device

Error Codes

  • GEN-4 - Not enough permissions to perform this action

Example

Update a device


Updates a device.

PUT https://example.com/api/admin/datacenters/{datacenter}/devices/{device}

Roles : [ROLE_MANAGE_DEVICES]

Content-Type : device Accept : device

Error Codes

  • NETDEVICE-2 - Devices managed by the provider are immutable
  • NETDEVICE-4 - Cannot change enterprise/delete because the device is in use

Example