Get Available Server Profiles

The get available server profiles API fetches the available profile details for the particular server device.

Before you begin

Ensure the following before attempting to fetch available profiles for a particular server device through AppViewX:
  • Server devices must be configured in AppViewX.
  • The devices should be in Managed state.

Request Structure

Endpoint: /certificate/profiles
Type: GET
Sample URL:
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/certificate/action?gwsource=external&category=Server&vendor=<Vendor_Name>

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

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

Header

(Mandatory) Session Id received after login.

Type: String

Constraint: Required if username and password are not provided.

username

Header

(Mandatory) AppViewX login username.

Type: String

Constraint: Required if sessionId is not provided.

password

Header

(Mandatory) AppViewX login password.

Type: String

Constraint: Required if sessionId is not provided.

Content-Type

Header

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

Type: String

Constraint: Value of the parameter should be ‘application/json’

gwsource

Query

(Mandatory) Source from which the request is triggered. (E.g. external)

Type: String

category

Query

(Mandatory) It specifies the device category.

Type: String

Constraint: Required if sessionId is not provided.

vendor

Query

Vendor for the chosen device. For example, Apache is a vendor for the Server category. It is a mandatory field.

Type: String

certificateUuid

Query

Uuid of the certificate.

Type: String

deviceName

Query

Name of the device as per AppViewX Device Inventory.

Type: String

inventory

Query

Name of AppViewX inventory where the certificate is present.

Response Structure

Response returns string of type application/json with the following body parameters:

Table 2. Parameters
Name Description
response Contains the response attributes for the fetch profiles request.
objects

response

List of available device profile Ids.

Type: String

totalRecords

response

Total number of profiles fetched.

Type: Integer

obtainedRecords

response

Total number of profiles fetched.

Type: Integer

obtainedRecordRange

response

Range of record retrieved

Type: Object

start

response.obtainedRecordRange

Start index of the record range retrieved

Type: Integer

end

response.obtainedRecordRange

End index of the record range retrieved

Type: Integer

message Success message or failure description in case of error.

Type: String

appStatusCode Application specific status code for the response. It is a non-null value for a failure response.

Type: String

tags Additional information in case of failure response.

Status Codes

HTTP Code appStatusCode Response Message
202 Accepted NA <<No. of profile Ids>> record(s) found
401 Unauthorized AVX_GW_003 Authentication failed, reason - Invalid Credentials.

Remediation: Ensure that valid username and password or valid sessionId is provided as header parameters.

400 Bad Request MANDATORY_FIELD_MISSING The mandatory field is missing or invalid - <<field name>>

Remediation: Ensure that a valid value is provided for the <<field name>> field in the request.

404 Not Found NO_RECORDS_FOUND No matching records found.

Remediation: Provide correct values for all the fields.

500 Internal Server Error avx-common-011 Error while processing.

Sample Request/Response

Request Payload

No payload for GET request

Response
 {
 "response":{
 "objects":[
 "ApacheLinux",
 "ApacheLinux:@/etc/apache2:@xxx.xxx.xxx.xxx:@443:@/etc/apache2/sites-enabled/test.conf", "ApacheLinux:@/etc/apache2:@_default_:@443:@/etc/apache2/sites-available/default-ssl.conf", "ApacheLinux:@/etc/apache2:@_default_:@443:@/etc/apache2/sites-enabled/random-ssl.conf"
 ],
 "totalRecords":4,
 "obtainedRecords":4,
 "obtainedRecordRange":{
 "start":0,
 "end":0
 }
 },
 "message":"4 record(s) found",
 "appStatusCode":null,
 "tags":{
 
 },
 "headers":null
 } 

References

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.