is it possible way to edit and deploy a eventing function using rest api?
Boby,
Creating a function outside of the UI is possible but highly discouraged. With that said please look at the following which will allow you to exercise the complete function life-cycle for a given Eventing function.
https://docs.couchbase.com/server/6.5/eventing/eventing-api.html
and
https://docs.couchbase.com/server/6.5/cli/cbcli/couchbase-cli-eventing-function-setup.html