Get data from Salesforce using webAPI - asp.net-web-api

I am trying to create a middleware between SAP and Salesforce. It is a .NET RESTful service.
If SAP desires any data, it will pass parameters to my .NET API which in turn will query Salesforce for the same. It should fetch the data and return as XML to SAP.
My first step is to build a webAPI and fetch sample data (about 10-20 rows) from Salesforce developer account.
I referred to Salesforce documentation on how to setup Remote Access for external applications which uses oAuth. The Remote Access documentation page looks a bit obsolete.
I want to know whether I need to enable Remote Access first in Salesforce and expose endpoints for my .NET Service to consume it? Where can I find updated Remote Access oAuth documentation for interacting with the .NET webAPI?
The link I referred is this: Consuming Force.com SOAP and REST Web Services from .NET Applications

Related

How to talk with ABP API from windows service

This is what I would like to build. A hosted web/api project built on APB where tenants can use the web application to define "Scan Definitions" that run inside their network. A scan definition would just contain a target IP Address to be scanned with WMI. They would download and install a windows service that would run periodically in their network. The service would communicate with the APB web API to retrieve scan definitions, then run the scan and upload the resulting scan data into the APB web API. Then the users would be able to view that scan data within the web app.
My question is with the CORS access in place, how can I make it so that the windows service is allowed to talk with the API. Also what is the best way to authenticate the service with api such that the service would know which tenant it should be using so that it pulls down the correct scan definitions and uploads the data to the correct tenant as well.
Thanks in advance for any help or guidance.
I was able to get a service up and running by following the abp sample found here: https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/ConsoleRemoteWebApiCall/CallApiFromConsole
I still have things to work through, but it's gotten me to a spot where I can access the api from a console application

How to Send a Rest API to Autonomous Database of Oracle?

I'm struggling to send a Rest API request to Oracle Database (using Postman).
first issue: there are three types of Autonomous Databases (ATP, ADW, AJS) that will help me. I already created all 3 types in my oracle cloud server.
what type of authentication do I need to use? It seems "Basic Auth" with user: ADMIN and password that I defined?
What API endpoints are available to use? it is a bit confusing, in the attached screenshot I reach different articles that I'm not sure which one to use!
ORDS and SODA for REST (3) supports many different authentication mechanisms. JSON document store REST services (you choose ADJ) are intended to be used in server-to-server interactions. Therefore, two-legged OAuth (the client-credentials flow) is the recommended authentication mechanism to use with the JSON document store REST services. However, other mechanisms such as HTTP basic authentication, are also supported.
The default when installing on Autonomous is HTTP basic authentication. Most of examples uses database schema ADMIN, which is REST-enabled by default.
A good first start point is :
If you are working with ADJ, https://docs.oracle.com/en/cloud/paas/autonomous-json-database/ajdug/create-applications-ords-autonomous-database.html
If you are working with other ADB flavors : https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/ords-autonomous-database.html#GUID-E2E921FF-2D80-4E32-9660-28506D10BADB
Those documentations provide links to the documentation referred in your image.
e.g to see the SODA collections availables, the endpoint is https://your-ords-uri/ords/admin/soda/latest/.
To find the URI (Service Console / Development / RESTful Services and SODA) :
As I said, the default is basic Auth. You can also disable security and allow anonymous access for Development and Testing
For relational tables, there is additional privileges to be managed using ORDS PLSQL package before using Postman. Follow the documentation
Hope that this can help

Identity server communication with DB - Security concerns

I need quick help regarding Identity server.
There is a client requirement to not allow any public hosted application to directly talk to the database. In Identity server's case, the Identity server will be hosted publicly for token endpoint, and it queries the database for operational data (went for Db approach with reference tokens because IDsrv will be on NLB). Is there any workaround for this? or is this standard practice?
Thanks
If you don't want IdentityServer to talk directly to the database, you will need to implement & register custom implementations of ICorsPolicyService, IAuthorizationCodeStore, IClientStore, IConsentStore, IRefreshTokenStore, IScopeStore, and ITokenHandleStore, that call off to some an external app that can talk to the database.
Normal operating procedure is to have IdentityServer talk directly to the database. I don't see much merit in separating the two.
FYI: You don't need to use reference tokens if you are using load balancing. Check out the deployment docs.

Parse.com and ASP.Net Cloud code

I am new to Parse.com and used it's iOS SDK successfully to interact with Database at Parse.com as backend.
Now I am looking at creating a simple web service using ASP.Net and C# and want to deploy it to Parse.com Cloud. I googled extensively and not able to find any pointers on this. All the Parse Cloud Code documentation refers to writing Cloud Code using JavaScript.
Do Parse.com cloud supports ASP.Net and C#?
Parse cloud code runs on top of the Node.js Express framework with support for a limited set of npm modules.
You could deploy your ASP.NET web site to a service like Azure websites or another webhost and look at Parse's new webhook tool that lets Parse communicate with your web application.

Cloud / server side code with Apigee or Usergrid

Is it possible to execute server side code (something like Parse "Cloud Code") with Apigee, as backend for a mobile app as client?
I'd want to use the out of the box "App Services" functionality, but perform some extra stuff (like updating data) from the server side,
The only (naive?) way I can think of is this:
Have my own server running.
The mobile app uses standard "App Services" API on Apigee
If necessary, the client calls
some custom API on my server,
which lets my server call Apigee via REST to fetch data, calculate some results, and post the updated data Apigee
and then returns the result to the client
Sounds a bit complicated (especially in terms of handling authentication) - are there any best practices to achieve something like I described?
Thanks!
Consider App Services as your database in the cloud to which you can talk using APIs. Therefore, you really don't need that server in the between unless you are doing some heavy lifting in it. You could make that API call directly from the app.
Even if you want to have a back end server for your app, you can leverage the node.js functionality that Apigee Edge provides and have a server up and running in the cloud in quick time. More info can be found here
If you want to do server side validation, you should use a Node.js proxy that incorporates Usergrid. This will allow you to perform a query on the database and do processing of the results. Check out this presentation: https://speakerdeck.com/timanglade/coders-workshop-at-i-apis. In particular, see Section 7, which discusses using Usergrid and Node.js.

Resources