0
votes

I have moved my /api path to /api1. It's working fine, but the data for relationships etc. is still /api.

Example: /api1/something -> I got the data, but in the relationship, every related model has a route with /api only. Where can I change this?

Thank you.

1
Can you provide some code how you changed root api? - Maxim Sharai
I have modified config.json, I've set the restApiRoot to /api1, and the port to 3001. Also in nginx site configuration I've set the stream port to 3001. Basically everything works that doesn't have any relationship. - Viktor F.

1 Answers

0
votes

Found a solution. I had to add "restApiRoot": "/api1" to loopback-component-jsonapi in component-config.json.