add interval api to server