Device Management API

/api/space/device-management/discover-devices

The following operations are supported on this resource:

POST /api/space/device-management/discover-devices (v2)


This API is used to discover devices. This API does not need a discovery rule name.

Access Control

The following capabilities are required to access this API:
"DiscoverDevices"


Example Usage

Since this API makes an asynchronous method call, the user must specify a queue parameter with this API.

POST /api/space/device-management/discover-devices?queue-url=<queue-url>&schedule-time=<schedule-time>

Note: It is assumed that the queue denoted by <queue-url> has, already, been created.



Parameters

NameTypeURI TypeDescriptionRequired
queue-urlURLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)Y
schedule-timecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N

Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.device-management.discover-devices+xml;version=2;charset=UTF-8
    application/vnd.net.juniper.space.device-management.discover-devices+json;version=2;charset=UTF-8


  • Produces content types:
    application/vnd.net.juniper.space.device-management.discover-devices+xml;version=2
    application/vnd.net.juniper.space.device-management.discover-devices+json;version=2


  • Sample Input XML:

    <discover-devices>
        <hostNameDiscoveryTarget>
          <hostName>DWUS2B038</hostName>
        </hostNameDiscoveryTarget>
      <usePing>true</usePing>
      <useSnmp>true</useSnmp>
      <snmpV1Setting>
        <communityName>testCommunityName</communityName>
      </snmpV1Setting>
      <manageDiscoveredSystemsFlag>true</manageDiscoveredSystemsFlag>
      <sshCredential>
        <userName>test</userName>
        <password>password12</password>
      </sshCredential>
    </discover-devices>

    Sample Input using snmpV3Setting
    <discover-devices>
      <ipAddressDiscoveryTarget>
        <exclude>false</exclude>
        <ipAddress>192.168.21.9</ipAddress>
      </ipAddressDiscoveryTarget>
      <usePing>false</usePing>
      <useSnmp>true</useSnmp>
      <snmpV3Setting>
        <userName>test</userName>
        <authenticationType>MD5</authenticationType>
        <privacyType>AES128</privacyType>
        <authenticationPassword>password12</authenticationPassword>
        <privacyPassword>password12</privacyPassword>
      </snmpV3Setting>
      <manageDiscoveredSystemsFlag>true</manageDiscoveredSystemsFlag>
      <sshCredential>
        <userName>test</userName>
        <password>password12</password>
      </sshCredential>
    </discover-devices>


  • Sample Output XML:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <task>
        <id>720908</id>
      </task>


  • Sample Input JSON:

    {
    "discover-devices":
       {
       "ipAddressDiscoveryTarget": { "exclude":false, "ipAddress":"192.168.1.1" },
       "usePing":true,
       "useSnmp":true,
       "snmpV2CSetting": { "communityName":"public" },
       "manageDiscoveredSystemsFlag":true,
       "sshCredential": { "userName":"test", "password":"password12" }
       }
    }

    Sample Input using snmpV3Setting

    {
    "discover-devices":
       {
       "ipAddressDiscoveryTarget": { "exclude":false, "ipAddress":"192.168.1.1" },
       "usePing":false,
       "useSnmp":true,
       "snmpV3Setting":
          {
          "userName":"test", "authenticationType":"MD5", "privacyType":"AES128",
          "authenticationPassword":"password12", "privacyPassword":"password12"
          },
       "manageDiscoveredSystemsFlag":true,
       "sshCredential": { "userName":"test", "password":"password12"},
       }
    }


  • Sample Output JSON:

    {
    "task":
       {
       "id":1245226
       }
    }



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