Rancher2 Web UI -> Top right corner -> API & Keys, you can find Endpoint URL in that page.
eg: http://192.168.0.2/v3.
see Rancher2 api-keys document