REST api improve