Deleting a Key from SAP
Use the post /v1/cckm/sap/keys/{id}/delete API to delete a key from SAP but keep its backup on CCKM.
Syntax
curl -k '<IP>/api/v1/cckm/sap/keys/{id}/delete' -X POST -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id} is the resource ID of the SAP key on the CipherTrust Manager. Note that the resource id is different from sap_key_id on SAP. Run the get /v1/cckm/sap/keys API to view the resource ID (id) of the SAP key on the CipherTrust Manager.
Request Parameters
| Parameter | Type | Description | 
|---|---|---|
| AUTHTOKEN | string | Authentication token. | 
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/sap/keys/6229b2b6-f603-4927-b5e9-476f4a9ff79b/delete' -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI3ZjRlNmJkNi0wMzgzLTQ4MGMtYWZmZS0wYTQxNDgzZmVlNmUiLCJzdWIiOiJsb2NhbHxlNjM3NTVjOS01YzRhLTQ0NzUtOWI0Zi0wN2JjNzQxYjQ1MGEiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODJlZTQ2MzAtNjQwMi00MTQ3LTliNDYtNWE5YzU1OGVjZWU4Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImI4MThiN2MzLTk5NzItNDU0YS1iMjI0LWQ2NGQwOWVlOGRmNSIsImlhdCI6MTYzNDU0MzE0OSwiZXhwIjoxNjM0NTQzNDQ5fQ.KEXK5uaMecdIQT8QWsIqVn6szCz5VBPetDh8i2ePiLU' --compressed
Example Response
{
    "id": "6229b2b6-f603-4927-b5e9-476f4a9ff79b",
    "uri": "kylo:kylo:cckm:sap-key:6229b2b6-f603-4927-b5e9-476f4a9ff79b",
    "account": "kylo:kylo:admin:accounts:kylo",
    "createdAt": "2021-11-24T07:36:18.594688Z",
    "updatedAt": "2021-11-24T07:40:25.906878Z",
    "cloud_name": "sap",
    "tenant": "thales-preprod",
    "sap_param": {
        "enabled": true,
        "exportable": true,
        "groupId": "489ac34d-3e9c-4be3-8c1c-2c383bf31461",
        "sap_key_id": "36ec5f0c-b6c3-4826-9548-1d51b7fe0cb9",
        "keystoreContext": {
            "customerHeld": false
        },
        "meta": {
            "created": "2021-11-24T07:36:17Z",
            "creatorId": "69f41156-5197-490d-aa5f-f1ffb0ab4e66",
            "creatorName": "creator.name@xyz.com",
            "imported": true,
            "primaryVersion": 0,
            "totalVersions": 1
        },
        "name": "ab-cm-key-sap",
        "operations": [
            "ENCRYPT"
        ],
        "role": "UNSPECIFIED",
        "size": 256,
        "type": "AES"
    },
    "cckm_group_name": "Gooey_1",
    "cckm_group_id": "94596874-b882-46a0-84eb-20e88abaec4b",
    "gone": true,
    "origin": "unknown",
    "auto_rotate": false,
    "sap_application": "S4H",
    "sap_group_name": "Gooey_1",
    "refreshed_at": "2021-11-24T07:39:31.242153Z",
    "backup_key_id": "7fcbb918ea164e9cbd41e2228d71b0c7b9056c6d18244cfa8a699f248611ec2b",
    "backup_key_name": "CCKM-SAP-Key:94596874-b882-46a0-84eb-20e88abaec4b:36ec5f0c-b6c3-4826-9548-1d51b7fe0cb9",
    "backup_key_tier": "local",
    "backup_key_time": "2021-11-24T07:39:45Z",
    "backup_key_status": "SUCCESS",
    "status": "DELETED"
}
Response Codes
| Response Code | Description | 
|---|---|
| 2xx | Success | 
| 4xx | Client errors | 
| 5xx | Server errors | 
Refer to HTTP status codes for details.