Deleting an access key or an SSH key

You can delete an access key or an SSH key.

Method and URI

To delete an access key or an SSH key with {identityKeyId}, use a DELETE method and a URI:

DELETE  https://{hostname|IPv4}/api/identity/key/{identityKeyId}

Tip

To get an {identityKeyId} value based on its name, follow the instructions in Getting an {identityKeyId}.

Parameters

None.

Data

None.

Example: Delete an access key

Assume that you want to delete the access key, BlueMachines Amazon EC2 Key1 ({identityKeyId} 1002). A Python snippet that is similar to the following example can be used to delete this access key

identity_key_id = "1002"    # BlueMachines Amazon EC2 Key1

requests.delete('https://' + spp_ipv4 + '/api/identity/key/' + identity_key_id,
    headers={...}, verify=...)

After you run the Python snippet, ensure that you get a response with the HTTP status of 204 (No Content) and that you no longer see the access key. You can delete an SSH key in a similar way.