How to create my own API and connect it to Power apps? - api

I really hope you can help me. I have a project to create an app. I will use Power apps, Python and JavaScript. I need to be in it, because I am not. So my first step is create an API, I have decided to use Azure Function I can explain why. It helps connect my Power Apps(frontend, where i am going to use JavaScript) to backend(Python).
So I have absolutely nothing and I have decided to create an API with Azure Functions, the truth is i dont really know how it works. I can connect it with VScode, but the main question how to create own API? I dont need to pay for servis because I have an Azure Functions which is paid. But I dont really understand how API has too look. I have find a lot information but i cant connect it with what I need.
I need to write my own code for API? Like from empty file? Can do it in VS code and connect it with Azure Functions? What has to be in API I mean my own piece of code or something another? Have anyone created his own API in Azure Functions?
thank you for answering my stupid questions

You can create the Http Trigger in Azure Function if your own API works on HTTP protocol and modify the default Http Trigger API Code according to your requirement.
If your API contains 3rd party APIs, you can create the Http client inside the function code for sending HTTP requests on to the available 3rd party APIs in your function code.
There are plenty of articles on connecting the Azure Functions to Power BI Apps where you can write your own AP code using REST API signature following swagger and add that custom API in Power Apps.
Refer to this article that provides the use case of connect the Azure Function with custom API Code to Power App, given by Carlos Aguilar.

Related

Zapier - Xero: Custom Integration

Has anyone managed to create a custom integration between Zapier and Xero by using the 'Webhooks by Zapier' option and a private connection on the Xero side?
At the moment Xero uses Oauth-1a to create sessions and I can't figure out how to even approach this.
I know Zapier has a normal integration with Xero, however I am interested in doing something which isn't available in their integration (create manual journals) and for this I need to figure out how to do the connection manually.
Thanks
Have you taken a look at Xero's Private Application Auth documentation? The private key you create becomes your Consumer Key for API calls. Unfortunately, from there, you do need to do a little coding to support Oauth1 in Zapier.
You have two options:
You could use a serverless function platform like Google Cloud Funtions or AWS Lambda to host your code and use one of Xero's SDKs (like pyxero). You then use a webhook step in Zapier to call the function.
This option is the most robust since and avoids Zapier code limits
You can use a Zapier code step to place the call. In order to do this, you will need to create your own Oauth1 header for your call. You can look at the post HERE by Eliot Muir.
You'll see on lines 32-34 of his example output the headers that need to be included. He has done the hard work of crafting them so you would just need to pull the relevant code and strategy.
This is the most streamlined solution, but you do have to deal with Zapier's lack of 3rd-party packages and a 10-second timeout

Google Cloud Text-to-Speech API Authentication from the frontend via API key possible?

The use case is a frontend application that does not have any backend so normally I would expect to use an api key ( https://cloud.google.com/docs/authentication/api-keys ) but in the complete text to speech documentation ( https://cloud.google.com/text-to-speech/docs/ ) I can't find any information about if (and how) its possible to use api keys for the Cloud Text-to-Speech API.
I don't think its such an uncommon use case to use the text to speech functionality in a standalone frontend (especially with the new WaveNet voices), so I thought I would ask the question here if anyone has some tips where to look for this information or if it's currently really only ment as an API usable in the backend.
If you have the same problem that I am facing right now then I can help you. I have the same issue asked in this question.
If you are using webpage to translate then you have to send your API key in URL of the request. The one way I tried is,
https://texttospeech.googleapis.com/v1beta1/text:synthesize?fields=audioContent&key={Your key goes here}.
I hope this will solve your problem.

How to integrate wit.ai With my own chatbot application

I would like to create my own web chatbot and i like to integrate my app with wit.ai for natural language classification.I need to know how to integrate wit.ai service(through api call) with my application(any language in backend).i am using C# in front end.I have gone through the integration part Which posted in wit.ai website.But i don't know how to connect it .Could anyone send me a integration details little briefly
I think the short answer is its similar to how you would call any other APIs from your application server components. Wit exposes multiple APIs like message, speech and converse which you can call by passing the Authorization token and other payloads and make use of the API response in your application.
You can use message API if you are only interested in extracting
intent and other atributes of the sententense
Use speech for building voice based application and
Converse if you want to build a little more smarter app. Currently you can only pass text for converse APIs.Hoping they will introduce voice option for this soon.
Now to make things simpler, they have also provided SDKs in various languages like node-wit, pywit etc. So if you want to build your server side logic using on nodejs or python you can use these SDKs. The advantage is that you dont have to manage raw APIs calls and instead it is all managed by SDK. Also, other big advantage is that you can make use of runActions method which encapsulates converse API and make things simpler. If you want to build in nodejs then the messenger example is a good starting point. You can borrow all this logic/concept in your app and replace FB related calls etc with your custom bot. For Python you can look at the below link
https://github.com/wit-ai/pywit/pull/55
Also, you can explore the options like using other frameworks like botkit if you plan to integrate wit with other chatbots like FB messenger or slackbot as these frameworks provide more flexibility and ability to easily switch to different chatbots in future. But they don't seem to properly support the converse API of wit.
You are specifically looking for integration details. Since you are using c# for frontend app, natuarally the best option would be to use c# for backend as well. In which case you will be left with directly calling wit APIs from your backend as I think there are no SDKs in c#. If you want to make use of SDK in node or python etc then you will have to build a rest based backend (for example) which can be invoked from your c# application. I am currently working on a nodejs app and integrating it with wit using node-wit. I can share some code once its ready but i dont know when I will be able to finish it. For bootstrapping my application I have used this node application. If you have some understanding of node then you can look at the /server/controllers logic. Similar to this application I have built a witController which uses runAction to interact with wit and I am calling this from front-end when user submits a message to your bot. The biggest challenge in runAction is to figure-out a way to send back the wit response to your front-end and get follow up response from user. Wit sends the response in Send method as you can see in the node-wit's messanger example.
Hope this helps!

Integrating QlikView with SimPro

Has anyone ever tried to integrate QlikView BI application with SimPro business management software? If so, would be interested to know if you were successful and if so how?!!
Dorey.
Jonathan from simPRO here.
I'm not aware of any clients that have an integration with QlikView but it is a well respected reporting platform with a myriad of ways to extract data from other systems.
A quick scout around their documentation tells me that the easiest option for integration would using their QVSource API connector.
Details are here: http://www.qvsource.com/Connectors-For-QlikView/General-JSON-XML-SOAP-Web-API-Connector-For-QlikView
For simPROs API you would use this in "POST" methodology - ie: supplying the post data as per our API docs at: http://api.simpro.co . Our API uses OAuth authentication and there is dome detail and examples on using that with QVsource at: http://wiki.qvsource.com/General-Web-Connector-For-QlikView.ashx
Whilst we may not be able assist technically with setting up the QlikView system our technical support department can assist with any queries you have in regards to our API calls etc...
Hope that is of some help!
I am going to try and respond to your dilemma, while being a QV expert for the last 8 years I am not too familiar with simpro, however I did quickly browse through their API docs here -> http://api.simpro.co/
I have noticed that they support 3 formats, namely soap, json and xml. For qlikview you would choose xml. I have also noticed that they support 2 authentication methods namely basic auth and O Auth. IN this scenario you would be using basic auth (so you can pass a username and password via the url) as this will also work perfectly with Qlikview.
In your Edit Script, you will notice a "Data from files"-> Web Files, then in the popup you can enter the url from where you would retrieve your information from.
Note you need to pass format=xml to the url, along with your basic auth username and password to the relevant url (which you will find in simpro's docs), for any other format you will need QVSource which has a fee attached.
I hope this has pointed you in the right direction.

API help commission junction

Im new to the realm of API and I was wondering do I need to paste the code as is or would I need to add javascript and interface to it myself? Im working with commission juntion datafeeds and developer key to make a website that is similar to www.directtextbooks.com
Below is the website link with the instructions that they provide
http://help.cj.com/en/web_services/Product_Catalog_Search_Service_v.2.htm
You can use the API to get data from cj, but the results of the data is for what ever you want to use it for.
Before you start working with API's you should look into programming applications.