add http api for metric