Retrieving the list of devices
The devices
API uses the GET method to obtain the list of devices. The devices returned in the JSON response are determined by the permissions specified by the authToken. This API returns only those devices accessible to the user specified by the authToken.
API Endpoints | Description |
---|---|
token | Obtains the authToken required to perform all other operations |
configdata | Retrieves configuration data of monitor instances |
perfdata | Retrieves performance data of monitor instances |
API Endpoints | Description |
---|---|
devices | Retrieves a list of monitored devices |
instances | Retrieves a list of monitored instances |
monitortypes | Retrieves a list of monitor types |
tenants | Retrieves a list of tenants |
Before you begin
You must have used the login
API to obtain the authToken, which authenticates the user performing the operation. For details, see TSWS authentication.
Request syntax
https://<PresentationServerHostName>/tsws/10.0/api/omprovider/devices
Request parameters
Note
As per the devices API design, you cannot retrieve information for a single device based on the hostname. The hostname does not qualify as an API request parameter.
Element | Description |
---|---|
authToken | Value of authToken |
tenantId | Tenant name Example: * |
deviceEntityType | Entry from the list of valid device entity types To get devices of all entity types, set the parameter value to all |
parentDeviceId | Device ID of the parent device.
|
Sample request with REST client
After you access the REST client, perform the following steps:
- Enter the URL for the device list API. The generic format is:
https://<PresentationServerHostName>/tsws/10.0/api/omprovider/devices - In the REST client, add the following request parameters:
- tenantId — the tenant name, for example "*".
- deviceEntityType — device type as in the entitytype entry for the OS KM instance.
To get devices of all entity types, set the parameter value to all. - parentDeviceId — device ID of the parent device.
-1 ignores the parent device and displays all devices
0 displays all devices that do not have a parent device
- Add a new header row and select Authorization as the header type.
- Enter the text authToken followed by the authToken generated through the login API. See TSWS authentication.
JSON response content
Object | Description |
---|---|
deviceList | |
deviceId | |
dnsName | |
ipAddress | |
deviceType | |
parentDeviceId | |
isMarkedForDelete | Either true or false |
tokenList |
Sample JSON response
The JSON response follows the standard HTTP response status codes.
Valid device entity types
The following table lists the valid device entity types:
VmWare.Host |
VmWare.Virtual_Machine |
VmWare.Virtual_Center |
Xen.Host |
Xen.Virtual_Machine |
Xen.Pool_Master |
vBlock.ESX |
vBlock.Virtual_Machine |
vBlock.Switch |
vBlock.Storage |
vBlock.Chassis |
vBlock.Blade |
vBlock.Env |
IBM.MG_SYS.Host |
IBM.Frame.Hard_Partition |
IBM.LPAR.Host |
IBM.WPAR.Virtual_Machine |
Sun.ZONE.Virtual_Machine |
Sun.LDOM.Host |
Sun.Zone.Host |
RedHat.KVM.Host |
RedHat.KVM.Virtual_Machine |
RedHat.Xen.Host |
RedHat.Xen.Virtual_Machine |
KVM.Host |
KVM.Virtual_Machine |
HP.NPAR.Hard_Partition |
HP.VPAR.Host |
HP.Integrity.Virtual_Machine |
HP.Integrity.Host |
Microsoft.Hyper-V.Host |
Microsoft.Hyper-V.Virtual_Machine |
Comments
Log in or register to comment.