Skip to main content
DELETE
/
api
/
adm
/
KeyStores
/
{id}
Soft Delete Keystore
curl --request DELETE \
  --url https://localhost:44371/api/adm/KeyStores/{id} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Performs a soft delete by marking the keystore as inactive. The key material is retained in the database to allow decryption of historical data, but the keystore will not appear in active queries and cannot be used for new encryption operations.

Input

  • Path Parameter: id (guid, required) — Unique identifier of the keystore to deactivate.

Output

Returns a KeystoreDeleteCommandResponse indicating the result of the deletion.

Example Request

DELETE /api/admin/KeyStores/3fa85f64-5717-4562-b3fc-2c963f66afa6
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Errors

  • 400 Bad Request — Keystore is the currently active keystore or still protecting data.
  • 401 Unauthorized — Missing or invalid authentication.
  • 404 Not Found — Keystore with specified ID not found.
  • 500 Internal Server Error — Unexpected error during deletion.

Notes

  • Do not delete keystores still protecting encrypted data.
  • Keystore is marked inactive but key material is retained for historical decryption.
  • Pre-deletion checklist: verify no active data uses this key, confirm data re-encryption, check not active keystore.
  • Document deletion reason in audit logs.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string<guid>
required

The unique identifier of the keystore to deactivate.

Response

Returns success when the keystore is soft-deleted successfully.

Standard response structure containing operation status and error information. Represents the response returned after a key store entry is deleted.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null