Skip to content

get_inventory_instance

Alberto Gonzalez edited this page Oct 29, 2015 · 1 revision

(GET)/inventory/instance

Description

This api is designed in a way to get information about an instance, given only an instance ID.

Request

Syntax

GET /api/inventory/instance/?sid={sid}&instances={a,b,c,d}
Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>

Parameters

Optional filters include:

Filter | Description | Type | Required ---- | ---- | ---- ?sid={sid} | return the instance for a particular system id | long | required &instances={instances} | the instance ID of particular instance | long | required

Response

200 success

Parameters

Index Value Type Returned
app_id application ID, either "VMware" or "Hyper-V" int always
app_name name of application, either "VMware" or "Hyper-V" string always
app_type type of application, either "VMware" or "Hyper-V" string always
client_id ID of the client to which the instance is attached int always
client_name client name string always
vm_name instance name string always

Examples

Sample Request

GET /api/inventory/instance/?sid=1&instances=40,51,56
Host: <server host name>
Accept: application/json
AuthToken: 8a00sjerhterqerjlqkjlk443l4j56869h4f_)(fjdkasHHHHHkdal324

Sample Response


{
    "instances": [
        {
            "40": {
                "app_id": 40,
                "app_name": "VMware",
                "app_type": "VMware",
                "client_id": 9,
                "client_name": "esxserver215.unitrends.com",
                "vm_name": "Andrew3"
            }
        },
        {
            "51": {
                "app_id": 40,
                "app_name": "VMware",
                "app_type": "VMware",
                "client_id": 9,
                "client_name": "esxserver215.unitrends.com",
                "vm_name": "UEB_Rollback"
            }
        },
        {
            "56": {
                "app_id": 51,
                "app_name": "Hyper-V 2012",
                "app_type": "Hyper-V",
                "client_id": 5,
                "client_name": "HyperVCluster157",
                "vm_name": "Virtual Machine Win2008"
            }
        }
    ],
    "timestamp": 1426520028
}

Clone this wiki locally