bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.74k stars 1.4k forks source link

API DELETE 404 page not found #3252

Closed wolverin-a closed 2 months ago

wolverin-a commented 2 months ago

Which version are you using?

v1.7.0

Which operating system are you using?

Describe the issue

The path is not deleted

Describe how to replicate the issue

  1. start the server
  2. # curl http://127.0.0.1:9809/v3/config/paths/get/02c00081093043a8
    {"name":"02c00081093043a8","source":"rtsp://10.135.253.242:554/cam","sourceFingerprint":"","sourceOnDemand":true,"sourceOnDemandStartTimeout":"10s","sourceOnDemandCloseAfter":"10s","maxReaders":0,"srtReadPassphrase":"","fallback":"","record":false,"recordPath":"./recordings/%path/%Y-%m-%d_%H-%M-%S-%f","recordFormat":"fmp4","recordPartDuration":"100ms","recordSegmentDuration":"1h0m0s","recordDeleteAfter":"24h0m0s","readUser":"563532","readPass":"L2sWTnxDi8","overridePublisher":true,"srtPublishPassphrase":"","rtspTransport":"automatic","rtspAnyPort":false,"rtspRangeType":"","rtspRangeStart":"","sourceRedirect":"","rpiCameraCamID":0,"rpiCameraWidth":1920,"rpiCameraHeight":1080,"rpiCameraHFlip":false,"rpiCameraVFlip":false,"rpiCameraBrightness":0,"rpiCameraContrast":1,"rpiCameraSaturation":1,"rpiCameraSharpness":1,"rpiCameraExposure":"normal","rpiCameraAWB":"auto","rpiCameraAWBGains":[0,0],"rpiCameraDenoise":"off","rpiCameraShutter":0,"rpiCameraMetering":"centre","rpiCameraGain":0,"rpiCameraEV":0,"rpiCameraROI":"","rpiCameraHDR":false,"rpiCameraTuningFile":"","rpiCameraMode":"","rpiCameraFPS":30,"rpiCameraIDRPeriod":60,"rpiCameraBitrate":1000000,"rpiCameraProfile":"main","rpiCameraLevel":"4.1","rpiCameraAfMode":"continuous","rpiCameraAfRange":"normal","rpiCameraAfSpeed":"normal","rpiCameraLensPosition":0,"rpiCameraAfWindow":"","rpiCameraTextOverlayEnable":false,"rpiCameraTextOverlay":"%Y-%m-%d %H:%M:%S - MediaMTX","runOnInit":"","runOnInitRestart":false,"runOnDemand":"","runOnDemandRestart":false,"runOnDemandStartTimeout":"10s","runOnDemandCloseAfter":"10s","runOnUnDemand":"","runOnReady":"","runOnReadyRestart":false,"runOnNotReady":"","runOnRead":"","runOnReadRestart":false,"runOnUnread":"","runOnRecordSegmentCreate":"","runOnRecordSegmentComplete":""}
  3. # curl http://127.0.0.1:9809/v3/config/paths/delete/02c00081093043a8
    404 page not found

Did you attach the server logs?

no

Did you attach a network dump?

no

aler9 commented 2 months ago

you have to use the DELETE method, not the GET method (which is the default one of curl)...

curl -X DELETE http://127.0.0.1:9809/v3/config/paths/delete/02c00081093043a8
Fred14000 commented 2 weeks ago

Hello I have the same problem...

curl -u user:pass -X DELETE http://127.0.0.1:9997/v3/paths/get/hik01

return 404 page not found

curl -u user:pass http://127.0.0.1:9997/v3/paths/get/hik01 work !