Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:

Remote Services Resource

The Remote Service resource enables you to manage the remote services separately from their datacenters and public cloud regions. So you can use remote services in multiple locations at the same time if the remote services support sharing. The Appliance Manager (AM) and the Business Process Manager (BPM - V2V) cannot be shared. The AM remote service can be used by one datacenter only, so it is usually created and deleted together with the datacenter.  

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/remoteservices

Exposed Methods

List remote services

Returns all remote services registered in Abiquo.

Synopsis: GET http://example.com/api/admin/remoteservices 
Roles Required: PHYS_DC_ENUMERATE
Request Headers: Accept:  application/vnd.abiquo.remoteservices+json; version=4.4; application/vnd.abiquo.remoteservices+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 type

no 

null 

type of remote service to filter

startwithno0Pagination: element where the page starts
limitno25Pagination: maximum number of elements per page
hasnonullPagination: text to filter by
bynouriPagination: attribute to order by
ascnotruePagination: order ascendant or descendant

Request Message Body Entity: 
Response Message Body Entity: RemoteServices Media Type 
Request Example:

 Click here to show or hide the request example
GET_adm_rs_AC_rs_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/remoteservices \ 
	 -H 'Accept:application/vnd.abiquo.remoteservices+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "totalSize": 3, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices?limit=25&by=uri&asc=true", 
      "rel": "first"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices?startwith=0&limit=25&by=uri&asc=true", 
      "rel": "last"
    }
  ], 
  "collection": [
    {
      "status": 1, 
      "uuid": "211", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/remoteservices/1334", 
          "type": "application/vnd.abiquo.remoteservice+json", 
          "rel": "edit", 
          "title": "BPMSERVICE"
        }, 
        {
          "href": "http://localhost:9009/api/admin/remoteservices/1334/action/check", 
          "type": "", 
          "rel": "check", 
          "title": "check"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/869", 
          "type": "application/vnd.abiquo.datacenter+json", 
          "rel": "datacenter", 
          "title": "212"
        }
      ], 
      "type": "BPM_SERVICE", 
      "uri": "http://localhost:8080/bpm-async", 
      "id": 1334
    }, 
    {
      "status": 1, 
      "uuid": "210", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/remoteservices/1333", 
          "type": "application/vnd.abiquo.remoteservice+json", 
          "rel": "edit", 
          "title": "VIRTUALFACTORY"
        }, 
        {
          "href": "http://localhost:9009/api/admin/remoteservices/1333/action/check", 
          "type": "", 
          "rel": "check", 
          "title": "check"
        }, 
        {
          "href": "http://localhost:9009/api/admin/publiccloudregions/870", 
          "type": "application/vnd.abiquo.publiccloudregion+json", 
          "rel": "publiccloudregion", 
          "title": "216"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/869", 
          "type": "application/vnd.abiquo.datacenter+json", 
          "rel": "datacenter", 
          "title": "212"
        }
      ], 
      "type": "VIRTUAL_FACTORY", 
      "uri": "http://localhost:8080/virtualfactory", 
      "id": 1333
    }
  ]
}

Create a remote service

Create a remote service to be used by datacenters or/and public cloud regions. Is important to note that URI field cannot be null and must follow the pattern <protocol><host>:<port>/<context>.

If some link of datacenter or public cloud region is supplied in the DTO, the remote service will be assigned to them.

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. 

Synopsis: POST http://example.com/api/admin/remoteservices 
Roles Required: PHYS_DC_MANAGE
Request Headers: Accept:  application/vnd.abiquo.remoteservice+json; version=4.4; application/vnd.abiquo.remoteservice+xml; version=4.4;  Content-type:  application/vnd.abiquo.remoteservice+json; version=4.4; application/vnd.abiquo.remoteservice+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: RemoteService Media Type 
Request Body example:

 Click here to show or hide the request body example
{
  "status": 0, 
  "type": "CLOUD_PROVIDER_PROXY", 
  "uri": "http://localhost:8080/fooooo", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/867", 
      "rel": "publiccloudregion"
    }, 
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/868", 
      "rel": "publiccloudregion"
    }
  ]
}


Response Message Body Entity: RemoteService Media Type 
Request Example:

 Click here to show or hide the request example

Example: Create a remote service

An appliance manager remote service must be assigned to a single datacenter. For example, if a datacenter is created with an error because the AM was invalid, you can replace the AM for the datacenter.


POST_adm_rs_CT_rs_j_AC_rs_j.0001.txt

cURL:

curl -X POST http://localhost:9000/api/admin/remoteservices \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 201

Request payload:

{
  "status": 0, 
  "type": "APPLIANCE_MANAGER", 
  "uri": "http://localhost:8080/fooooo", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/842", 
      "rel": "datacenter"
    }
  ]
}

Response payload:

{
  "status": 1, 
  "uuid": "remoteserviceuuid", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices/1323", 
      "type": "application/vnd.abiquo.remoteservice+json", 
      "rel": "edit", 
      "title": "APPLIANCEMANAGER"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices/1323/action/check", 
      "type": "", 
      "rel": "check", 
      "title": "check"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/842", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "32"
    }
  ], 
  "type": "APPLIANCE_MANAGER", 
  "uri": "http://localhost:8080/fooooo", 
  "id": 1323
}

Example: Create a remote service in multiple locations


POST_adm_rs_CT_rs_j_AC_rs_j.0004.txt

cURL:

curl -X POST http://localhost:9000/api/admin/remoteservices \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 201

Request payload:

{
  "status": 0, 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/fooooo", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/847", 
      "rel": "publiccloudregion"
    }, 
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/848", 
      "rel": "publiccloudregion"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/849", 
      "rel": "datacenter"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/850", 
      "rel": "datacenter"
    }
  ]
}

Response payload:

{
  "status": 1, 
  "uuid": "remoteserviceuuid", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices/1330", 
      "type": "application/vnd.abiquo.remoteservice+json", 
      "rel": "edit", 
      "title": "VIRTUALSYSTEMMONITOR"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices/1330/action/check", 
      "type": "", 
      "rel": "check", 
      "title": "check"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/849", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "100"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/850", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "102"
    }, 
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/847", 
      "type": "application/vnd.abiquo.publiccloudregion+json", 
      "rel": "publiccloudregion", 
      "title": "96"
    }, 
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/848", 
      "type": "application/vnd.abiquo.publiccloudregion+json", 
      "rel": "publiccloudregion", 
      "title": "99"
    }
  ], 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/fooooo", 
  "id": 1330
}

Get a remote service

Returns a remote service.

Synopsis: GET http://example.com/api/admin/remoteservices/{remoteservice} 
Roles Required: PHYS_DC_ENUMERATE
Request Headers: Accept:  application/vnd.abiquo.remoteservice+json; version=4.4; application/vnd.abiquo.remoteservice+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: 
Response Message Body Entity: RemoteService Media Type 
Request Example:

 Click here to show or hide the request example

Example: Get a remote service

GET_adm_rs_X_AC_rs_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/remoteservices/919 \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "status": 1, 
  "uuid": "397", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices/919", 
      "type": "application/vnd.abiquo.remoteservice+json", 
      "rel": "edit", 
      "title": "VIRTUALSYSTEMMONITOR"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices/919/action/check", 
      "type": "", 
      "rel": "check", 
      "title": "check"
    }
  ], 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/vsm", 
  "id": 919
}

Example: Get a remote service that is used in a datacenter

When the remote service is used in a datacenter or public cloud region, the platform returns a link to this datacenter or public cloud region. Use the datacenter or public cloud region method to obtain the remote services from a datacenter or public cloud region


GET_adm_rs_X_AC_rs_j.0007.txt

cURL:

curl -X GET http://localhost:9000/api/admin/remoteservices/9920 \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "status": 1, 
  "uuid": "remoteserviceuuid", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices/9920", 
      "type": "application/vnd.abiquo.remoteservice+json", 
      "rel": "edit", 
      "title": "VIRTUALSYSTEMMONITOR"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices/9920/action/check", 
      "type": "", 
      "rel": "check", 
      "title": "check"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4306", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "6"
    }
  ], 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/vsm", 
  "id": 9920
}

Check the status of a remote service

Returns the status of a remote service as an HTTP response code.

Synopsis: GET http://example.com/api/admin/remoteservices/{remoteservice}/action/check 
Roles Required: PHYS_DC_MANAGE
Request Headers: 
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: 
Response Message Body Entity: 
Request Example:

 Click here to show or hide the request example

GET_adm_rs_X_act_chk.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/remoteservices/9959/action/check \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 204

Request payload:

--none--

Response payload:

--none--

Update a remote service

Modifies a remote service.

The datacenter and public cloud region relation 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.

Synopsis: PUT http://example.com/api/admin/remoteservices/{remoteservice} 
Roles Required: PHYS_DC_MANAGE
Request Headers: Accept:  application/vnd.abiquo.remoteservice+json; version=4.4; application/vnd.abiquo.remoteservice+xml; version=4.4;  Content-type:  application/vnd.abiquo.remoteservice+json; version=4.4; application/vnd.abiquo.remoteservice+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: RemoteService Media Type 
Request Body:

 Click here to show or hide the request example
Request body example
{
  "status": 0, 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/vsm", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/4308", 
      "rel": "datacenter"
    }
  ], 
  "uuid": "remoteserviceuuid"
} 


Response Message Body Entity: RemoteService Media Type 
Request Example:

 Click here to show or hide the request example

PUT_adm_rs_X_CT_rs_j_AC_rs_j.0001.txt

cURL:

curl -X PUT http://localhost:9000/api/admin/remoteservices/660 \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

{
  "status": 1, 
  "uuid": "5786", 
  "links": [], 
  "type": "NODE_COLLECTOR", 
  "uri": "http://localhost:8080/nodecollector", 
  "id": 660
}

Response payload:

{
  "status": 1, 
  "uuid": "remoteserviceuuid", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices/660", 
      "type": "application/vnd.abiquo.remoteservice+json", 
      "rel": "edit", 
      "title": "NODECOLLECTOR"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices/660/action/check", 
      "type": "", 
      "rel": "check", 
      "title": "check"
    }
  ], 
  "type": "NODE_COLLECTOR", 
  "uri": "http://localhost:8080/nodecollector", 
  "id": 660
}

Example: Update a remote service and its datacenter


PUT_adm_rs_X_CT_rs_j_AC_rs_j.0009.txt

cURL:

curl -X PUT http://localhost:9000/api/admin/remoteservices/9923 \ 
	 -H 'Accept:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.remoteservice+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

{
  "status": 0, 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/vsm", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/4308", 
      "rel": "datacenter"
    }
  ], 
  "uuid": "remoteserviceuuid"
}

Response payload:

{
  "status": 1, 
  "uuid": "remoteserviceuuid", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/remoteservices/9923", 
      "type": "application/vnd.abiquo.remoteservice+json", 
      "rel": "edit", 
      "title": "VIRTUALSYSTEMMONITOR"
    }, 
    {
      "href": "http://localhost:9009/api/admin/remoteservices/9923/action/check", 
      "type": "", 
      "rel": "check", 
      "title": "check"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4308", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "18"
    }
  ], 
  "type": "VIRTUAL_SYSTEM_MONITOR", 
  "uri": "http://localhost:8080/vsm", 
  "id": 9923
}

 

Delete a remote service

Deletes a remote service.

Synopsis: DELETE http://example.com/api/admin/remoteservices/{remoteservice} 
Roles Required: PHYS_DC_MANAGE
Request Headers: 
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: 
Response Message Body Entity: 
Request Example:

 Click here to show or hide the request example

DELETE_adm_rs_X.0001.txt

cURL:

curl -X DELETE http://localhost:9000/api/admin/remoteservices/660 \ 
	 -H 'Accept:text/json,application/json' \ 
	 -u user:password --verbose 

Success status code: 204

Request payload:

--none--

Response payload:

--none--