api/waveform: return HTTP 501 on unsupported format