How to add a rest api in the grafana source go code

How to add a rest api in the grafana source go code (post request)

Needs more detail - do you mean new endpoint for the Grafana http api? (api.go is where the routes are defined)