Get List of Auto Import Rules

To get the list of all available auto import rules, use the following request:

GET /settings/hypervisors/:hypervisor_id/auto_import_rules.xml
GET /settings/hypervisors/:hypervisor_id/auto_import_rules.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:password --url http://onapp.test/settings/hypervisors/152/auto_import_rules.xml 

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:password --url http://onapp.test/settings/hypervisors/152/auto_import_rules.json 

XML Output Example

<auto_import_rules type="array">
	<id type="integer">18</id>
	<label>All DC machines</label>
	<source_id type="integer">452</source_id>
	<target_id type="integer">513</target_id>
	<hypervisor_id type="integer">862</hypervisor_id>
	<id type="integer">20</id>
	<source_id type="integer">184</source_id>
	<target_id type="integer">1</target_id>
	<hypervisor_id type="integer">862</hypervisor_id>


id - the ID of an auto import rule
event_type - the type of event with which this rule will be associated
label - the label of auto import rule specified by the user
source_type - the type of vCenter source
source_id - the ID of the vCenter source
target_type - the type of target user
target_id - the ID of the user
hypervisor_id - the ID of the compute resource