@request_user_has_resource_db_permission(permission_type=PermissionType.API_KEY_VIEW)
    @jsexpose(arg_types=[str])
    def get_one(self, api_key_id_or_key):
        """
            List api keys.

            Handle:
                GET /apikeys/1
        """
        api_key_db = None
        try:
            api_key_db = ApiKey.get_by_key_or_id(api_key_id_or_key)
        except ApiKeyNotFoundError:
            msg = 'ApiKey matching %s for reference and id not found.', api_key_id_or_key
            LOG.exception(msg)
            abort(http_client.NOT_FOUND, msg)

        try:
            return ApiKeyAPI.from_model(api_key_db, mask_secrets=True)
        except (__HOLE__, ValueError) as e:
            LOG.exception('Failed to serialize API key.')
            abort(http_client.INTERNAL_SERVER_ERROR, str(e))
dataset/ETHPy150Open StackStorm/st2/st2api/st2api/controllers/v1/auth.py/ApiKeyController.get_one