Search for Object

Search for objects that are already discovered in AppViewX to monitor or to perform actions on it. This API will return results based on the resources assigned to the user.

Before you begin

Before attempting to search for objects with this API, users must ensure the ACF permission is available:
  • ADC > ControlCenter > Infrastructure view
This can be checked under Accounts > Role > Authorized Functions.

Request Structure

Endpoint: /adc-objects-search
Type: POST
Sample URL: https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-objects-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

(Mandatory) Contains all the params to be sent in the request body for the post request. See Payload section for more details.

Payload

Name Mandatory Description Field Type Constraints
input

Key value pair

Yes (Mandatory) Input filter key and value to perform the search. Multiple key and value pairs can also be mentioned. Possible values: Input
filterKey value pair No (Optional) Filter params to be applied on response such as start,limit and sort. Key value pair Possible value: Filter

Response Structure

200 OK, returns string of type application/json with the following body params:
Name Description
response

String

Contains the requested objects config data.
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 More info in case of failure response.

Response

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

Object[]

List of objects from the database, that matches the input query.
totalRecords

Integer

Total no of records matching the search query.
obtainedRecords

Integer

Total no of records returned considering the filter query.
obtainedRecordRange.start

Integer

Start index for the range of records returned considering the filter query.
obtainedRecordRange.end

Integer

End index for the range of records returned considering the filter query.

Status Codes

HTTP Status Code appStatusCode Message Possible Remediation
200 OK - Matching results found for the given input. -
400 Bad request ADC_OBJECT_SEARCH_001 Invalid search input. Check and ensure if a valid value is given in the request payload field - input.
400 Bad Request ADC_OBJECT_SEARCH_003 Invalid object type. Given object type value under request payload field ‘objectType’ is not supported.
400 Not Found ADC_OBJECT_SEARCH_005 Device not found. Check if the device name given in the payload request field - deviceName is valid and is available in inventory.
404 Not Found ADC_OBJECT_SEARCH_004 No matching records found. No results were found for the given search query. Refine the search query.

Input Keys

The following are the most commonly used keys to search for an object managed in AppViewX. Apart from these, there are more keys that are available in the database parsed against each object, that can be used as a search param.
Name Description
deviceName

String

(Optional) Name of the device added in inventory.

It can contain only alphanumeric characters, ‘-’ , ’_’ , ‘.’ , ‘*’ , ‘|’, ‘!’.

objectType

String

(Optional) ObjectType to query. Possible values of objectTypes can be found here.
vendor

String

(Optional) Vendor of the device. Eg.: F5, AVI, etc.
destinationIp

String

(Optional) Field denoting the IP of the virtual server object in F5.

The IP address must be in IPv4 format.

destinationPort

String

(Optional) Field denoting the port of virtual server object in F5.

It must be between 1 and 65535.

partition

String

(Optional) Partition of the object.

It must contain alphanumeric values, ‘-’ ,’.’, ‘_’ and space.

name

String

(Optional) Name of the object.
ip

String

(Optional) IP value of the object.

The IP address must be in IPV4 format.

Filter Keys

Name Description
start

Integer

(Optional) Start index of the response to the display. The default value is taken as 0.
max

Integer

(Optional) Number of entries from a start index to display. The default value is taken as 99.

Max = 100

sortColumn

String

(Optional) Column on which sort is to be applied.

Possible Values are "displayName", "name", and "sortLevel".

sortOrder

String

(Optional) Sorting order. Possible values: asc,desc.

Sample Request/Response

Use Case

View all the Wide IPs in the system with the name testGw.com.

Request URL

https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-objects-search?gwsource=external

Sample Request
{
  "payload": {
    "input": {
      "objectType": "WideIp",
      "name": "testGw.com"
    },
    "filter": {
      "start": 1,
      "max": 100,
      "sortColumn": "displayName",
      "sortOrder": "asc"
    }
  }
}
Sample Response
{
  "response": {
    "objects": [
      {
        "alias": "",
        "code": "gw",
        "color": "AVAILABILITY_STATUS_BLUE",
        "configData": "gtm wideip /Common/testGw.com {\n    pools {\n        /Common/asdf {\n            order 0\n            ratio 4\n        }\n    }\n}\n",
        "dashboardObjectName": "testGw.com(192.168.40.150)",
        "description": "",
        "deviceId": "5f36bed67620c40e97e30348",
        "displayName": "testGw.com/192.168.40.150/F5",
        "gp": [
          "gp:@5f36bed67620c40e97e30348:@asdf:@Common"
        ],
        "ipv6NoErrorNegTtl": "",
        "ipv6NoErrorResponse": "disabled",
        "last-resort-pool": "none",
        "lbmode": "round-robin",
        "name": "testGw.com",
        "partition": "Common",
        "persistCidrIpv4": "",
        "persistCidrIpv6": "",
        "persistence": "DISABLED_PERSISTENCE",
        "persistenceTtl": "",
        "poolPropertyMap": {      

        },
        "status": "ENABLED",
        "statusCode": "UNKNOWN ENABLED",
        "vendor": "F5",
        "resource_id": "gw:@5f36bed67620c40e97e30348:@testGw.com:@Common"
      }
    ],
    "totalRecords": 1,
    "obtainedRecords": 1,
    "obtainedRecordRange": {
      "start": 1,
      "end": 1
    }
  },
  "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