getAccessCheck function for rest query handler