Devices Web Service

Local admin users can perform device management tasks using the PC RESTful web services.
Use the devices web service to:
  • View the devices that belong to a tenant.
  • Retrieve a list of interfaces from a device (a router or switch) in the inventory of managed items.
Devices are associated with a tenant. If you are not deploying multi-tenancy, devices are associated with the Default Tenant. Retrieve a list of devices that are associated with your tenant by running the
getlist
method to the root
/devices/
.
Verify the Prerequisites
  • You have connected the REST client that you will use to invoke the PC web services to the PC RESTful web services.
  • You are a local admin user.
Access the devices Web Service Documentation
As a local admin user, issue the following call to see the parameters for the
devices
web service:
http://
PC_host
:8181/pc/center/webservice/devices
You can do the following using by making calls to the
devices
web service:
As a local admin user, issue the following call to see a list of supported operations:
http://
PC_host
:8181/pc/center/rest/devices/documentation
Available GET Methods
Issue these calls as a local admin user.
  • get list
    Gets a list of devices that belong to the tenant of the logged-in user.
    http://
    PC_host
    :8181/pc/center/webservice/devices
  • get interfaces
    Gets a list of all interfaces that belong to a specified device.
    http://
    PC_host
    :8181/pc/center/webservice/devices/{
    idName
    }/{
    idValue
    }/interfaces
You can retrieve a list of internally assigned identifiers that can you can use in other methods to identify devices using the following URL:
http://
PC_host
:8181/pc/center/webservice/devices/
idNames
Or you can retrieve a list that is filtered by tenant and by device subtype as follows:
http://
PC_host
:8181/pc/center/webservice/devices/subtype/tenant/tenantIdName/tenantIdValue
The
subtype
parameter further describes the device. For example, the server, switch, and router subtypes identify devices, while an interface can have subtype "physical" or "virtual".
You can retrieve a list of group members that includes their subtype by issuing a GET operation to the following URL for the
groups
web service:
http://
PC_host
:8181/pc/center/webservice/groups/{
idName
}/{
idValue
}/items
For more information about the
groups
web service, see Groups Web Service.