Managing discoveries using the REST API

You can use the REST API to start discovery and to manage discoveries, discovery profiles, and discovery scopes.

To use the REST API, complete one or more of the following steps:

  • To start discovery, use the discovery service resource sending POST request, specifying a name for the discovery run.
    You can use this resource to start discovery with or without a profile.
    For example, this HTML form starts discovery with the 'TestRun2' name by using the specified profile for specified scope.
    <form action="http://example.com:9430/rest/discovery/start/TestRun2" method="post">
         Profile: <input type="text" name="profile"><br>
         Scope: <input type="text" name="scope"><br>
         <input type="submit" value="Submit"></input>
    </form>
  • To check the current discovery status, use the discovery status resource, specifying either XML or JSON format for the output data.
    This example checks discovery status using JSON format:
    http://example.com/rest/discovery/status?feed=json
  • To retrieve a list of defined discovery profiles, use the discovery profile service resource, specifying either XML or JSON format for the output data.
    This example lists discovery profiles using XML format:
    http://example.com/rest/discovery/profiles?feed=xml
  • To retrieve details of a defined discovery profile, use the discovery profile resource, specifying either XML or JSON format for the output data.
    This retrieves details of the Level 3 Discovery profile using JSON format:
    http://example.com/rest/discovery/profile/Level%203%20Discovery?feed=json
  • To retrieve a list of defined discovery scopes, use the discovery scope service resource, specifying either XML or JSON format for the output data.
    This example lists discovery scopes using XML format:
    http://example.com/rest/discovery/scopes?feed=xml
  • To retrieve details of a defined discovery scope, use the discovery scope resource, specifying either XML or JSON format for the output data.
    This retrieves details of the scope1 scope using JSON format:
    http://example.com/rest/discovery/scope/scope1?feed=json