If you are doing it for the first time then I believe your backend api endpoint does not starts the word '/api'.
The thing is when you access frontend IP with a path based routing rule like '/frontend-ip/api/get-data' it simply replaces the frontend-ip with the backend ip and keep other part of URL as it is so the request sent to backend would be
'/backend-ip/api/get-data'
Whereas actually your backend contains the API URL like '/backend-ip/get-data'
There are 2 ways to solve this issue
1 > Edit the httpsetting of the rule and add a '/' in the "override backend path"
2> Drive the path based rule in such a way that the final path (like /api/ in your case) should actually exists in the backend server or webapp.