public class UserApiKeys extends Object
|Modifier and Type||Method and Description|
Deletes an api key
Retrieves either list of available keys for current user or all keys.
Generates an access key using the client identifier
public UserApiKeys(String userId)
clientId- unique client identifier.
The api token that is generated and returned to the user is not stored and therefore cannot be retrieved. If lost, the api key record can be deleted by the user who created it (or an admin) and a new one created.
public Results<AccessKey> getKeys(int limit, int offset, String sortField, boolean asc, boolean getAvailable)
limit- maximum number of keys to retrieve
offset- paging parameter start
sortField- field to sort on
asc- whether the retrieve order is in ascending order
getAvailable- whether to retrieve all available keys or restrict by current user
getAvailableis true but user making the request does not have administrative privileges
public boolean deleteKey(long id, String secret)
id- unique database identifier for the key
secret- unique key secret
PermissionException- if the key being deleted does not belong to user and user does not have administrative privileges
Copyright © 2017. All rights reserved.