Discover Certificates from AppViewX Native CA
Before you begin
- Refer to Prerequisites in the PKI User Guide.
- A valid AppViewX session ID, or login credentials (username and password).
- Access to the AppViewX gateway (on-prem) or tenant (cloud).
- Appropriate role permissions to discover certificates.
Request Structure
| Endpoint: | v1/pki/certificate/discovery |
| Type: | POST |
| Sample URL: |
To understand the elements of the sample URL, click here. |
| Headers | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId
|
(Mandatory) Session token returned by the login
API. Type: String Constraint: Required if username and password are not provided. |
| username
|
(Mandatory) AppViewX login
username. Type: String Constraint: Required if sessionId is not provided. |
| password
|
(Mandatory) AppViewX login
password. Type: String Constraint: Required if sessionId is not provided. |
| Content-Type
|
(Mandatory) Specifies the nature of the data in the
payload. Type: String Constraint: Value must be 'application/json'. |
| gwsource
|
(Mandatory) Source from which the request is
triggered. Type: String |
| Payload
|
Contains all the parameters to be sent in the
request body. All fields are optional — send an empty payload object
({"payload": {}}) to retrieve all certificates
with default settings.Type: Payload |
Request Body
| Name | Description |
|---|---|
| validFromDate | (Optional) Lower bound for certificate validity
start date. Type: String Format: ISO-8601
UTC. Example: |
| validToDate | (Optional) Upper bound for certificate validity end
date. Type: String Format: ISO-8601 UTC.
Example: |
| certificateStatus | (Optional) Filter by certificate status.
Comma-separated, case-sensitive. Type: String Allowed values: Example:
|
| templateName | (Optional) Filter by certificate template name.
Comma-separated. Type: String Example:
|
| issuerCa | (Optional) Filter by issuing CA name.
Comma-separated. Type: String Example:
|
| Name | Description |
|---|---|
| direction | (Optional) Pagination direction. Type: String Allowed values: |
| sortField | (Optional) Field to sort results by. Type: String Allowed values: |
| sortOrder | (Optional) Sort direction. Type: String Allowed values: |
| pageSize | (Optional) Number of records per
page. Type: Integer Range: 1–1000 |
| lastId | (Optional) Cursor ID for forward pagination (next
page). 24-character Mongo ObjectId. Type: String Constraint: Must be paired with
|
| lastSortValue | (Optional) Sort value paired with
lastId.Type: String ObjectId
string if sorting by |
| firstId | (Optional) Cursor ID for backward pagination (prev
page). 24-character Mongo ObjectId. Type: String Constraint: Must be paired with
|
| firstSortValue | (Optional) Sort value paired with
firstId.Type: String ObjectId
string if sorting by |
Response Structure
Response returns a string of type application/json with the following body parameters:
| Name | Description |
|---|---|
| certificateContents[] | Array of certificate objects, each containing the
PEM-encoded certificate (certificateContent) and
its UUID (uuid). |
| certificateChains | Map of leaf certificate UUID to its chain — including root, intermediate(s), and end certificate metadata. |
| pageInfo.nextCursor | Cursor to pass in the next request to get the following page. |
| pageInfo.prevCursor | Cursor to pass in the next request to get the previous page. |
| pageInfo.hasNext | true if more records exist after
this page. |
| pageInfo.hasPrevious | true if records exist before this
page. |
| recursiveData | Echo of the pagination parameters used for this request. |
| message | Success or error message string. Type: String |
| appStatusCode | null on success. Contains an error
code string on failure.Type: String |
Status Codes
| HTTP Code | appStatusCode | Response Message |
|---|---|---|
| 200 OK | null | Certificates discovered successfully. |
| 401 Unauthorized | AVX_GW_003 | Authentication failed invalid credentials. Remediation:
Provide a valid |
| 400 Bad Request | DISCOVERY_NULL_PAYLOAD | Request payload is
null. Remediation: Send a non-null JSON payload object. |
| 400 Bad Request | DISCOVERY_INVALID_PAYLOAD_FORMAT | Payload JSON structure is
invalid. Remediation: Ensure the payload uses
supported keys: |
| 400 Bad Request | DISCOVERY_UNSUPPORTED_PAYLOAD_ATTRIBUTE | Payload contains an unrecognised
key. Remediation: Use only
|
| 400 Bad Request | DISCOVERY_UNSUPPORTED_FILTER_ATTRIBUTE | Unsupported key inside
filters.Remediation: Only
|
| 400 Bad Request | DISCOVERY_UNSUPPORTED_FILTER_KEY | Unsupported key inside
vendorSpecificConditions.Remediation:
Use only: |
| 400 Bad Request | DISCOVERY_INVALID_DATE_ATTRIBUTE_FORMAT | Date value is not in ISO-8601 UTC
format. Remediation: Use the format
|
| 400 Bad Request | DISCOVERY_NEGATIVE_DATE | validFromDate or
validToDate has a negative epoch
value. |
| 400 Bad Request | DISCOVERY_INVALID_DATE_VALUE | Date value cannot be converted to a valid epoch millisecond. |
| 400 Bad Request | DISCOVERY_INVALID_DATE_RANGE | validFromDate is later than
validToDate.Remediation: Ensure the start date is earlier than the end date. |
| 400 Bad Request | DISCOVERY_INVALID_CERTIFICATE_STATUS_FILTER | certificateStatus contains an invalid
value.Remediation: Use only
|
| 400 Bad Request | DISCOVERY_INVALID_TEMPLATE_NAME_FILTER | templateName filter contains an invalid
value. |
| 400 Bad Request | DISCOVERY_INVALID_ISSUER_CA_FILTER | issuerCa filter contains an invalid
value. |
| 400 Bad Request | DISCOVERY_INVALID_DIRECTION | direction value is
invalid.Remediation: Use |
| 400 Bad Request | DISCOVERY_INVALID_SORT_ORDER | sortOrder value is
invalid.Remediation: Use |
| 400 Bad Request | DISCOVERY_INVALID_SORT_FIELD | sortField value is
invalid.Remediation: Use |
| 400 Bad Request | DISCOVERY_INVALID_CURSOR_PAIR | Cursor ID and sort value not provided
together. Remediation: Always pair
|
| 400 Bad Request | DISCOVERY_INVALID_CURSOR_FORMAT | Cursor format does not match the selected
sortField.Remediation: Use an
ObjectId string for |
| 400 Bad Request | DISCOVERY_INVALID_PAGE_SIZE | pageSize is out of the allowed
range.Remediation: Set
|
Sample Request/Response
{
"payload": {
"filters": {
"vendorSpecificConditions": {
"validFromDate": "2026-03-01T00:00:00Z",
"validToDate": "2031-03-31T23:59:59Z",
"certificateStatus": "ACTIVE,EXPIRED",
"issuerCa": "rootCA,subCA",
"templateName": "WebServer,OCSP Signing"
}
},
"recursiveData": {
"direction": "next",
"sortField": "validFromDate",
"sortOrder": "desc",
"pageSize": 100,
"lastId": "69ba6b4bdfdbaf47c622e1e2",
"lastSortValue": "2026-03-18T08:57:23Z"
}
}
}{
"response": {
"certificateContents": [
{
"certificateContent": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"uuid": "leaf-uuid-1"
},
{
"certificateContent": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"uuid": "leaf-uuid-2"
}
],
"certificateChains": {
"leaf-uuid-1": {
"rootCertificate": {
"uuid": "ca-root-uuid",
"certificateStatus": "ACTIVE",
"templateName": "RootTemplate"
},
"intermediateCertificate-1": {
"uuid": "ca-int-uuid",
"certificateStatus": "ACTIVE",
"templateName": "IntermediateTemplate"
},
"endCertificate": {
"uuid": "leaf-uuid-1",
"certificateStatus": "ACTIVE",
"templateName": "WebServer"
}
}
},
"pageInfo": {
"nextCursor": { "id": "69ba4c37...", "sortValue": "2026-03-17T22:31:27Z" },
"prevCursor": { "id": "69ba4daa...", "sortValue": "2026-03-18T08:04:18Z" },
"hasNext": true,
"hasPrevious": false
}
},
"message": null,
"appStatusCode": null
}References
- 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.
