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
- ADC > ControlCenter > Infrastructure view
Request Structure
| Endpoint: | /adc-objects-search |
| Type: | POST |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-objects-search?gwsource=externalTo understand the elements of the sample URL, click here. |
| Headers: | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId
|
(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
|
(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
|
(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
|
(Mandatory) Specifies the format of the data in the
payload. Type: String Constraints: The value of this param must be ‘application/json’. |
| gwsource
|
(Mandatory) Specifies the source from which the request is
triggered. The options are:
|
| payload
|
(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
|
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
| Name | Description |
|---|---|
| response
|
Contains the requested objects config data. |
| message
|
Success message or failure description in case of error. |
| appStatusCode
|
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
|
List of objects from the database, that matches the input query. |
| totalRecords
|
Total no of records matching the search query. |
| obtainedRecords
|
Total no of records returned considering the filter query. |
| obtainedRecordRange.start
|
Start index for the range of records returned considering the filter query. |
| obtainedRecordRange.end
|
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
| Name | Description |
|---|---|
| deviceName
|
(Optional) Name of the device added in inventory. It can contain only alphanumeric characters, ‘-’ , ’_’ , ‘.’ , ‘*’ , ‘|’, ‘!’. |
| objectType
|
(Optional) ObjectType to query. Possible values of objectTypes can be found here. |
| vendor
|
(Optional) Vendor of the device. Eg.: F5, AVI, etc. |
| destinationIp
|
(Optional) Field denoting the IP of the virtual server object in F5. The IP address must be in IPv4 format. |
| destinationPort
|
(Optional) Field denoting the port of virtual server object in F5. It must be between 1 and 65535. |
| partition
|
(Optional) Partition of the object. It must contain alphanumeric values, ‘-’ ,’.’, ‘_’ and space. |
| name
|
(Optional) Name of the object. |
| ip
|
(Optional) IP value of the object. The IP address must be in IPV4 format. |
Filter Keys
| Name | Description |
|---|---|
| start
|
(Optional) Start index of the response to the display. The default value is taken as 0. |
| max
|
(Optional) Number of entries from a start index to display. The default value is taken as 99. Max = 100 |
| sortColumn
|
(Optional) Column on which sort is to be applied. Possible Values are "displayName", "name", and "sortLevel". |
| sortOrder
|
(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.
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-objects-search?gwsource=external
{
"payload": {
"input": {
"objectType": "WideIp",
"name": "testGw.com"
},
"filter": {
"start": 1,
"max": 100,
"sortColumn": "displayName",
"sortOrder": "asc"
}
}
}{
"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
- 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.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
- 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.