DatacenterRepositoriesResource


List datacenter repositories


Retrieve all the datacenter repositories for allowed datacenters of the current enterprise. See EnterpriseLimitsByDatacentersResource. Datacenter repositories are used to store VM templates or template details for each enterprise

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

Roles : [ROLE_VDC_MANAGE_VAPP, ROLE_APPLIB_VIEW]

Example

Get a datacenter repository


Get information about a datacenter repository, and optionally synchronize with the repository filesystem.

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

Roles : [ROLE_VDC_MANAGE_VAPP, ROLE_APPLIB_VIEW, ROLE_VAPP_CUSTOMISE_SETTINGS]

Parameter Type Default Value Description
refresh boolean communicate with the datacenter services to add new virtual machine templates present in the repository filesystem but not in the abiquo API. @deprecated use ''refreshDatacenterRepository''
usage boolean communicate with the datacenter services in order to include the repository filesytem usage.
expand String allowed values {"last_task"} -> add the representation of the last task

Error Codes

  • DATACENTER-REPOSITORY-NOT-CREATED - Datacenter repository not configured; check the appliance manager of the datacenter. Contact your Infrastructure Administrator
  • DC-0 - The requested datacenter does not exist
  • ENTERPRISE-10 - The enterprise does not have permission to use the requested datacenter
  • REPO-1 - Cannot request ''usage'' or ''refresh'' of a public cloud repository

Example

List disks in a datacenter repository


Retrieve disks from the repository, filtering by disk characteristics.

GET https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/action/disks

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_MANAGE_VAPP, ROLE_APPLIB_ALLOW_MODIFY]

Parameter Type Default Value Description
diskformattype String filter to only retrieve disks with a desired format {@link DiskFormatType}
startwith Integer 0 The first element to be retrieved of the filtered search
by String id 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)
states String filter to only retrieve disks in a desired state {@link VMTemplateState}

Accept : disks

Error Codes

  • DISK-8 - Invalid disk format type.

Example

Refresh a datacenter repository to detect new virtual machine templates


Perform a request inside the datacenter (ApplianceManager service) in order to detect and register new VM templates in the repository filesystem (templates that were added without Abiquo intervention).

PUT https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/actions/refresh

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_MANAGE_VAPP, ROLE_APPLIB_ALLOW_MODIFY]

Accept : acceptedrequest

Example

List tasks for a datacenter repository


Displays the tasks on the datacenter repository. Any of these tasks may still be in progress.

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

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_MANAGE_VAPP, ROLE_APPLIB_ALLOW_MODIFY]

Accept : tasks

Error Codes

  • REPO-1 - Cannot request ''usage'' or ''refresh'' of a public cloud repository

Get a task for a datacenter repository


Displays a specific task on the datacenter repository. Any of these tasks may still be in progress.

GET https://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/tasks/{id}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_MANAGE_VAPP, ROLE_APPLIB_ALLOW_MODIFY]

Accept : task

Example

List template publishers


Returns all template publishers available

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

Roles : [ROLE_APPLIB_VIEW, ROLE_VDC_ENUMERATE, ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS, ROLE_VAPP_CREATE_STATEFUL]

Error Codes

  • VIMAGE-74 - List Template Publishers is not available for private cloud

Example