Have you extracted the id as a separate field prior to indexing, using a tool like logstash or ingest pipelines?
If so, I suspect the problem is that the string you're searching for has slashes, and the standard analyzer removes slashes. If you want to do an exact match on the URL you should extract it as a separate field at index time. By default you'll get a keyword version of each text field, so then you can run a query like url.keyword:"/api/discover/v1/search" which will find documents where the URL is exactly that value instead of doing analysis on the value.