added REST api for setting pixels