Get bIDs of current version

Would be great if it could get the bIDs of the current page version. I ran into a trouble working a project with this.