Unable to delete REST access key
search cancel

Unable to delete REST access key

book

Article ID: 6664

calendar_today

Updated On:

Products

SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service CA Service Desk Manager CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

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