Delete Certificate using UUID

The delete certificate using UUID API deletes the certificates using the Universal Unique Identifier (UUID). The UUID is a unique id for each certificate. This id remains the same even if the certificate is generated numerous times. It is generated based on certain attributes and properties of the certificate.

Request Structure

Endpoint: /certificate/delete
Type: DELETE
Sample URL:
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/certificate/delete?gwsource=external&commonName={commonName}&serialNumber={serialNumber}

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’

gwkey

Query

(Mandatory) Tenant Key. This is needed only in case of multi-tenant installations and can disregarded for other types of installations.

Type: String

gwsource

Query

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

Type: String

Payload Contains all the parameters to be sent in the request body for the post request.

Type: Payload

Payload

Table 2. Payload
Name Description
certIds (Mandatory) Format required.

Type: Array

Constraint: Uuid of the certificate to be deleted.

Response Structure

Table 3. Error Response Parameters
Name Description
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
417 Expectation failed CERT-CA-0047 Cert Ids cannot be empty.

Remediation: Provide UUIDs in the request to delete certificates.

417 Expectation failed CERT-HLST-0019 The operation cannot be completed as {} selected certificate(s) are in Read-Only access groups.

Remediation: Change the permissions in the required access group.

400 Not Found CERT-INV-0021 Requested certificate is not available in the inventory.

Remediation: Provide uuids that are available in the inventory.

500 Internal Server Error CERT-GEN-0028 Certificate Limit Exceed.

Remediation: Cannot delete more than 100 certificates.

Sample Request/Response

Request Payload

No payload for DELETE request.

Success Response
{
 {
 "response": {
 "code": "CERTIFICATE_DELETION_SUCCESSFULL",
 "message": "Selected certificate(s) has been deleted successfully from AppViewX inventory."
 },
 "message": null,
 "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.