Getting Admin backend URL

Hi everyone!

Does anyone know how to reach the Admin backend URL of an Environment from the SmartView Ember component?

Thank you in advance! :smiley:

Hello, @david,

If I understand it well, you’re trying to make an ajax call to your backend from a smart view?

In this case, you can use the fetch api in javascript to make any request you want.

Thank you for the fast reply @GuillaumeGautreau ,

Yes, I want to make an ajax call to the backend from a smart view, explicitly setting the route.

I found a solution in the meantime.
A get function can be called on the component like this in order to get the Admin backend URL: .get(‘collection.rendering.environment.apiEndpoint’).

1 Like

Ok, thanks @david, I did not fully understand your question, but glad that you found the solution by yourself :slightly_smiling_face: