Fetch Discovery Status
The API will fetch discovery status information.
Before you begin
- Discovery should be present in AppViewX.
Request Structure
| Endpoint: | /ssh/discovery/status |
| Type: | POST |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/avxapi/ssh/discovery/status?gwsource=externalTo understand the elements of the sample URL, click here. |
| Headers: | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId
|
(Mandatory) Session ID received after
login. Type: String Constraints: Required if username and password are not provided. |
| username
|
(Mandatory) AppViewX login username Type: String Constraints: Required if sessionId is not provided. |
| password
|
(Mandatory) AppViewX login password Type: String Constraints: Required if sessionId is not provided. |
| Content-Type
|
(Mandatory) Specifies the nature of the data in the
payload Type: String Constraints: The value of the param should be ‘application/json’. |
| gwsource
|
(Mandatory) Source from which the request is
triggered. (E.g. external) Type: String |
| Payload
|
(Mandatory) Contains all the parameters to be sent
in the request body for the post request Type: Payload |
Payload
| Name | Description |
|---|---|
| input |
(Optional) Input Parameters to fetch discovery status. Type: Input |
| filter |
(Mandatory) Filter parameters to fetch discovery status. Type: Filter |
| Name | Description |
|---|---|
| freeSearch | (Optional) Search text to fetch discovery
status. Type: String |
| keywordSearch | (Optional) Keyword and value tosearch and retrieve
discovery. Example: {"keyname":"RotateKeys_admin_1716367661908-B0-001"} |
| Name | Description |
|---|---|
| sortColumn | (Mandatory) Column name to be sorted. Type: String |
| sortOrder | (Mandatory) Order to be sorted. Possible values: asc, desc |
| start | (Mandatory) Start count of the discovery
status. Type: String |
| max | Count of the discovery status. Type: String |
Response Structure
200 OK returns string of type application/json with the following body params.
| Name | Description |
|---|---|
| response | Contains the response attributes for the discovery
status Type: response |
| message | Success message of the action or failure description
in case of error. Will be non-null for failure
response Type: String |
| appStatusCode | Application-specific status code for the response.
Will be non-null for failure response Type: String |
| tags | More info in case of failure response |
| Name | Description |
|---|---|
| data | List of discovery information which matches the search criteria Type: List |
| iTotalDisplayRecords | Total number of discovery available for the search criteria |
Status Codes
| HTTP Status code | appStatusCode | Message and Possible remediation |
|---|---|---|
| 200 OK | NA | Discovery information retrieved successfully |
| 401 Unauthorized | AVX_GW_003 | Authentication failed, reason - Invalid
Credentials Possible remediation: Ensure that valid username and password or valid sessionId is provided as the header param. |
| 400 Bad Request | AVX-VLDTN-001 | Mandatory field is missing or invalid values
specified - <<field name>> Possible remediation: Check and ensure that valid value is provided for <<field name>> field in the request. |
Sample Request/Response
To fetch status of the discovery “TestDiscovery” using /discovery/status API.
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/ssh/discovery/status?gwsource=external{
"input": {
"freeSearch": "TestDiscovery"
},
"filter": {
"sortColumn": "none",
"sortOrder": "desc",
"start": "0",
"max": "100"
}
}
{
"response": {
"data": [
{
"discoveryName": "TestDiscovery",
"displayDiscoveryName": "TestDiscovery",
"discoveryMode": "managedDevices",
"scheduleType": "instant",
"status": "Completed",
"startTime": 1717135034277,
"endTime": 1717135074037,
"description": "",
"discoveryId": "665966ba1500c06eadf8c022",
"recurrenceType": "NA",
"totalHosts": 1,
"successfulHosts": 1,
"failedHosts": 0,
"_id": "665966badd048f3caec5da37"
}
],
"iTotalDisplayRecords": 1
},
"message": "Discovery information retrieved successfully",
"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.Note: GWPORT is not required for SaaS setups.
Example: 31443
- avxapi: Path parameter value (static) that is part of the endpoint's URL
- Endpoint: Endpoint of the API, for example: /ssh/host/create
- gwsource: Source or origin of a gateway, for example: external.
