Good day.
You should use Basic authorization, for example:
curl -u user:password -H "Content-Type: application/json" -X POST http://localhost:8081/rest-api/stream/find -d '{"published":true,"display":["metrics"]}'
You should use the same user credentials as in web dashboard (admin and demo...