RulesResource


Create allocation rules


Create global allocation rules and datacenter-specific rules. This request will write over ALL the previously defined global rules and the datacenter-specific rules for a given datacenter

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

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION]

Parameter Type Default Value Description
idDatacenter Integer The ID of the datacenter in which to apply datacenter allocation rules. Create a rules entity with global rules and a set of datacenter rules to apply to this datacenter

Content-Type : rules Accept : rules

Error Codes

  • 400-BAD-REQUEST - Request not valid

Example

List allocation rules


Get global rules or datacenter rules if you supply a datacenter identifier.

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

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
idDatacenter Integer If present, get the allocation rules of the datacenter with the given ID. If not present, get the global rules

Accept : rules

Example