I want to query a class album inside a cloud code.
With the rest API I do a http GET request with where={"geo_plz":{"$gte":32000,"$lte":33000},"cost":{"$gte":10,"$lte":20}}
How can I run the same query inside a cloud code?
Related
Hi I Have angular project that's call a rest API and using get request I am able to see my JSON data in postman.
I want to visualize it using GRAFANA. Can anybody help?
Can the namespace preferences and program preferences be set via REST API calls? If yes, what is the syntax for it?
Generally in Cloud Data Fusion, when we intend to perform the action on GCP side, like create/delete/restart etc. instance, it's feasible to use domestic Google Cloud API, giving the opportunity to interact with a service endpoint via JSON/HTTP calls interface as described in Google Cloud API design document.
Dedicated to Data Fusion you can follow the Cloud Data Fusion REST API reference document, nicely explaining the methods for composing REST API HTTP calls to manage Data Fusion instances, moreover every method description from the documentation contains Google API Explorer sub-panel, to get handy experience building JSON request on a live data.
Said above, I assume your initial question is related more to CDAP REST API, as it includes the methods for pure CDAP instance metadata/namespaces/application configuration.
From the user perspective your workflow might be the following:
Identify the CDAP API endpoint as explained in this guideline;
Compose an HTTP PUT/GET request relevant to Data Fusion
Namespace/Metadata/Preferences/Configuration
object via CDAP RESTful API.
Yes of course! You have two methods.
The first method is creating it from the platform. Follow the steps below:
Open your data fusion instance
Go to System Admin => Configuration => Make HTTP calls
To create a namespace, submit an HTTP PUT request:
PUT /v3/namespaces/<namespace-id>
Link of CDAP: CDAP
The second method is using terraform.
I have tried implementing like this to get data from SalesForce DB using the REST api,
uri= ...."/query?q=Select+Acc_Name__c+From+Account__c+where+Acc_ID__c+=+'123456'+Limit+5
HttpGet httpGet = new HttpGet(uri);
This is the syntax i found in here
URI
/vXX.X/query/?q=SOQL query
while this works, I don't really want to expose my query like this in uri, Is there an another efficient way to achieve the same operation using REST api ?
You can't modify the way the REST API works. You can implement your own methods via an Apex Restful Web Service. This would allow you to define a method that receives the querystring via a POST (you could even encrypt it first if you wanted to).
Exposing Apex Classes as RESTful Web Services
I'm trying to access some GET requests data from a personal ngrok webpage (that i created for testing purposes) by using the aws api gateway.
When i'm using the integration request i just can't get the data from the ngrok web page.
What i am trying to do is to catch some data from my ngrok page (by using the Api gateway) and then save them in dynamodb via a lambda function. I read the aws docs but i can find something that explains this process.
Thanks for helping.
One way is, you can have one API GW method that uses a Lambda function as integration endpoint. The Lambda function could get the data from ngrok page and save it to Dynamo.
The other way is, you can have one API GW method with http integration pointing to your ngrok endpoint, and another API GW method with Lambda integration pointing to your Lambda function that puts the data into Dynamo. The caller should call the first method, and then call the second method with the output of the first method. So, the first option is a better one.
I have a REST API created in AWS API Gateway with backend implemented using AWS Lambda functions. There are nearly 50 API calls and underlying lambda functions. Now I want to store each of the API call url, params and request body along with error/response to some log table in our database. Is there any way I can accomplish this without modifying the code of each and every lambda function for the same. I have a custom authorizer lambda function on most of the API calls. So, I thought about writing the logic to insert to DB in that function. But the problem is that I cannot get access to the output in the authorizer function. Is there any other way where I can access the input and output both ?
The custom authorizer function is intended to make authorization decisions only and is not supported for this use-case.
Please see response in AWS API Gateway: Is it possible to add source IP address in each API method?
Thanks,
Ryan