Delete CA Policy
The Delete CA Policy API removes one or more CA policies from AppViewX
Native PKI in a single request.
Before you begin
- Each CA policy you want to delete exists in AppViewX Native PKI.
- Use the
List CA PoliciesAPI to retrieve exact policy names before calling this API.
Request Structure
| Endpoint: | v1/pki/ca/policies/delete |
| Type: | POST |
| Sample URL: |
To understand the elements of the sample URL, see References. |
| Headers | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId
|
(Mandatory) Session Id received after login. 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 of the parameter should be ‘application/json’ |
| gwkey
|
(Mandatory) Tenant Key. This is needed only in case of multi-tenant
installations and can disregarded for other types of installations. Type: String |
| gwsource
|
(Mandatory) Source from which the request is triggered. (E.g.
external) Type: String |
| Payload
|
Contains all the parameters to be included in the request body for the POST
request. Type: Payload |
Payload Parameters
| Parameter | Description |
|---|---|
policyNames |
(Mandatory) Names of CA policies to delete. Note: Minimum
1 entry, maximum 100 entries per request. Each policy name must be between 2 and
64 characters. Type: Array of String |
Response Structure
The response returns a string of type application/json with the following body parameters:
| Parameter | Description |
|---|---|
response |
Contains the deletion result. Type: Object |
response.deletedPolicies |
Names of CA policies that were successfully deleted. Type: Array of String |
response.failedPolicies |
Names of CA policies that could not be deleted. Type: Array of String Non-empty when deletion partially fails. |
message |
Success or error message. Type: String |
appStatusCode |
Application-specific status code for the response. Set to
PARTIALLY_DELETED_CA_POLICY when some policies were deleted and
some failed. Type: String |
tags |
Additional information in case of a failure response. |
Status Codes
| HTTP Status | appStatusCode | Description |
|---|---|---|
200 OK |
null | All specified CA policies deleted successfully. |
200 OK |
PARTIALLY_DELETED_CA_POLICY |
Some CA policies were deleted and some could not be deleted. Check response.deletedPolicies and response.failedPolicies for details. |
400 Bad Request |
PAYLOAD_TOO_LARGE |
The number of CA policy names in the request exceeds 100. Remediation: Split the request into batches of up to 100 policy names. |
400 Bad Request |
MANDATORY_POLICY_NAME |
The policyNames field is missing or empty. Remediation: Provide at least one valid CA policy name. |
401 Unauthorized |
AVX_GW_003 |
Authentication failed — invalid credentials. Remediation: Provide a valid username and password or a valid sessionId. |
403 Forbidden |
USER_POLICY_ACCESS_RESTRICTED |
The authenticated user does not have access to CA policies. Remediation: Contact your AppViewX administrator to grant the required permissions. |
Sample Request/Response
Sample Request
{
"policyNames": [
"RootCAPolicy-01",
"RootCAPolicy-02"
]
}
Sample Response
{
"response": {
"deletedPolicies": [
"Root CA1",
"Sub CA2"
],
"failedPolicies": [],
"partialSuccess": false,
"success": true
}
}
policyNames array.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.
