Search for Device

This API searches for ADC devices that are available in the inventory for any user.

Before you begin

Before attempting to search devices with this API, users must have the ACF permission
  • ADC > Inventory > View
This can be checked under Accounts > Role > Authorized Functions.

Request Structure

Endpoint: /adc-device-search
Type: POST
Sample URL: https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-device-search?gwsource=external

To understand the elements of the sample URL, click here.

Headers:
Content-Type: application/json
Table 1. Input Parameter
Name Description
sessionId

Header

(Mandatory) Specifies the session ID of the user session received after login.

Type: String

Constraints: The session ID is used when username and password are not provided.

username

Header

(Mandatory) Specifies the login username used to access the AppViewX.

Type: String

Constraints: The username, along with the password, is used when the session ID is not provided.

password

Header

(Mandatory) Specifies the login password used to access the AppViewX.

Type: String

Constraints: The password, along with the username, is used when the session ID is not provided.

Content-Type

Header

(Mandatory) Specifies the format of the data in the payload.

Type: String

Constraints: The value of this param must be ‘application/json’.

gwsource

Query

(Mandatory) Specifies the source from which the request is triggered. The options are:
  • web
  • external

Type: String

payload

Body

Contains all the params to be sent in the request body for the post request. See Payload details.

Type: Key value pair

Payload

Name Description
input

Key value pair

(Mandatory) Key value pair to search devices. The possible value is Input.
filter

Key value pair

(Optional) Filter params to be applied on response such as start,limit and sort. The possible value is Filter.

Response Structure

  • Status Code: 200 OK
  • Message: Successful
  • Headers:
    • Content-Type: application/json
Name Description
response

String

Success message or failure description in case of error.
message

String

Success message or failure description in case of error.
appStatusCode

String

Application specific status code for the response. Will be non-null for failure response.
tags

String

More info in case of failure response.

Status Codes

HTTP Status Code appStatusCode Message Possible remediation
200 OK - Matching results found for the given input. -
200 OK - No matching results found. -
400 Bad Request ADC_DEVICE_SEARCH_001 Invalid search input.
  • Check and ensure if non-null/non-empty value is given in field - ‘payload’.

  • Check and ensure if non-null/non-empty value is given under payload field - ‘input’.

Sample Request/Response

Use Case

Get the details of the class management widget with name classWgt under the dashboard test.

Request URL

https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-device-search

Sample Request
{
  "payload": {
    "input": {
      "vendor": "AVI",
      "haActive": "Active"
    }
  }
}
Sample Response
{
  "response": {
    "devices": [
      {
        "name": "192.168.40.161",
        "ip": "192.168.40.161",
        "fqdn": null,
        "deviceType": [
          "SLB",
          "GSLB"
        ],
        "module": [
          "SLB",
          "GSLB"
        ],
        "dataCenter": "CBE",
        "vendor": "AVI",
        "version": "v12",
        "detailedVersion": "12.0 build 56.20.nc",
        "subsystem": "LoadBalancer",
        "category": "ADC",
        "partition": [
          "default",
          "Other",
          "partition1@sted",
          "_partition-spl.=@sted",
          "API_SB_Test"
        ],
        "keywords": [
          "192.168.40.161",
          "192.168.40.161",
          "SLB",
          "GSLB",
          "CBE",
          "AVI",
          "v12",
          "12.0 build 56.20.nc",
          "Manual Entry",
          "Managed",
          "Active",
          "HE2H81UJ47",
          "22",
          "default",
          "Other",
          "partition1@sted",
          "_partition-spl.=@sted",
          "API_SB_Test",
          "API"
        ],
        "access": [
          {
            "accessType": "API",
            "userName": "nsroot",
            "password": "******",
            "credentialStoreId": null,
            "community": null,
            "snmpVersion": null,
            "key": "xxxxxx",
            "secondaryPassword": null,
            "secondaryPassKey": null,
            "accessToken": null,
            "url": null
          }
        ],
        "enablePassword": null,
        "enablePasswordKey": null,
        "sameCredential": false,
        "credentialType": "Manual Entry",
        "credentialName": "",
        "description": null,
        "status": "Managed",
        "objectSummary": [
          {
            "name": null,
            "object": "SLB Virtual Servers",
            "count": 138,
            "_id": null
          },
          {
            "name": null,
            "object": "CS Virtual Servers",
            "count": 50,
            "_id": null
          },
          {
            "name": null,
            "object": "GSLB Virtual Servers",
            "count": 153,
            "_id": null
          }
        ],
        "deviceStatusList": [
          {
            "title": "Device communication",
            "message": "Primary Device communication successful",
            "status": "Success",
            "timeStamp": 1597862177000
          },
          {
            "title": "Device provisioned modules check",
            "message": "Selected device type matches with the Provisioned Modules.",
            "status": "Success",
            "timeStamp": 1597862178000
          },
          {
            "title": "Downloading configuration file",
            "message": "Downloaded configuration file",
            "status": "Success",
            "timeStamp": 1597862224000
          },
          {
            "title": "Comparing the changes in configuration file",
            "message": "Configuration files changed.",
            "status": "Success",
            "timeStamp": 1597862228000
          },
          {
            "title": "Parsing downloaded SLB configuration file(s)",
            "message": "Objects added to AppViewX - Virtual Server:138, Service Group:97, Service Group Member:97, Service:36, CS VirtualServer:50, Server:329",
            "status": "Success",
            "timeStamp": 1597862228000
          },
          {
            "title": "Parsing downloaded GSLB configuration file(s)",
            "message": "Objects added to AppViewX - GSLB Virtual Server153, Service:44, Server:329",
            "status": "Success",
            "timeStamp": 1597862231000
          },
          {
            "title": "Subscription for syslog notifications from device",
            "message": "Registered with device for syslog subscription",
            "status": "Success",
            "timeStamp": 1597862249000
          }
        ],
        "registrationKey": null,
        "serialNumber": "HE2H81UJ47",
        "modelNumber": "1000",
        "expiryDate": null,
        "serviceCheck": null,
        "manageCertificate": "Managed",
        "csrfToken": null,
        "enableEvent": false,
        "deviceCommunicationPort": {
          "sshPort": 22,
          "httpsPort": 443
        },
        "lastConnectedIP": null,
        "lastRebootTime": "4:27AM  up 23 days",
        "haMode": null,
        "haActive": "Active",
        "highAvailability": [         

        ],
        "lastConnectedHAList": null,
        "synchronizationGroups": null,
        "synchronizationGroupsMode": null,
        "syncGroup": null,
        "syncStatus": null,
        "trafficGroups": null,
        "syncFailoverGroupName": "",
        "syncOnlyGroups": null,
        "autoSyncEnabled": false,
        "autoSyncNeeded": false,
        "primaryDeviceId": null,
        "childDevicesInfo": null,
        "parentDeviceId": null,
        "parentDeviceName": null,
        "deviceBackupSettings": {
          "name": null,
          "mode": null,
          "dayNumber": null,
          "dateNumber": null,
          "weekNumber": null,
          "month": null,
          "frequency": null,
          "startingFrom": null,
          "archiveCount": 5,
          "isDate": null,
          "isConfigBackUpEnabled": null,
          "configSettingsBackUpType": null,
          "configBackUpTime": null,
          "_id": null
        },
        "deviceGroups": [         

        ],
        "attributes": {
          "syslogHost": "192.168.142.156:5514"
        },
        "generalAlert": null,
        "thresholdAlert": null,
        "deviceUrl": null,
        "agentUrl": null,
        "devIndex": 0,
        "platform": null,
        "userAction": null,
        "model": null,
        "sessionId": null,
        "tmosVersion": null,
        "createdBy": "admin",
        "noDetect": false,
        "createdDateTime": 1597816172139,
        "lastModifiedBy": "system",
        "lastModifiedDateTime": 1597862279214,
        "associatedDevices": null,
        "deviceSyncStatus": null,
        "hostName": "AVI_12.0_standalone",
        "previousDeviceStatus": "Managed",
        "deviceCommunication": "Success",
        "localLBConfigUpdated": null,
        "localLBConfigDownload": "Success",
        "localLBConfigParsing": "Success",
        "globalLBConfigUpdated": null,
        "globalLBConfigDownload": "Success",
        "globalLBConfigParsing": "Success",
        "lastConfigUpdatedTime": 1597862279168,
        "communicationAddressType": "ip",
        "lastPostConfigTriggeredTime": 1597862279476,
        "regions": null,
        "accountNumber": null,
        "discoverySource": null,
        "deviceUpgraded": false,
        "postConfigFlag": false,
        "authToken": null,
        "tokenBasedAuthentication": false,
        "lastConfigFetchTriggeredTime": 1597816251693,
        "managementIp": null,
        "lastManagedTime": 1597862279168,
        "_id": "5f3cbd6cecd19733ebccc6fb",
        "vLans": null,
        "iHealthReport": null,
        "isPrimary": true,
        "isAutoDetect": true,
        "isSecondaryCommunication": false,
        "isHostedOnHypervisor": false
      }
    ],
    "totalRecords": 1,
    "obtainedRecords": 1,
    "obtainedRecordRange": {
      "start": 0,
      "end": 0
    }
  },
  "message": "Matching results found for the given input.",
  "appStatusCode": null,
  "tags": null,
  "headers": null
}

Reference

Understanding the sample URL:
  • IP/HostName/TenantName: Replace with the actual IP address, hostname, or tenant name based on the specific configuration in AppViewX.
    • IP: A unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication

      The IP address will be included in the endpoint URL for an on-prem deployment.

    • HostName: A human-readable label assigned to a device (host) on a network

      The hostname will be included in the endpoint URL for an on-prem deployment.

    • TenantName: An identifier label for a tenant given to indicate which tenant's data the API request will access/modify

      The tenant name will be included in the endpoint URL for a SaaS deployment.

  • GWPORT: AppViewX gateway port

    A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.

    Example: 31443

  • avxapi: Path parameter value (static) that is part of the endpoint's URL
  • Endpoint: Endpoint of the API, for example: execute-hook
  • gwsource: Source or origin of a gateway, for example: external.

What's Next