API How to fix it

I am using almost the latest version of gitlab. I try to link gitlab with sonarqube. At first, they work normally under the HTTP protocol, but when I try to upgrade to HTTPS, the gitlab API sends an exception and the error message obtained by sonarqube. When I try to access directly https://my.com/api/v4 I only returned {“error”: “404 not found”}. I tried to go back and found no change. If anyone knows how to solve it, please reply.,Thank you.
ps: Other module is normal,like https://my.com/api/v4/projects