Revoke a Certificate in Sync mode
The API will submit a request to revoke an existing certificate in Sync Mode. There are two parameters that are different than async APIs. They are "isSync" and "ttl". If "isSync", that is, Sync Mode is true, it overrides the policy for certificate request approvals to Revoke the Certificate. You can use these two parameters for all the CA's mentioned in the async APIs.
Request Structure
API: /certificate/revoke
Method: PUT
URL: https://<APPVIEWX_GATEWAY_IP>:<APPVIEWX_GATEWAY_PORT>/avxapi/certificate/revoke?gwkey=f000ca01&gwsource=external&isSync=true&ttl=300
|
Name |
Type |
Mandatory |
Field Type |
Description |
Constraints |
|---|---|---|---|---|---|
|
|
Header |
Yes |
|
Username that is configured in AppViewX. | |
|
|
Header |
Yes |
String
|
Password of that user. |
|
|
|
Header |
Yes |
|
Payload content-type with application/json value. |
The value must be application/json. |
|
|
Queryparam |
Yes |
|
Tenant Key. This is needed only in case of multi tenant installations and can be ignored in other type of installations. |
|
|
|
Queryparam |
Yes |
|
Source, from which the request is triggered. For example, external. | |
|
|
Queryparam |
No |
|
The possible values are true and false. If you want to use sync API, set the value as true. If you want to use the async API, set the value as false. Note: Default value is false.
|
Must be a valid boolean value: true or false. |
|
|
Queryparam |
No |
|
Time to live for a response in seconds. Default value is 300 seconds. | Must be a positive integer. |
|
|
Body |
Yes |
|
Refer to the sample request body. |
| Name |
Mandatory
|
Description
|
Field Type |
Constraints
|
|---|---|---|---|---|
|
|
Yes
|
Mongo Id of the certificate in the AppViewX database. Note: It refers to the ‘resourceId’ field in the create certificate response. It can be found using the search API using commonName, serial No. or other search parameters.
|
|
Either resourceId or serialNumber and commonName is mandatory.
|
|
|
Yes
|
Common name of the certificate.
|
|
|
serialNumber
|
Yes | Serial number of the certificate. |
String
|
|
reason
|
Yes | Reason for revoke. |
String
|
|
comments
|
Yes | Comments for Revocation |
String
|
Comments field is mandatory for some revoke reasons alone. Refer Valid Reason for CAs table. |
|
Certificate Authority |
Reasons |
Comments Required |
|---|---|---|
|
Entrust |
Superseded |
No |
|
Cessation of operation |
No |
|
|
Affiliation Changed |
No |
|
|
Key compromised |
Yes |
Sync Revoke Response Structure
Response returns string of type application/json with the following body params:
| Name | Description | Field Type |
|---|---|---|
response
|
Contains the response attributes for the enrollment request. |
RevokeResponseStructure (explained in the following
table) |
message
|
Success message or failure description in case of error. |
String
|
appStatusCode
|
Application specific status code for the response. Will be non-null for failure response. |
String
|
tags
|
More info in case of failure response. | NA |
| Name | Description | Field Type |
|---|---|---|
resourceId
|
Identifier of the certificate record that has been created. |
String
|
requestId
|
Open work order request ID. |
String
|
certStatus
|
Status of the certificate action request. |
String
|
Sample Request/Response
{
"resourceId": "5fa27b7ffee3a70235a5816d",
"reason" :"Superseded"
} {
"response": {
"resourceId": "<Certificate ID>",
"requestId": "<Certificate WF Request ID>",
"certStatus": "Revoked"
},
"message": "Certificate Revoke action executed successfully",
"appStatusCode": "<Error Code>",
"tags": {},
"headers": null
}