Creating New Jobs
Use the post /v1/cckm/sap/keys/jobs
API to create a new job to perform delete and restore operations on SAP keys.
-
Delete operation deletes the key from SAP but keeps its backup in the CipherTrust Manager.
-
Restore operation restores the key to its SAP group from the key backup.
-
Both operations return the initiated job's status.
Syntax
curl -k '<IP>/api/v1/cckm/sap/keys/jobs' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "id": "<key resource id>",\n "operation": "<operation>",\n "delete_if_backup_fails": <true|false>\n}' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authentication token. |
id | string | Resource ID of the key on the CipherTrust Manager. |
operation | string | Operation to be performed on the key. The operation can be delete or restore . |
delete_if_backup_fails | string | Whether the key should be deleted even if the backup fails. If set to true , the operation continues even if the key backup fails. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/sap/keys/keys' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI3ZjRlNmJkNi0wMzgzLTQ4MGMtYWZmZS0wYTQxNDgzZmVlNmUiLCJzdWIiOiJsb2NhbHxlNjM3NTVjOS01YzRhLTQ0NzUtOWI0Zi0wN2JjNzQxYjQ1MGEiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODJlZTQ2MzAtNjQwMi00MTQ3LTliNDYtNWE5YzU1OGVjZWU4Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImI4MThiN2MzLTk5NzItNDU0YS1iMjI0LWQ2NGQwOWVlOGRmNSIsImlhdCI6MTYzNDU0MzE0OSwiZXhwIjoxNjM0NTQzNDQ5fQ.KEXK5uaMecdIQT8QWsIqVn6szCz5VBPetDh8i2ePiLU' -H 'Content-Type: application/json' --data-binary $'{\n "id": "b707ea86-37bb-4212-ad09-2635698dbe4a",\n "operation": "delete",\n "delete_if_backup_fails": true\n}' --compressed
Example Response
{
"id": "5db60499-9f4f-4143-b963-370459d3cef1",
"uri": "kylo:kylo:cckm:sap_job:5db60499-9f4f-4143-b963-370459d3cef1",
"account": "kylo:kylo:admin:accounts:kylo",
"createdAt": "2021-11-24T09:54:45.962862797Z",
"updatedAt": "2021-11-24T09:54:45.963309486Z",
"cckm_key_id": "b707ea86-37bb-4212-ad09-2635698dbe4a",
"group_id": "489ac34d-3e9c-4be3-8c1c-2c383bf31461",
"job_id": "b6b65380-4c0d-4b39-853a-e54676fe6706",
"key_id": "89ac400d-254f-4a19-a1fa-8952a2dca56f",
"operation": "delete",
"creator_id": "69f41156-5197-490d-aa5f-f1ffb0ab4e66",
"creator_name": "creator.name@xyz.com",
"state": "PENDING"
}
The new job with the resource ID 5db60499-9f4f-4143-b963-370459d3cef1
is created and the state of the job is PENDING
. To view the latest status of the job, run the get /v1/cckm/sap/keys/jobs
.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.