Unable to delete REST access key

Document ID : KB000006664
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

When attempting to delete an Access Key in Service Desk via REST API

DELETE /caisd-rest/rest_access/1201703106 HTTP/1.1

And the following message is returned in the jrest.log:

Invalid number of rows (0) affected by the operation. Expecting (1). [DELETE FROM rest_access WHERE id = 1201703106]

Environment:
SDM 12.9SDM 14.1SDM 17.0
Cause:

From the error received the REST API call is looking for 1201703106 in the id column of the usp_rest_access table.

Resolution:

1201703106 is the access key but the call is looking for the id of 1201703106.

Check the usp_rest_access table for the id of that access key and change the REST API call to match:

DELETE /caisd-rest/rest_access/"id of access key" HTTP/1.1

Additional Information:

Please see the following DocOps link for more information on deleting an access key as well as other REST HTTP methods.

https://docops.ca.com/ca-service-management/14-1/en/reference/ca-service-desk-manager-reference-commands/technical-reference/rest-http-methods#RESTHTTPMethods-ExampleDeleteanAccessKey