REST Resources

/api/space/device-management/devices

The following operations are supported on this resource:

GET /devicesVersion 2

This API retrieves all devices. It returns device attributes along with a link to individual device information. It supports filtering, sorting, and paging.

Note: Filtering on the 'ipAddr', 'managedStatus' and 'connectionStatus' field works ONLY for the 'eq' operation. For example, filter=(ipAddr eq '192.168.21.9').

Filtering is supported on the following fields:

  • name
  • softwareRelease or OSversion
  • deviceFamily
  • SerialNumber
  • platform
  • managedStatus
  • connectionStatus
  • attribute-column-0

Sorting is supported on the following fields:

  • name
  • softwareRelease or OSversion
  • deviceFamily
  • SerialNumber
  • platform
  • ipAddr
  • managedStatus
  • connectionStatus
  • attribute-column-0
.

Sample Usage

GET /devices


  • Sample Output XML:

    <devices size="1" uri="/api/space/device-management/devices">
     <device key="229379" uri="/api/space/device-management/devices/229379"
     href="/api/space/device-management/devices/229379">
      <deviceFamily>junos-es</deviceFamily>
      <OSVersion>10.3R2.11</OSVersion>
      <platform>SRX100B</platform>
      <serialNumber>AT5109AF0621</serialNumber>
      <connectionStatus>up</connectionStatus>
      <ipAddr>192.168.21.9</ipAddr>
      <managedStatus>In Sync</managedStatus>
      <name>hsc-srx_200</name>
      <attribute-column-0>30/5432/112</attribute-column-0>
     </device>
    </devices>

  • Sample Output JSON:

    {
     "devices":{
      "@size":"1",
      "@uri":"/api/space/device-management/devices",
      "device":{
         "@key":"229379",
         "@uri":"/api/space/device-management/devices/229379",
         "@href":"/api/space/device-management/devices/229379" ,
         "deviceFamily":"junos-es",
         "OSVersion":"10.3R2.11",
         "platform":"SRX100B",
         "serialNumber":"AT5109AF0621",
         "connectionStatus":"up",
         "ipAddr":"192.168.21.9",
         "managedStatus":"In Sync",
         "attribute-column-0":"30/5432/112",
         "name":"hsc-srx_200"
      }
     }

  • Access Control

    The following capabilities are required to access this API: ReadDevices

      For the deprecated versions of this API, refer to :
    • version 1

    POST /devicesVersion 3

    Get Device By Ids.

    Sample Usage

    POST /devices


  • Sample Input XML:
    <device-by-ids-request/>

  • Sample Output XML:
    <device-by-ids total="Integer" uri="/api/space/device-management/devices">
         <device
               href="/api/space/managed-domain/devices-require-polling/{id}" uri="/api/space/device-management/devices/{id}">
               <OSVersion>String</OSVersion>
               <status>String</status>
               <lsys-count>Integer</lsys-count>
               <dev-admin>String</dev-admin>
               <software-release>String</software-release>
               <discovery-ip>String</discovery-ip>
               <hosting-deviceId>Integer</hosting-deviceId>
               <device-connection-type>String</device-connection-type>
               <newFingerprint>String</newFingerprint>
               <virtual-chassis-status>Boolean</virtual-chassis-status>
               <fingerprint>String</fingerprint>
               <ipAddr>String</ipAddr>
               <vendor>String</vendor>
               <device-uuid>
                   <category>String</category>
                   <service>String</service>
                   <row-id>Integer</row-id>
               </device-uuid>
               <adapter-name>String</adapter-name>
               <device-type>String</device-type>
               <device-ip>String</device-ip>
               <authentication-status>CREDENTIAL</authentication-status>
               <original-platform>String</original-platform>
               <platform>String</platform>
               <dev-admin-passwd>String</dev-admin-passwd>
               <staged-status-from-view>NOTSTAGED</staged-status-from-view>
               <domain-id>Integer</domain-id>
               <logical-interfaces>String</logical-interfaces>
               <matching-schema>String</matching-schema>
               <id>Integer</id>
               <name>String</name>
               <staged-status>NOTSTAGED</staged-status>
               <display-name>String</display-name>
               <domain-name>String</domain-name>
               <device-family>String</device-family>
               <config-status>DEVICE_STATE_AWAIT_1STCONNIM</config-status>
         </device>
    </device-by-ids>

  • Sample Input JSON:
    {
       "device-by-ids-request" : ""
    }

  • Sample Output JSON:
    {
       "device-by-ids" : {
         "@total" : "Integer" ,
         "@uri" : "/api/space/device-management/devices" ,
         "device" : {
           "@href" : "/api/space/managed-domain/devices-require-polling/{id}" ,
           "@uri" : "/api/space/device-management/devices/{id}" ,
           "OSVersion" : "String" ,
           "status" : "String" ,
           "lsys-count" : "Integer" ,
           "dev-admin" : "String" ,
           "software-release" : "String" ,
           "discovery-ip" : "String" ,
           "hosting-deviceId" : "Integer" ,
           "device-connection-type" : "String" ,
           "newFingerprint" : "String" ,
           "virtual-chassis-status" : "Boolean" ,
           "fingerprint" : "String" ,
           "ipAddr" : "String" ,
           "vendor" : "String" ,
           "device-uuid" : {
             "category" : "String" ,
             "service" : "String" ,
             "row-id" : "Integer"
           } ,
           "adapter-name" : "String" ,
           "device-type" : "String" ,
           "device-ip" : "String" ,
           "authentication-status" : "CREDENTIAL" ,
           "original-platform" : "String" ,
           "platform" : "String" ,
           "dev-admin-passwd" : "String" ,
           "staged-status-from-view" : "NOTSTAGED" ,
           "domain-id" : "Integer" ,
           "logical-interfaces" : "String" ,
           "matching-schema" : "String" ,
           "id" : "Integer" ,
           "name" : "String" ,
           "staged-status" : "NOTSTAGED" ,
           "display-name" : "String" ,
           "domain-name" : "String" ,
           "device-family" : "String" ,
           "config-status" : "DEVICE_STATE_AWAIT_1STCONNIM"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: ReadDevices