Self-hosted installations,call api, 405 Client Error: Not Allowed for url https://xxx.com/runs

want to call post_run and patch_run to upload trace, how to fix?