Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation  Back up to About Overview 
ContentIndex
  
[+] Expand All
[-] Collapse All

Discover Devices RESTful Web Services

The following operations can be performed using the Edge Services Director Discover Devices RESTful Web Services.

Create a Discovery Profile

This request is used to create a discovery profile.

URI

/api/sgd/sdgmgmt/discovery-profile/createDiscoveryProfile

HTTP Method

PUT

Content-Type

application/vnd.net.juniper.space.sdgmgmt.discovery-
profile.createDiscoveryProfile+json;version=1;charset=UTF-8

Consumes

None

Produces

Creates a discovery profile

Response Status Code

Message

Description

200 OK

Successful creation of the discovery profile

Input

Sample JSON Input

{ "SGDDiscoveryProfile" : { "description" : "test",
      "hostNameDiscoveryTarget" : [  ],
      "ipAddressDiscoveryTarget" : [ { "ipAddress" : "10.213.2.219" } ],
      "ipRangeDiscoveryTarget" : [  ],
      "name" : "sample",
      "snmpv2cSetting" : [ { "communityString" : "public" } ],
      "snmpv3cSetting" : [  ],
      "sshCredential" : [ { "password" : "password",
            "userName" : "user"
          } ],
      "subnetMaskDiscoveryTarget" : [  ]
    } }

Modify a Discovery Profile

This request is used to modify a discovery profile.

URI

/api/sgd/sdgmgmt/discovery-profile/modifyDiscoveryProfile

HTTP Method

PUT

Content-Type

application/vnd.net.juniper.space.sdgmgmt.discovery-
profile.modifyDiscoveryProfile+json;version=1;charset=UTF-8

Consumes

None

Produces

Modifies an existing discovery profile

Response Status Code

Message

Description

200 OK

Successful update of the discovery profile

Input

Sample JSON Input

{ "SGDDiscoveryProfile" : { "MOID" : "net.juniper.jmp.sgd.discovery.profile.SGDDiscoveryProfileMO:622790",
      "description" : "MX480w",
      "hostNameDiscoveryTarget" : [  ],
      "ipAddressDiscoveryTarget" : [ { "ipAddress" : "10.213.2.220" } ],
      "ipRangeDiscoveryTarget" : [  ],
      "name" : "MX480w",
      "snmpv2cSetting" : [ { "communityString" : "public" } ],
      "snmpv3cSetting" : [  ],
      "sshCredential" : [ { "password" : "password",
            "userName" : "user"
          } ],
      "subnetMaskDiscoveryTarget" : [  ]
    } }

Delete a Discovery Profile

This request is used to delete a discovery profile.

URI

/api/sgd/sdgmgmt/discovery-profile/deleteDiscoveryProfile

HTTP Method

PUT

Content-Type

application/vnd.net.juniper.space.sdgmgmt.discovery-
profile.deleteDiscoveryProfile+json;version=1;charset=UTF-8

Consumes

None

Produces

Deletes an existing discovery profile

Response Status Code

Message

Description

200 OK

Successful deletion of the discovery profile

Input

Sample JSON Input

net.juniper.jmp.sgd.discovery.profile.SGDDiscoveryProfileMO:560956

Get All Discovery Profiles

This request is used to retrieve all the discovery profiles.

URI

/api/sgd/sdgmgmt/discovery-profile/getAllDiscoveryProfiles

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.discovery-
profile.getAllDiscoveryProfiles+json;version=1;charset=UTF-8

Consumes

None

Produces

Collects all discovery profiles

Response Status Code

Message

Description

200 OK

Successful collection of the discovery profiles

Output

Sample JSON Output

Get a Discovery Profile by Profile Name

This request is used to collect a particular discovery profile.

URI

/api/sgd/sdgmgmt/discovery-profile/{profileId}

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.discovery-
profile.profileId+json;version=1;charset=UTF-8

Consumes

None

Produces

Obtain a discovery profile based on profile ID.

Response Status Code

Message

Description

200 OK

Successful retrieval of a specific discovery profile

Output

Sample JSON Output

 

Discover a Device

This request is used to initiate or run a discovery profile to discover the devices specified in it.

URI

/api/sgd/sdgmgmt/host-discovery/initiateDiscovery

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sdgmgmt.host-
discovery.initiateDiscovery+json;version=1;charset=UTF-8

Consumes

None

Produces

Discover an SDG

Response Status Code

Message

Description

200 OK

Successful discovery of an SDG device

Input

Sample JSON Input

net.juniper.jmp.sgd.discovery.profile.jpa.SGDDiscoveryProfileEntity:600076

View the Discovery Audit Log

This request is used to view the discovery audit log of all unmanaged devices.

URI

/api/sgd/sdgmgmt/discovery-
auditlog/getAllSDGHostDiscoveryAuditLog
?hostName={hostName}

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.discovery-
auditlog.getAllSDGHostDiscoveryAuditLog
?hostName={hostName}+json;version=1;charset=UTF-8

Consumes

None

Produces

Displays the discovery audit log

Response Status Code

Message

Description

200 OK

Successful display of the audit log of discovered devices

Output

Sample JSON Output

Cancel a Discovery Job

This request is used to cancel a previously scheduled or an in-progress discovery job.

URI

/api/sgd/sdgmgmt/host-discovery/cancelDiscovery?
discoveryProgressId=<ID>

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.host-discovery
cancelDiscovery?discoveryProgressId=<ID>
+json;version=1;charset=UTF-8

Consumes

None

Produces

Cancels a discovery job that is in progress

Response Status Code

Message

Description

200 OK

Successful cancellation of a discovery job

Output

Sample JSON Output

Resynchronizing the Configuration of all SDG Devices

This request is used to resynchronize the configuration of all SDGs.

URI

/api/sgd/sdgmgmt/host-discovery/resyncSDGHosts

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.
host-discovery.resyncSDGHosts
+json;version=1;charset=UTF-8

Consumes

None

Produces

Resynchronizes the configuration of all SDGs.

Response Status Code

Message

Description

200 OK

Successful resynchronization of the configuration of all SDGs.

Output

Sample JSON Output

Resynchronizing the Configuration of Specific SDG Devices

This request is used to resynchronize the configuration of SDGs based on their device IDs.

URI

/api/sgd/sdgmgmt/host-discovery/
resyncSDG?sdgId=<ID>

HTTP Method

POST

Content-Type

application/vnd.net.juniper.space.sdgmgmt.
host-discovery.resyncSDG?sdgId=<ID>
+json;version=1;charset=UTF-8

Consumes

None

Produces

Resynchronizes the configuration of specified SDGs.

Response Status Code

Message

Description

200 OK

Successful resynchronization of the configuration of the specified SDGs.

Input

Sample JSON Input

[ID1, ID2, ID3,...]

Scheduling the Discovery of SDG Devices

This request is used to schedule the discovery of SDG devices.

URI

/api/sgd/sdgmgmt/host-discovery/scheduleDiscovery?moid=<ID>
&schedule=<EPOCH Time>

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.
host-discovery.scheduleDiscovery?
moid=<ID>&schedule=<EPOCH Time>
+json;version=1;charset=UTF-8

Consumes

None

Produces

Schedules the discovery of specified SDGs.

Response Status Code

Message

Description

200 OK

Successful discovery of specified SDGs.

Output

Sample JSON Output

Searching for Discovered SDG Devices

This request is used to search for discovered of SDG devices.

URI

/api/sgd/sdgmgmt/host-discovery/searchDiscoveredHosts?
searchField=<SEARCH_FIELD>&searchValue=<VALUE>

HTTP Method

GET

Content-Type

application/vnd.net.juniper.space.sdgmgmt.
host-discovery.searchDiscoveredHosts?
searchField=<SEARCH_FIELD>&searchValue=<VALUE>
+json;version=1;charset=UTF-8

Consumes

None

Produces

Lists the discovered SDGs that match the criteria.

Response Status Code

Message

Description

200 OK

List of discovered SDGs that match the criteria.

Output

Sample JSON Output

Modified: 2016-08-02