Add isLocked function to API