REST Resources

/api/space/device-management/device-discovery-rules/{id}

The following operations are supported on this resource:

  • GET - This API will return individual discovery rule
  • PUT - update DiscoveryDeviceTargetEntity
  • PATCH - Partial updates to a devicediscoveryrule
GET /device-discovery-rules/{id}Version 6

This API will return individual discovery rule.

Sample Usage

GET /device-discovery-rules/{id}


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    idIntegerPathID Y
  • Sample Output XML:
    <device-discovery-rule
         href="/api/space/device-management/device-discovery-rules/2788321" uri="/api/space/device-management/device-discovery-rules/2788321">
         <id>2788321</id>
         <discovery-profile-name>Discovery_Profile</discovery-profile-name>
         <target-details>DiscoverDevices.csv</target-details>
         <use-nat>false</use-nat>
         <use-ping>true</use-ping>
         <sharable>true</sharable>
         <use-snmp>false</use-snmp>
         <discovery-job-details href="/api/space/job-management/jobs/950469">
               <id>950469</id>
               <name>Discover Network Elements-950469</name>
               <scheduled-start-time-string>Fri, 28 Apr 2017 15:03:00 IST</scheduled-start-time-string>
               <schedule-string>Every day First occurrence: Apr 28, 2017 3:03:00 PM IST</schedule-string>
               <supports-recurrence>true</supports-recurrence>
         </discovery-job-details>
         <discovery-type>IMPORT_BY_CSV</discovery-type>
         <device-targets>
               <device-target>
                   <id>2788124</id>
                   <ip-address>192.168.2.100</ip-address>
                   <host-name>test</host-name>
                   <base-ip>192.168.1.1</base-ip>
                   <subnet-mask>24</subnet-mask>
                   <lower-ip>192.168.3.1</lower-ip>
                   <upper-ip>192.168.3.10</upper-ip>
                   <tags>
                         <tag>CSV</tag>
                   </tags>
                   <device-ssh-credentials>
                         <device-ssh-credential>
                             <id>2788126</id>
                             <username>root</username>
                             <password>********</password>
                             <keybased>false</keybased>
                             <credential-type>CREDENTIAL_BASED</credential-type>
                         </device-ssh-credential>
                   </device-ssh-credentials>
                   <device-fingerprints>
                         <device-fingerprint>
                             <host-name>test</host-name>
                             <id>2788125</id>
                             <fingerprint>55:77:53:a6:b1:94:45:12:bc:01:9d:b8:2a:8a:0a:b8</fingerprint>
                         </device-fingerprint>
                   </device-fingerprints>
               </device-target>
         </device-targets>
         <device-snmp-version>SNMPV3</device-snmp-version>
         <device-snmp-details>
               <user-name>root</user-name>
               <snmp-auth-type>MD5</snmp-auth-type>
               <authentication-password>********</authentication-password>
               <privacy-type>AES128</privacy-type>
               <id>2788130</id>
               <privacy-password>********</privacy-password>
         </device-snmp-details>
         <domain-id>32769</domain-id>
         <domain-name>Global</domain-name>
         <discovery-action-additional-params>
               <discovery-action-additional-param>
                   <parameter>import-policy</parameter>
                   <parameter-value>false</parameter-value>
               </discovery-action-additional-param>
         </discovery-action-additional-params>
         <is-run-now>true</is-run-now>
    </device-discovery-rule>

  • Sample Output JSON:
    {
    "device-discovery-rule": {
       "@href": "/api/space/device-management/device-discovery-rules/2788321",
       "@uri": "/api/space/device-management/device-discovery-rules/2788321",
       "id": 2788321,
       "discovery-profile-name": "Discovery_Profile",
       "target-details": "DiscoverDevices.csv",
       "use-nat": false,
       "use-ping": true,
       "sharable": true,
       "use-snmp": false,
       "discovery-job-details": {
          "@href": "/api/space/job-management/jobs/950469",
          "id": 950469,
          "name": "Discover Network Elements-950469",
          "scheduled-start-time-string": "Fri, 28 Apr 2017 15:03:00 IST",
          "schedule-string": "Every day First occurrence: Apr 28, 2017 3:03:00 PM IST",
          "supports-recurrence": true
       },
       "discovery-type": "IMPORT_BY_CSV",
       "device-targets": {
          "device-target": {
             "id": "2788124",
             "ip-address": "192.168.2.100",
             "host-name": "test",
             "base-ip": "192.168.1.1",
             "subnet-mask": "24",
             "lower-ip": "192.168.3.1",
             "upper-ip": "192.168.3.10",
             "tags": {
                "tag": "CSV"
             },
             "device-ssh-credentials": {
                "device-ssh-credential": {
                   "id": "2788126",
                   "username": "root",
                   "password": "********",
                   "keybased": "false",
                   "credential-type": "CREDENTIAL_BASED"
                }
             },
             "device-fingerprints": {
                "device-fingerprint": {
                   "host-name": "test",
                   "id": "2788125",
                   "fingerprint": "55:77:53:a6:b1:94:45:12:bc:01:9d:b8:2a:8a:0a:b8"
                }
             }
          }
       },
       "device-snmp-version": "NOT_APPLICABLE",
       "device-snmp-details": {
          "snmpv1v2c-community": "public",
          "user-name": "root",
          "snmp-auth-type": "MD5",
          "authentication-password": "********",
          "privacy-type": "AES128",
          "id": "2788130",
          "privacy-password": "********"
       },
       "domain-id": 32769 ,
       "domain-name": "Global",
       "discovery-action-additional-params": {
          "discovery-action-additional-param": {
             "parameter": "import-policy",
             "parameter-value": "false"
          }
       },
       "is-run-now": "true"
    }
    }

  • Access Control

    The following capabilities are required to access this API: ReadDeviceDiscoveryProfiles

    PUT /device-discovery-rules/{id}Version 6

    update DiscoveryDeviceTargetEntity.

    Sample Usage

    This API makes an asynchronous method call; so, you can optionally specify queue and schedule parameters:

    PUT /device-discovery-rules/{id}?queue=<queue>&schedule=<schedule>


    Note: The queue URL denoted by <queue> must have been created already.


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      idIntegerPathID Y
      queueQueue URLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)N
      schedulecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N
  • Sample Input XML:
    <device-discovery-rule>
         <discovery-profile-name>DiscoveryProfile</discovery-profile-name>
         <target-details>DiscoverDevices.csv</target-details>
         <use-nat>false</use-nat>
         <use-ping>false</use-ping>
         <sharable>false</sharable>
         <use-snmp>true</use-snmp>
         <discovery-type>IMPORT_BY_CSV</discovery-type>
         <device-targets>
               <device-target>
                   <ip-address>192.168.1.100</ip-address>
                   <host-name>test</host-name>
                   <base-ip>192.168.2.1</base-ip>
                   <subnet-mask>24</subnet-mask>
                   <lower-ip>192.168.3.1</lower-ip>
                   <upper-ip>192.168.3.100</upper-ip>
                   <tags>
                         <tag>csv_tag</tag>
                   </tags>
                   <device-ssh-credentials total="1">
                         <device-ssh-credential>
                             <username>root</username>
                             <password>********</password>
                             <keybased>false</keybased>
                             <credential-type>CREDENTIAL_BASED</credential-type>
                             <pass-phrase>test_phrase</pass-phrase>
                             <private-key>MIIEogIBAAKCAQEAxzybh9VkWiJ0gN0O4o</private-key>
                         </device-ssh-credential>
                   </device-ssh-credentials>
                   <device-fingerprints total="1">
                         <device-fingerprint>
                             <host-name>test</host-name>
                             <fingerprint>55:77:53:a6:b1:94:45:12:bc:01:9d:b8:2a:8a:0a:b8</fingerprint>
                         </device-fingerprint>
                   </device-fingerprints>
               </device-target>
         </device-targets>
         <device-snmp-version>NOT_APPLICABLE</device-snmp-version>
         <device-snmp-details>
               <snmpv1v2c-community>public</snmpv1v2c-community>
               <user-name>root</user-name>
               <snmp-auth-type>MD5</snmp-auth-type>
               <authentication-password>*******</authentication-password>
               <privacy-type>AES128</privacy-type>
               <id>23232</id>
               <privacy-password>********</privacy-password>
         </device-snmp-details>
         <discovery-action-additional-params>
               <discovery-action-additional-param>
                   <parameter>import-policy;</parameter>
                   <parameter-value>false</parameter-value>
               </discovery-action-additional-param>
         </discovery-action-additional-params>
    </device-discovery-rule>

  • Sample Output XML:
    <task href="/api/space/job-management/jobs/1081360">
      <id>1081360</id>
    </task>

  • Sample Input JSON:
    {
       "device-discovery-rule" : {
         "discovery-profile-name" : "DiscoveryProfile" ,
         "target-details" : "DiscoverDevices.csv" ,
         "use-nat" : "false" ,
         "use-ping" : "false" ,
         "sharablep" : "true" ,
         "use-snmp" : "true" ,
         "discovery-type" : "IMPORT_BY_CSV" ,
         "device-targets" : {
           "device-target" : {
             "ip-address" : "192.168.1.100" ,
             "host-name" : "test" ,
             "base-ip" : "192.168.2.1" ,
             "subnet-mask" : "24" ,
             "lower-ip" : "192.168.3.1" ,
             "upper-ip" : "192.168.3.100" ,
             "device-ssh-credentials" : {
               "@total" : "1" ,
               "device-ssh-credential" : {
                 "username" : "root" ,
                 "password" : "*******" ,
                 "keybased" : "false" ,
                 "credential-type" : "CREDENTIAL_BASED" ,
                 "pass-phrase" : "test_phrase" ,
                 "private-key" : "MIIEogIBAAKCAQEAxzybh9VkWiJ0gN0O4o" ,
               }
             } ,
             "device-fingerprints" : {
               "@total" : "1" ,
               "device-fingerprint" : {
                 "host-name" : "test" ,
                 "fingerprint" : "55:77:53:a6:b1:94:45:12:bc:01:9d:b8:2a:8a:0a:b8"
               }
             }
           }
         } ,
         "device-snmp-version" : "NOT_APPLICABLE" ,
         "device-snmp-details" : {
           "snmpv1v2c-community" : "public" ,
           "user-name" : "root" ,
           "snmp-auth-type" : "MD5" ,
           "authentication-password" : "********" ,
           "privacy-type" : "AES128" ,
           "id" : "Integer" ,
           "privacy-password" : "*******"
         },
         "discovery-action-additional-params": {
           "discovery-action-additional-param": {
             "parameter": "import-policy",
             "parameter-value": "false"
           }
         }
       }
    }

  • Sample Output JSON:
    {
      "task":{
        "@href":"/api/space/job-management/jobs/1081360",
        "id":1081360
      }
    }

  • Access Control

    The following capabilities are required to access this API: ModifyDeviceDiscoveryProfile

    PATCH /device-discovery-rules/{id}Version 6

    Partial updates to a devicediscoveryrule.

    Sample Usage

    PATCH /device-discovery-rules/{id}


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      idIntegerPathID Y
  • Sample Patch XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <diff>
       <!--What you see below are just samples of patch operations that may be performed on this DTO.-->
       <!--For more information about patch document format please look at http://http://www.rfc-editor.org/rfc/rfc5261.txt-->
       <replace sel="device-discovery-rule/discovery-profile-name">
           <discovery-profile-name>Discovery_Profile</discovery-profile-name>
       </replace>
       <replace sel="device-discovery-rule/target-details">
           <target-details>192.168.1.100</target-details>
       </replace>
       <replace sel="device-discovery-rule/use-nat">
           <use-nat>false</use-nat>
       </replace>
       <replace sel="device-discovery-rule/use-ping">
           <use-ping>false</use-ping>
       </replace>
       <replace sel="device-discovery-rule/sharable">
           <sharable>true</sharable>
       </replace>
       <replace sel="device-discovery-rule/use-snmp">
           <use-snmp>false</use-snmp>
       </replace>
       <replace sel="device-discovery-rule/discovery-type">
           <discovery-type>IMPORT_BY_CSV</discovery-type>
       </replace>
       <replace sel="device-discovery-rule/device-targets">
           <device-targets>
             <device-target>
                 <ip-address>3.3.3.3</ip-address>              <device-ssh-credentials>
                   <device-ssh-credential>
                       <id>2785813</id>
                       <username>root</username>
                       <password>********</password>
                       <credential-type>CREDENTIAL_BASED</credential-type>                </device-ssh-credential>
                 </device-ssh-credentials>
             </device-target>
           </device-targets>
       </replace>
       <replace sel="device-discovery-rule/device-snmp-version">
           <device-snmp-version>NOT_APPLICABLE</device-snmp-version>
       </replace>
       <replace sel="device-discovery-rule/device-snmp-details">
           <device-snmp-details>
             <snmpv1v2c-community>public</snmpv1v2c-community>
             <user-name>root</user-name>
             <snmp-auth-type>MD5</snmp-auth-type>
             <authentication-password>********</authentication-password>
             <privacy-type>AES128</privacy-type>
             <privacy-password>********</privacy-password>
           </device-snmp-details>
       </replace>
       <replace sel="device-discovery-rule/discovery-action-additional-params">
           <discovery-action-additional-params>
             <discovery-action-additional-param>
                 <parameter>import-policy</parameter>
                 <parameter-value>false</parameter-value>
             </discovery-action-additional-param>
           </discovery-action-additional-params>
       </replace>
    </diff>

  • Sample Output XML:
    <device-discovery-rule
         href="/api/space/device-management/device-discovery-rules/2326538" uri="/api/space/device-management/device-discovery-rules/2326538">
         <id>2326538</id>
         <discovery-profile-name>Discovery_Profile</discovery-profile-name>
         <target-details>192.168.1.100</target-details>
         <use-nat>false</use-nat>
         <use-ping>false</use-ping>
         <sharable>false</sharable>
         <use-snmp>false</use-snmp>
         <discovery-type>IMPORT_BY_CSV</discovery-type>
         <device-targets>
               <device-target>
                   <ip-address>3.3.3.3</ip-address>
                   <host-name>test</host-name>
                   <base-ip>192.168.1.100</base-ip>
                   <subnet-mask>24</subnet-mask>
                   <lower-ip>192.168.2.1</lower-ip>
                   <upper-ip>192.168.2.10</upper-ip>
                   <tags>
                         <tag>Discovery Profile</tag>
                   </tags>
                   <device-ssh-credentials total="1">
                         <device-ssh-credential>
                             <id>2785813</id>
                             <username>root</username>
                             <password>********</password>
                             <keybased>false</keybased>
                             <credential-type>CREDENTIAL_BASED</credential-type>
                             <pass-phrase>String</pass-phrase>
                             <private-key>String</private-key>
                         </device-ssh-credential>
                   </device-ssh-credentials>
                   <device-fingerprints total="1">
                         <device-fingerprint>
                             <host-name>test</host-name>
                             <fingerprint>55:77:53:a6:b1:94:45:12:bc:01:9d:b8:2a:8a:0a:b8</fingerprint>
                         </device-fingerprint>
                   </device-fingerprints>
               </device-target>
         </device-targets>
         <device-snmp-version>NOT_APPLICABLE</device-snmp-version>
         <device-snmp-details>
               <snmpv1v2c-community>public</snmpv1v2c-community>
               <user-name>root</user-name>
               <snmp-auth-type>MD5</snmp-auth-type>
               <authentication-password>********</authentication-password>
               <privacy-type>AES128</privacy-type>
               <privacy-password>********</privacy-password>
         </device-snmp-details>
         <domain-id>32769</domain-id>
         <domain-name>Global</domain-name>
         <discovery-action-additional-params>
               <discovery-action-additional-param>
                   <parameter>import-policy</parameter>
                   <parameter-value>false</parameter-value>
               </discovery-action-additional-param>
         </discovery-action-additional-params>
    </device-discovery-rule>

  • Sample Output JSON:
    {
       "device-discovery-rule" : {
         "@href" : "/api/space/device-management/device-discovery-rules/2326538" ,
         "@uri" : "/api/space/device-management/device-discovery-rules/2326538" ,
         "id" : "2326538" ,
         "discovery-profile-name" : "Discovery_Profile" ,
         "target-details" : "192.168.1.100" ,
         "use-ping" : "false" ,
         "use-snmp" : "false" ,
         "use-nat" : "false" ,
         "discovery-type" : "IMPORT_BY_CSV" ,
         "device-targets" : {
           "device-target" : {
             "ip-address" : "3.3.3.3" ,
             "host-name" : "test" ,
             "base-ip" : "192.168.1.100" ,
             "subnet-mask" : "24" ,
             "lower-ip" : "192.168.2.1" ,
             "upper-ip" : "192.168.2.10" ,
             "device-ssh-credentials" : {
               "@total" : "1" ,
               "device-ssh-credential" : {
                 "id" : "2785813" ,
                 "username" : "root" ,
                 "password" : "********" ,
                 "keybased" : "false"
               }
             } ,
             "device-fingerprints" : {
               "@total" : "1" ,
               "device-fingerprint" : {
                 "host-name" : "test" ,
                 "id" : "Integer" ,
                 "fingerprint" : "55:77:53:a6:b1:94:45:12:bc:01:9d:b8:2a:8a:0a:b8"
               }
             }
           }
         } ,
         "device-snmp-version" : "NOT_APPLICABLE" ,
         "device-snmp-details" : {
           "snmpv1v2c-community" : "public" ,
           "user-name" : "root" ,
           "snmp-auth-type" : "MD5" ,
           "authentication-password" : "********" ,
           "privacy-type" : "AES128" ,
           "privacy-password" : "********"
         } ,
         "domain-id" : "32769" ,
         "domain-name" : "Global" ,
         "discovery-action-additional-params": {
           "discovery-action-additional-param": {
             "parameter": "import-policy",
             "parameter-value": "false"
           }
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: AddDeviceDiscoveryProfile, CloneDeviceDiscoveryProfile, ModifyDeviceDiscoveryProfile, DeleteDeviceDiscoveryProfiles