CMDB API - Get Virtual Machines

CMDB API - Get Virtual Machines

Hello,

I'm trying to get all virtual machines in CMDB. I'm running this post request:

  1. getCIURL = SDPAddress+'/api/cmdb/ci'
    payload = {
        'OPERATION_NAME''read',
        'TECHNICIAN_KEY': apiKey,
        'INPUT_DATA'"""<?xml version="1.0" encoding="UTF-8"?>
    <API version="1.0" locale="en">
        <citype>
            <name>Server</name>
            <criterias>
                <criteria>
                    <parameter>
                        <name compOperator="IS">CI Type</name>
                        <value>Server</value>
                    </parameter>
                    <reloperator>AND</reloperator>
                    <parameter><name compOperator="IS">IS VIRTUAL</name><value>true</value></parameter>
                </criteria>
            </criterias>
            <returnFields>
                <name>CI Name</name>
            </returnFields>
        </citype>
    </API>"""
    }


But I get the following response:

  1. {
    "API": {
    "response": {
    "operation": {
    "name": "read",
    "result": {
    "message": "Invalid field name 'IS VIRTUAL MACHINE' specified.",
    "status": "Invalid column(s) specified.",
    "statuscode": 3025
    }
    }
    },
    "version": 1
    }
    }
How can I get a list of all virtual machines? How can I know the available fields?


                  New to ADSelfService Plus?