api rest queries