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.

 

TSWS APIs that use the POST method
APIDescription
loginObtains the authToken required to perform all other operations
configdataRetrieves configuration data of monitor instances
perfdataRetrieves performance data of monitor instances

TSWS APIs that use the GET method
APIDescription
devicesRetrieves a list of monitored devices
instances Retrieves a list of monitored instances 
monitortypesRetrieves a list of monitor types 
tenantsRetrieves 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

ElementDescription
authTokenValue of authToken
tenantId

Tenant name

Example: BmcRealm

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.

  • -1 ignores the parent device and displays all devices
  • 0 displays all devices that do not have a parent device

Sample request with REST client

 After you access the REST client, perform the following steps:

  1. Enter the URL for the device list API. The generic format is:
    https://<PresentationServerHostName>/tsws/10.0/api/omprovider/devices
  2. In the REST client, add the following request parameters:
    1. tenantId — the tenant name, for example "BmcRealm".
    2. 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.
    3. 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
  3. Add a new header row and select Authorization as the header type.
  4. Enter the text authToken followed by the authToken generated through the login API. See TSWS authentication.

JSON response content

ObjectDescription
deviceList
deviceId 
dnsName 
ipAddress 
deviceType 
parentDeviceId 
isMarkedForDeleteEither 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

Related topics

Developing

Was this page helpful? Yes No Submitting... Thank you
© Copyright 2014 - 2017 BMC Software, Inc.
Legal notices