PublicCloudRegionEnterprisesResource


List enterprises in a public cloud region


Returns the enterprises that are allowed to use a public cloud region

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

Roles : [ROLE_PCR_ENUMERATE]

Parameter Type Default Value Description
idScope Integer If present, filter by the scope identifier
requirecredentials boolean false If true, only retrieves enterprises with public cloud credentials for this public cloud region
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)

Accept : enterprises

Error Codes

  • PUBLICREGION-8 - The requested public cloud region does not exist

Example

Get an enterprise in a public cloud region


Return an allowed enterprises for a public cloud region.
The enterprise could miss the public cloud credentials

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

Roles : [ROLE_PCR_ENUMERATE]

Parameter Type Default Value Description
idScope Integer if present filter by the scope identifier

Accept : enterprise

Error Codes

  • EN-0 - The requested enterprise does not exist
  • PUBLICREGION-8 - The requested public cloud region does not exist

Example

Search for alarms on an enterprise in a public cloud region


Retrieve alarms from the public cloud region in the enterprise, optionally the search could be recursive and includes the alarms of the entities:
  • Public Cloud Region
  • Virtual machines

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

Roles : [ROLE_USERS_VIEW_ALARMS]

Parameter Type Default Value Description
startwith Integer 0 First element to retrieve, By default 0.
by String alarm Field to order by. Possible values: 'alarm', 'entity_type', 'metric', 'time_range', 'datapoints_limit', 'statistic', 'formula', 'threshold', 'description'. Uses 'alarm' as default.
limit Integer 25 Number of alarms to return. By default 25.
asc Boolean true If true order ascending by specified field in 'by' parameter, otherwise order descending. By default 'true'.
alarm String Filter alarms by name, accepts wildcards. Empty by default.
metric String Filter alarm by metric name, accepts wildcards. Empty by default.
state String Filter by alarm state. Possible values: 'all', 'active' or 'inactive'
recursive Boolean false If true, the search will be recursive. False by default.

Accept : alarms

List virtual machines of an enterprise in a public cloud region


Returns the virtual machines of the enterprises that have credentials for a public cloud region and are allowed to use it.

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

Roles : [ROLE_PCR_ENUMERATE]

Parameter Type Default Value Description
idScope Integer if present filter by the scope identifier
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)

Accept : virtualmachines

Error Codes

  • EN-0 - The requested enterprise does not exist
  • PUBLICREGION-8 - The requested public cloud region does not exist

Example

Get a virtual machine of an enterprise in a public cloud region


Gets a virtual machine of an enterprise that has credentials for a public cloud region and is allowed to use it.

GET https://example.com/api/admin/publiccloudregions/{publiccloudregion}/enterprises/{enterprise}/virtualmachines/{virtualmachine}

Roles : [ROLE_PCR_ENUMERATE]

Parameter Type Default Value Description
idScope Integer If present filter by scope identifier

Accept : virtualmachine

Error Codes

  • EN-0 - The requested enterprise does not exist
  • PUBLICREGION-8 - The requested public cloud region does not exist
  • VM-1 - The requested virtual machine does not exist

Example

Send email to public cloud region users


Send an email in the context of a public cloud region

POST https://example.com/api/admin/publiccloudregions/{publiccloudregion}/enterprises/{enterprise}/virtualmachines/{virtualmachine}/action/sendmail

Roles : [ROLE_AUTHENTICATED]

Parameter Type Default Value Description
sendermail boolean false If true the user performing this request will appear as sender of the e-mail
admins boolean false If true send the mail to enterprise admins where the virtual machines belongs
owners boolean false If true send the mail to the owners of VMs deployed in the public cloud region

Content-Type : mail

Example