rest api works