Make a REST API call to a remote server - Metabase - metabase

Is there a way to make external API calls whenever we click something on a widget created by Metabase?

Related

How to notify an ASP.NET Core MVC web app about an event occurred in a third party app

I have a requirement wherein I need to perform certain action in my web application based on phone call receiving event that occurs in a third party application - Knowlarity SR calling app.
We are using Knowlarity Super Receptionist calling API to receive calls to a virtual number and then route those calls to call center Agents as per their availability. There is another web application we have built which call center agents uses to manage customers and orders. Agents login to this web application (web app in Azure) and places orders for customer who is calling over the phone from Knowlarity. Here the requirement is whenever Knowlarity routes the call to any agent and when the agent picks up the call, it should notify this action to web app (CRM) the web app should automatically redirect the same Agent to a specific page.
Please suggest a solution how I can listen to the call receiving event in Knowlarity and do some action(page redirection) on the web app side.
Thanks.
I tried writing an Api method in Web app which Konwlarity will call to send event notification with some information. Also tried implementing HttpHandler for this. Please suggest the correct approach for this. Remember that it is a Web app so multiple agents can login, they have their own session so how to handle this.

move user authentication to server with laravel breeze (useAuth Hook)

tl;dr: move authentication from useAuth hook to the server side with laravel breeze with next.js?!
The situation
I am using a project setup like the original laravel breeze repo.
It ships with the useAuth hook, which handles the authentication on the client side.
This setup is barely satisfying as it does not utilize the server side rendering for all components that need authenticated content.
The Question
How could I provide a way to authenticate the user on the server side to gather all the information possible and render more on the server?
I don't need to get rid of useAuth at all.
My Attempt
I tried to move the hook getServerSideProps but that is not allowed. My knowledge of the useSWR used inside the useAuth is slightly thin.

Consul.IO - How to watch key/value data and announce to ASP.NET Web application to know these changes

Currently, I use Consul for storing App Settings and Configurations for ASP.NET Web application. But I got performance issue when every request need to query from Consul service.
I see Consul have watch feature in server but I did not know how to use it in Windows and how to announce Web Application know when key/value data change
As far as I know, watches allow you to invoke some handlers, which must be some executables. So you have to provide some API in your web-app to allow remotely call to reload configuration, for example, some kind of REST web service or something else, what can be called from outside.
Next you have to create some executable script on your agent's host and provide a logic to call this remote API of your web-app.
And finally you have to register a new watch, providing your script file as an executable.

Placing API and website on the same server

I have a server side (which i did not create) RESTful API that uses ASP.Net
I want to place that API inside the same server as my site so that when I call that API, all i have to do is call the Resource.
For example:
instead of,
$http("http://localhost/API/post");
i would like it to be,
$http(".../API/post");
Thank You

Limiting access to webservices so only my applicaiton can use it

I have a system which will update some UI details regarding user notification every X seconds (just like StackOverflow's notification, gmail inbox and so on).
I am planing to have a webservice that will check for new notifications and have it called every X seconds. The fact is: I do not want to make it public for everyone, I want to make it accessible only to my system, so it is the only one able to consume it.
Is there any way to do that? Using a WebService is not required, if you have other approach I would like to hear it.
My system is built using ASP.NET 4.0 and Microsoft's MVC framework. Could I call an action to do that?
My question is similar to this: How do I secure ASP.NET web service to only allow relative path calling?
But as far as I understood the answer, he proposed that the webservice could be turned into an ordinary class method inside the system that is not accessible from outside. This does not work for me because I want to access it from the client side.
Thanks,
Oscar
ps: changing infrastructure configs (ex: hosting it in an internal server) would be hard to do...
EDIT: what I want to achieve with this webservice is to update the notifications number. This should be done without refreshing the page, for this reason I thought about verifying with the server if there are any notifications and, if there are, update the UI.
Edit2: I could transform this webmethod in an ordinary method inside my system, that would be no problem. The question would then change to How do I wire the client to this method? Maybe calling an action using javascript and then inside this action calling the method?
Deploy this WebService on a different web site and then configure this site to be accessible only from IP : 127.0.0.1. Also checkout this blog post - you could install the IP Security and then:
Lastly, to create the restrictions, open up the IIS Manager and select
the website that you want to restrict. Open the IP Address and Domain
Restrictions module, and then in the actions panel (on the right side)
choose Edit Feature Settings.... To only allow local browsing, you
should deny by default. Choose Deny from the dropdown, and hit OK.
Then add your exceptions -- the IP's or ranges that you want to allow
access to. To do that, choose Add Allow Entry... from the action
panel, and add all the exceptions you need.
Now, only applications running on the same web server can access this web service.

Resources