I am trying to configure event arc using node.js code. any idea on how Event-Arc configuration can be done with node.js.
Because there is a lot of lacking information in your question I will have to do some assumptions.
If you want to set up Eventarc, there is a client library for NodeJS available here.
Depending on your use case you either want to read about
Triggers that are listening for Google source (docs)
Third party integrations (docs)
Custom events integration via Firebase (docs)
Related
I have a project in GCP with some internal APIs (in VMs), Databases, and so on.
Now, I'm trying to create a GAS to obtain data from one of those internal APIs (Druid, in my case) to print some data in a Google Spreadsheet.
My point here is that I link the GAS to my GCP project, expecting to be able to connect to my internal IP (10.1.0.x) which is in a VPC, shared with the default one. So, if I start a new VM attached to the default network, I could be able to ping and connect to it. Seems reasonable.
But, when I execute the GAS function, the following pice of code fails: UrlFetchApp.fetch('http://10.1.0.3:8082/druid/v2/?pretty', options);.
Should I configure something else in the GCP project to be able to connect to internal APIs?
Should I change the way and use another GCP service to do so?
Any help would be more than appreciated!
Thanks
That is not supported in Apps Script. You could request a feature request in the bug tracker. See https://developers.google.com/apps-script/support#missing_features
Internal APIs run client-side and need to be incorporated within JavaScript code.
Within Apps Script you can run JavaScript code, if you deploy your project as a Web App.
You can then either embed the JS code within the HTML file attached to the project, or directly insert it within the <script></script> tags within HtmlService.createHtmlOutput().
For a gmail add-on we are developing we need to be able to put different API url's for development vs. production, along with some other configurations. What would be the proper place to put these configurations and how to read them? I saw we can add script properties from Project Properties window and i am guessing we can read them using PropertiesService, but the problem is how can we have different configurations based on environment.
Any ideas?
As you said, store them in the Properties Service, specifically, the Script Properties. You can still access them and modify them after you publish.
I need to start an Activity workflow from an external HTML form (outside activiti). I do not want to use the form that Activiti provides.
I am using Alfresco Activiti BPM Suite v1.4.0. Any pointers ?
If you are running activiti in Alfresco, you can implement a webscript that will receive the post of your form and will start the task.
If you are running a standalone Activiti, you can use the activiti REST api.
I do not have code to share but the documentation should be enough to get started.
You can find a good example at: Rest API
This makes use of Spring Boot. In practice, you can develop your REST API that starts the process and then you can call the service directly from the browser using Ajax, or post to your application and execute the REST call from there.
To be honest, I have never done it, but it seems a possible solution.
I understand that creation of Rest api documentation using swagger Ui generates a few jsons
Do other developers need to use swagger UI installation on their laptop to view these ?
What is the best way to view such a documentation
The general way is to host your own swagger ui instance on your servers, exposing the REST documentation. When all fails, and assuming you've enabled CORS, you can use the online petstore and paste the URL to you Swagger there.
I am building an App in Flash using graph API, I would like to post a request to increase count next to the app bookmark (as detailed here: http://developers.facebook.com/docs/requests/), all the documentation refer to either:
server-side (PHP SDK) where there is no problem using the 'app secret' to retrieve app_access_token, or
using FB.ui which requires user interaction, which is not what I am trying to do.
Is there a way to send an apprequests (App to User) via JS SDK only?
Could it be that this feature does not work in sandbox mode?
UPDATE: solved. worked it out.
I use the server to retrieve the app_access_token (only for a valid logged in user), once having app_access_token there is no problem using standard api calls from within flash.
UPDATE: solved. worked it out.
I use the server to retrieve the app_access_token (only for a valid logged in user), once having app_access_token there is no problem using standard api calls from within flash.