make api accesses protocol independent