EnterprisesResource


Create an enterprise


When you create an enterprise, remember that to allow this enterprise to use a datacenter or public cloud region, you must create a Datacenter limit for the enterprise. See {@link EnterpriseLimitsByDatacentersResource}

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

Roles : [ROLE_USERS_MANAGE_OTHER_ENTERPRISES]

Content-Type : enterprise Accept : enterprise

Error Codes

  • CONSTR-LIMITRANGE - The property 'vlansLimits' invalid limit range for vlans: soft = 0; hard = 1.
  • CONSTR-RANGE - The property 'ramHardLimitInMb' must be between 0 and 2147483647.
  • ENTERPRISE-14 - You do not have enough privileges to configure the Chef properties
  • ENTERPRISE-20 - Cannot set the enterprise as a reseller for this scope because it already has a reseller.
  • ENTERPRISE-21 - Cannot set the enterprise as a key node for this scope because it already has a key node.
  • ENTERPRISE-4 - Duplicate name for an enterprise
  • GEN-3 - Numeric value (10000000000000000000000000) out of range of long (-9223372036854775808 - 9223372036854775807)
  • GEN-4 - Not enough permissions to perform this action
  • SCOPE-1 - The requested scope does not exist

Example

Create an enterprise with custom theme


Create an enterprise with additonal theme information

Remember to allow this enterprise to use a datacenter or public cloud region, by creating a datacenter limit for the enterprise. See {@link EnterpriseLimitsByDatacentersResource}

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

Roles : [ROLE_USERS_MANAGE_OTHER_ENTERPRISES]

Content-Type : enterprisetheme Accept : enterprisetheme

Example

List enterprise identifiers and names


Retrieve the list of enterprises with only the identifier and name of each enterprise

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

Roles : [ROLE_USERS_VIEW, ROLE_USERS_MANAGE_ENTERPRISE, ROLE_USERS_MANAGE_OTHER_ENTERPRISES, ROLE_ENTERPRISE_ENUMERATE, ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION, ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK, ROLE_PRICING_VIEW]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
has String If present filter to apply in the search.
limit Integer 25 The number of entities to retrieve
idScope Integer If present, filter by identifier for scope

Example

List enterprises


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

Roles : [ROLE_USERS_VIEW, ROLE_USERS_MANAGE_ENTERPRISE, ROLE_USERS_MANAGE_OTHER_ENTERPRISES, ROLE_ENTERPRISE_ENUMERATE, ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION, ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK, ROLE_PRICING_VIEW]

Parameter Type Default Value Description
startwith int 0 The first element to be retrieved of the filtered search
by String name Order by
has String If present filter to apply in the search.
limit int 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)
idPricingTemplate Integer If present, filter by identifier for pricing template
idScope Integer If present, filter by identifier for scope
included Boolean Include enterprises with no pricing template

Accept : enterprises

Error Codes

  • CONSTR-MIN - Parameter 'limit' must be greater than or equal to 0 but value '-1' was found

Example

Check user can download path from a datacenter repository


Check if the user who performs the request can download templates from the given enterprise.

GET https://example.com/api/admin/enterprises/action/requestdownload

Roles : [ROLE_APPLIB_DOWNLOAD_IMAGE]

Parameter Type Default Value Description
datacenterUuid String The uuid of the datacenter where the template is.
templatePath String The path to the template file to download.

Example

Delete an enterprise


DELETE https://example.com/api/admin/enterprises/{enterprise}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Example

Get an enterprise


Retrieves an enterprise, which is a cloud tenant

GET https://example.com/api/admin/enterprises/{enterprise}

Roles : [ROLE_AUTHENTICATED, ROLE_USERS_VIEW, ROLE_USERS_MANAGE_OTHER_ENTERPRISES, ROLE_PRICING_VIEW]

Accept : enterprise

Error Codes

  • EN-0 - The requested enterprise does not exist
  • GEN-4 - Not enough permissions to perform this action

Example

Get an enterprise with custom theme


Retrieves an enterprise entity with additional information on a custom theme assigned to it

GET https://example.com/api/admin/enterprises/{enterprise}

Roles : [ROLE_AUTHENTICATED, ROLE_USERS_VIEW, ROLE_USERS_MANAGE_OTHER_ENTERPRISES, ROLE_PRICING_VIEW]

Accept : enterprisetheme

Example

Upate an enterprise


PUT https://example.com/api/admin/enterprises/{enterprise}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_PRICING_VIEW]

Content-Type : enterprise Accept : enterprise

Error Codes

  • EN-0 - The requested enterprise does not exist
  • ENTERPRISE-14 - You do not have enough privileges to configure the Chef properties
  • ENTERPRISE-20 - Cannot set the enterprise as a reseller for this scope because it already has a reseller.
  • ENTERPRISE-21 - Cannot set the enterprise as a key node for this scope because it already has a key node.
  • ENTERPRISE-4 - Duplicate name for an enterprise
  • GEN-4 - Not enough permissions to perform this action
  • PRICINGTEMPLATE-3 - The requested pricing template does not exist
  • SCOPE-1 - The requested scope does not exist

Example

Update an enterprise and its custom theme


Updates an enterprise and its theme. Can update the enterprise and the additional information on a custom theme created for it

PUT https://example.com/api/admin/enterprises/{enterprise}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_PRICING_VIEW]

Content-Type : enterprisetheme Accept : enterprisetheme

Example

List available chef elements


Retrieve the list of all Chef elements available to an enterprise on the Chef server

GET https://example.com/api/admin/enterprises/{enterprise}/action/chefelements

Roles : [ROLE_VAPP_CUSTOMISE_SETTINGS]

Accept : runlistelements

Error Codes

  • CHEF-8 - The enterprise is not configured to use Chef

List enterprises of a key node


Retrieve the list of all enterprises of an enterprise key node

GET https://example.com/api/admin/enterprises/{enterprise}/action/keynode/enterprises

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Accept : enterprises

Error Codes

  • ENTERPRISE-23 - This action can only be performed on a key node enterprise.

Example

List tasks waiting on workflow tool


This resource retrieves all tasks that are in state QUEUEING. This means that workflow integration is enabled and that Abiquo is still waiting for the workflow tool to respond to either start or cancel the task.

This resource is meant as a fallback in case something went wrong with the workflow tool and the tasks must be started or canceled manually.

GET https://example.com/api/admin/enterprises/{enterprise}/action/pendingtasks

Roles : [ROLE_USERS_MANAGE_USERS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
has String If present filter to apply in the search.
limit Integer The number of entities to retrieve

Accept : tasks

Error Codes

  • CONSTR-MIN - Parameter 'limit' must be greater than or equal to 1 but value '0' was found
  • QUERY-2 - Invalid range: 'startwith' parameter must be less than 'limit' parameter
  • USER-3 - The requested user does not exist

Example

List public networks for an enterprise in a datacenter


Retrieve the list of public networks for an enterprise and datacenter

GET https://example.com/api/admin/enterprises/{enterprise}/action/publicnetworks

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
datacenterId Integer If present, filter by datacenter identifier

Accept : vlans

Error Codes

  • CONSTR-NOTNULL - Parameter 'datacenterId' may not be null but value 'null' was found

Example

Get a public network for an enterprise


GET https://example.com/api/admin/enterprises/{enterprise}/action/publicnetworks/{publicnetwork}

Roles : [ROLE_VDC_ENUMERATE]

Accept : vlan

Error Codes

  • VLAN-58 - The requested VLAN does not exist

Example

Check user can take additional space in a datacenter repository


Check if the user who performs the request can upload templates to the given enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/action/requestupload

Roles : [ROLE_APPLIB_UPLOAD_IMAGE]

Parameter Type Default Value Description
datacenterUuid String Identifies the target datacenter where the template will be uploaded, takes precedence over datacenterId.
datacenterId Integer Identifies the target datacenter where the template will be uploaded
fileSize Long Size of the template to upload Bytes, takes precedence over fileSizeInMb.
fileSizeInMb Long Size of the template to upload in MB.

Example

List enterprises of a reseller


Retrieve the list of all enterprises of an enterprise reseller

GET https://example.com/api/admin/enterprises/{enterprise}/action/reseller/enterprises

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Accept : enterprises

Error Codes

  • ENTERPRISE-22 - This action can only be performed on a reseller enterprise.

Example

List key nodes of reseller


Retrieve the list of all key nodes of an enterprise

GET https://example.com/api/admin/enterprises/{enterprise}/action/reseller/keynodes

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Accept : enterprises

Example

List external networks of an enterprise


Retrieve the list of external networks assigned to an enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/action/externalnetworks

Roles : [ROLE_ENTERPRISE_ENUMERATE, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
usage String Return only external networks that are suitable for a given usage. Values : VM, LB

Accept : vlans

Get an external network of an enterprise


Retrieve an external VLAN of an enterprise

GET https://example.com/api/admin/enterprises/{enterprise}/action/externalnetworks/{externalnetwork}

Roles : [ROLE_ENTERPRISE_ENUMERATE, ROLE_VDC_ENUMERATE]

Accept : vlan

List private ips of an enterprise


Retrieve the list of private IPs created by an enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/action/ips

Roles : [ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
datacenter Integer If present, filter by ID of the datacenter
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip 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 : privateips

Example

List virtual appliances of an enterprise


Retrieve the list of virtual appliances defined in an enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/action/virtualappliances

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
by String name 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)
expand String Use "last_task" to add information on last tasks in the returned virtual appliances
restricted Boolean If present, filter by the restricted attribute of the virtual appliances

Example

List virtual datacenters of an enterprise


Retrieve an ordered and filtered list of virtual datacenters defined for an enterprise

GET https://example.com/api/admin/enterprises/{enterprise}/action/virtualdatacenters

Roles : [ROLE_VDC_ENUMERATE, ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_USERS_MANAGE_USERS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
by String name 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)

Example

List virtual machines of an enterprise


Retrieve a list of VMs created by an enterprise

GET https://example.com/api/admin/enterprises/{enterprise}/action/virtualmachines

Roles : [ROLE_VAPP_CUSTOMISE_SETTINGS]

Accept : virtualmachines

Example

List volumes of an enterprise


Retrieve the list of volumes managed by this enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/action/volumes

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String id (availablesize, id, tier, totalsize, usedsize, virtualappliance, virtualdatacenter, virtualmachine)
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)
persistent Boolean true If true, include the persistent volumes in the result. The default value is true

Accept : volumes

Error Codes

  • CONSTR-MIN - Parameter 'enterprise' must be greater than or equal to 1 but value '-1' was found
  • EN-0 - The requested enterprise does not exist
  • QUERY-0 - Invalid 'by' parameter

Example

List volumes with virtual machine of an enterprise


Retrieve the list of volumes managed by this enterprise with information on the virtual machines that the volumes are attached to.

GET https://example.com/api/admin/enterprises/{enterprise}/action/volumes

Roles : [ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String id (availablesize, id, tier, totalsize, usedsize, virtualappliance, virtualdatacenter, virtualmachine)
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)
persistent Boolean true If true, include persistent volumes in the result. The default value is true

List enterprise properties


Retrieves the properties of an enterprise.

GET https://example.com/api/admin/enterprises/{enterprise}/properties

Roles : [ROLE_ENTERPRISE_ADMINISTER_ALL]

Error Codes

  • ENPROP-0 - The requested enterprise properties do not exist

Example

Update enterprise properties


Updates the properties of an enterprise, overwriting all existing properties.

PUT https://example.com/api/admin/enterprises/{enterprise}/properties

Roles : [ROLE_ENTERPRISE_ADMINISTER_ALL]

Content-Type : enterpriseproperties Accept : enterpriseproperties

Error Codes

  • CONSTR-STRINGMAP - The property 'properties' is a required field.
  • EN-0 - The requested enterprise does not exist

Example

List machines that reserved for an enterprise


Get the list of machines reserved by an enterprise

GET https://example.com/api/admin/enterprises/{enterprise}/reservedmachines

Roles : [ ROLE_USERS_MANAGE_RESERVED_MACHINES]

Accept : machines

Example

List machines that reserved for an enterprise with rack and datacenter


Get the details of the reserved machines if the user does not have access to infrastructure.

GET https://example.com/api/admin/enterprises/{enterprise}/reservedmachines

Roles : [ ROLE_USERS_MANAGE_RESERVED_MACHINES]

Accept : reservedmachines

Reserve a machine for an enterprise


Reserve a machine for an enterprise by sending a machine entity.

POST https://example.com/api/admin/enterprises/{enterprise}/reservedmachines

Roles : [ ROLE_USERS_MANAGE_RESERVED_MACHINES]

Content-Type : machine Accept : machine

Error Codes

  • MACHINE-16 - The machine '130' cannot be reserved because it contains virtual machines deployed by another enterprise.

Example

Reserve a machine for an enterprise using machine identifier


Reserve a machine for an enterprise sending only the machine identifier.

POST https://example.com/api/admin/enterprises/{enterprise}/reservedmachines/machine

Roles : [ROLE_USERS_MANAGE_RESERVED_MACHINES]

Parameter Type Default Value Description
machine Integer Identifier of the machine to reserve

Accept : machine

Example

Release a reserved machine from an enterprise


Release a machine from an enterprise. Delete a machine reservation for an enterprise

DELETE https://example.com/api/admin/enterprises/{enterprise}/reservedmachines/{machine}

Roles : [ ROLE_USERS_MANAGE_RESERVED_MACHINES]

Example