This is an archive version of the document. To get the most up-to-date information, see the current version.

Get Discovery Rules

In this article

    You can get a representation of a collection of discovery rules configured in Veeam Availability Console.

    Request

    To get a representation of all Veeam Availability Console discovery rules, send the GET HTTPS request to the URL of the /discoveryRules collection.

    HTTPS Request

    GET https://<Availability-Console>:1281/v2/discoveryRules

    Request Headers

    The request header must contain the authorization token for the current logon session.

    Response

    The server returns the following response to the client.

    Response Code

    A successfully completed operation returns response code 200 Success.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTP headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the request body message: application/json; charset=utf-8

    Response Body

    In the response body, Veeam Availability Console returns a representation of the /discoveryRules collection.

    Example Get Discovery Rules

    The following request returns all discovery rules configured in Veeam Availability Console.

    Request:

    GET https://localhost:1281/v2/discoveryRules

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response Code:

    200 Success

     

    Response Body:

    [

     {

       "id": 1,

       "name": "NetworkDiscovery",

       "companyId": 3,

       "locationId": 3,

       "accountName": "vac\\administrator",

       "instanceCount": 0,

       "onlineInstanceCount": 0,

       "offlineInstanceCount": 0,

       "state": "Running",

       "lastRun": "2017-08-31T16:38:11Z",

       "type": "NetworkBased",

       "exclusionMask": null,

       "_links": {

         "self": {

           "href": "https://vac.tech.local:1281/v2/discoveryRules/1"

         },

         "tenants": {

           "href": "https://vac.tech.local:1281/v2/tenants/2"

         }

       }

     },

     {

       "id": 7,

       "name": "AD Discovery",

       "companyId": 2,

       "locationId": 2,

       "accountName": "tech\\john.smith",

       "instanceCount": 60,

       "onlineInstanceCount": 27,

       "offlineInstanceCount": 33,

       "state": "Success",

       "lastRun": "2017-10-17T15:50:04.1563829Z",

       "type": "AD",

       "ignoreOfflineComputers": true,

       "exclusionMask": null,

       "adType": "SearchFromOU",

       "command": null,

       "_links": {

         "self": {

           "href": "https://vac.tech.local:1281/v2/discoveryRules/7"

         }

         "tenants": {

           "href": "https://vac.tech.local:1281/v2/tenants/2"

         }

       }

     }

    ]

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.