RemoteServicesResource


Create a remote service


Create a remote service to be used by datacenters or/and public cloud regions.

If links to one or more datacenter or public cloud region entities are supplied in the DTO, the remote service will be assigned to these entities. It is also possible to create the remote services when you create a datacenter or public cloud region, by including the remote service links in the entity.

POST https://example.com/api/admin/remoteservices

Roles : [ROLE_PHYS_DC_MANAGE, ROLE_PCR_MANAGE]

Content-Type : remoteservice Accept : remoteservice

Error Codes

  • DC-0 - The requested datacenter does not exist
  • DC-9 - Invalid datacenter link
  • PUBLICREGION-8 - The requested public cloud region does not exist
  • REGION-1 - Invalid region link
  • RS-1 - Wrong remote service type
  • RS-15 - A port must be defined in the URI
  • RS-20 - The URI parameter is required
  • RS-21 - Remote service UUID already used
  • RS-27 - A location is required to create the remote service, and only one is allowed
  • RS-29 - Remote service type not allowed to be used in a public cloud region
  • RS-3 - The remote service URL already exists and cannot be duplicated
  • RS-30 - The location already has a remote service of the same type assigned
  • RS-4 - Malformed remote service URL

Example

List remote services


Retrieves remote services registered in Abiquo.

GET https://example.com/api/admin/remoteservices

Roles : [ROLE_PHYS_DC_ENUMERATE, ROLE_PCR_ENUMERATE]

Parameter Type Default Value Description
type String If present, filter by type of the remote service. {@link RemoteServiceType}
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
by String uri Order by
has String If present filter to apply in the search.
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : remoteservices

Example

Delete a remote service


DELETE https://example.com/api/admin/remoteservices/{remoteservice}

Roles : [ROLE_PHYS_DC_MANAGE, ROLE_PCR_MANAGE]

Example

Get a remote service


Retrieve a remote service, identified by the type

GET https://example.com/api/admin/remoteservices/{remoteservice}

Roles : [ROLE_PHYS_DC_ENUMERATE, ROLE_PCR_ENUMERATE]

Accept : remoteservice

Error Codes

  • RS-26 - The requested remote service does not exist

Example

Update a remote service


The datacenter and public cloud region relationship can also be modified by changing the links, so the remote service will be associated only to the links given in the request. This means that you can associate or release remote services in this operation, but you must remember that some remote services like Appliance Manager and Business Process Manager only allow and require a single datacenter.

PUT https://example.com/api/admin/remoteservices/{remoteservice}

Roles : [ROLE_PHYS_DC_MANAGE, ROLE_PCR_MANAGE]

Content-Type : remoteservice Accept : remoteservice

Error Codes

  • RS-10 - Cannot delete a DHCP Service. There are virtual machines deployed.
  • RS-13 - The remote service does not have the *abiquo.datacenter.id* property set
  • RS-19 - Cannot delete a virtual system monitor service. There are virtual machines deployed.
  • RS-20 - The URI parameter is required
  • RS-21 - Remote service UUID already used
  • RS-27 - A location is required to create the remote service, and only one is allowed
  • RS-29 - Remote service type not allowed to be used in a public cloud region
  • RS-3 - The remote service URL already exists and cannot be duplicated
  • RS-30 - The location already has a remote service of the same type assigned
  • RS-31 - The type cannot be modified
  • RS-33 - Cannot unassign the Monitor Manager because the datacenter has monitors
  • RS-4 - Malformed remote service URL
  • RS-7 - Failed connection to the remote service
  • RS-AM-0 - The repository exported by the current appliance manager is being used in another datacenter
  • RS-AM-1 - The current repository holds virtual machine templates being used in some virtual appliances, so it is not possible to remove this remote service. You can replace the appliance manager with another one but only if the same repository is used.

Example

Check a remote service


Check the status of a remote service.
Returns an HTTPS status code.
  • 503: Service Unavailable - The check of the remote service did not pass
  • 409: Conflict - An Abiquo constraint was not met (e.g. uniqueness)

GET https://example.com/api/admin/remoteservices/{remoteservice}/action/check

Roles : [ROLE_PHYS_DC_MANAGE, ROLE_PCR_MANAGE]

Example