SDK Support for Document Service - sap-cloud-sdk

I would like to connect the Document Service from Java (Spring Boot application deployed in SAP BTP Cloud Foundry environment with multitenancy) and I am wondering about the intended way to connect the document service in a multitenant szenario.
Does SAP cloud sdk helps with connectivity?

If we're talking about consuming the service on the SAP Business Technology platform - then yes. Check the multi-tenancy docs.
The SAP Cloud SDK is a framework for consuming services and usually not the best choice for publishing them. You can use it as a proxy or data adapter, of course, if that's what you need.
For service publishing with multi-tenancy, I'd recommend looking into the direction of the Cloud Application Programming model (CAP)
Are you building OData, OpenAPI or generic REST enabled service? The SAP Cloud SDK can help to consume your service with multi-tenancy out of the box using our OData or OpenAPI code generators and type-safe clients. You can also use the SDK for testing. Please, check the details in our docs.
I'd also recommend checking if the service you're building already exists or you can adapt some other service with help of the SDK.

Related

Issue while accessing SAP S/4HANA Cloud API using SDK or Rest OData

I am trying to consume the SAP S/4HANA APIs from outside SAP (Postman or Java)
I found a couple of options to access it
Using Cloud SDK
Using Rest OData endpoints
https://api.sap.com/package/SAPS4HANACloud
I observed that we can use the Cloud SDK only for the application which is deployed in SAP BTP Cloud foundry.
For Rest OData endpoints, couldn't figure out the settings for authentication for Production URL for SAP S/4HANA Cloud instance
Does anyone know if we can use the Cloud SDK or REST OData endpoints externally from local machine or from Postman?
Note: I am trying these things using a Trial account.
Disclaimer: I'm one of the developers working in the SAP Cloud SDK.
The SAP Cloud SDK for Java is a Java library for developing cloud native applications mostly within the SAP ecosystem.
As such, it is of course very important to ensure that applications can be tested in different environments (e.g. CI/CD pipelines, and also local developer machines).
Hence, the SAP Cloud SDK can be used to connect to remote cloud services from the local machine.
Please note that the SAP Cloud SDK must be included into a Java application, which then needs to be executed - it cannot be run standalone and also has nothing to do with Postman (although it also provides a REST client).
To get started with the SAP Cloud SDK, you may want to have a look at this tutorial: https://developers.sap.com/group.s4sdk-cloud-foundry.html.
It explains how to easily create a new Java application that includes the SAP Cloud SDK and how to consume an OData SAP cloud service from the SAP API Business Hub. The tutorial even explains how to get all of this working with a trial service and from your local machine!

Is the SAP Cloud SDK also able to simplify connecting to non S/4 systems?

The virtual data model (VDM) of the SAP Cloud SDK is designed to make connecting to SAP S/4HANA systems on SAP Cloud Platform easier. Is it possible to also use the virtual data model for other downstream services?
The virtual data model of the Cloud SDK allows to also consume other ODataV2 services coming from for example SAP SuccessFactors or SAP ByDesign. You can also use the SDK capabilities to communicate via REST APIs. More details in this can be found here.

IMobileServiceSyncTable with generic API server

We have built a simple mobile app that connects to ASP.net Web-API 2.
We would like to use Microsoft client SDK for it's offline sync support.
Now that Azure Mobile Apps support custom authentication we could actually take the leap.
I want to know out if the offline sync SDK absolutely requires us to use Azure Mobile App or Azure Mobile Services.
Microsoft documentation is full of how-to guides but does not explain what happens under the hood. The best I could understand, both are just OData rest API's and swagger for documentation.
Can the Azure Mobile Client SDK work with API server created on top of ordinary ASP Web-App, outside Azure?
What is it about the Azure Mobile App that makes the magic happen?
Vladmir,
On top of OData, in order to support features like soft delete, offline sync and others, the Azure Mobile Client SDK expects the server to implement a certain protocol. So although the answer to your question:
[does the] sync SDK absolutely requires us to use Azure Mobile App?
... is no, and in theory, you could implement your own API, but I would recommend against doing so, since (among other reasons) even if you manage to implement the expected conventions and behaviors, this will become a maintenance challenge down the road if you need to upgrade the client SDK to take advantage of bug fixes and/or new features.
The good news is that with the latest release of the Azure Mobile Apps server SDK, adding mobile capabilities to an existing ASP.NET Web API application is trivial, and you should be able to enable the scenarios you're looking for simply by adding the appropriate Table controllers. So you can just enhance your existing application and not have to develop and maintain the Azure Mobile Apps specific logic yourself.
About your last question, since both, the client and the server SDK are both open source and developed in the open, you can look at what what makes the magic happen here:
https://github.com/Azure/azure-mobile-apps-net-server
https://github.com/Azure/azure-mobile-apps-net-client
I hope this helps!
The answer for your first question: Yes the SDK can be used in any Server API you have since it will be your entry point to work with Azure Mobile Services.
The Azure Mobile app creates a mobile services instance which has push notifications and SQL tables to store all messages you would like to send with the capability to customize the message as needed. Also it creates a notifications hub instance under the hood to manage notifications for all mobile platforms. Azure mobile apps provide offline capabilities through native sync services between db on your devices and the server when connectivity is present.
Feel free to ask more questions to have a full understanding on How mobile apps works.
Hope this helps.

How to use my own API instead of using mobile API in Azure

is there any way to publish my API in azure mobile service API instead of using its own. I want just to know it, because assume I have a backup server in amazon and as you know I don't have access to azure sdk in there and it means technically I cant use the API anywhere outside the azure.
Azure mobile services is actually based on the .Net web api in their C# flavor and on node.js on the Javascript side. You could surely write an API using those technology and have the same behavior. You will gain the fact of being more portable, however you will lose some of the preconfigured stuff from Mobile services.
If you are using .NET, please check this to see how to build a Web api! http://www.asp.net/web-api.
If you are using Javascript, here is where you should start : https://nodejs.org/
Both tech are quite easy to learn and super powerfull, have fun! When your API is built, you could just publish them as an azure Web APP (http://azure.microsoft.com/en-us/services/app-service/web/) or an Azure API (https://azure.microsoft.com/en-us/services/app-service/api/) instead of the mobile App
Hope it helps, if you have more questions, please ask!
You can create and publish your own custom APIs in azure mobile service. You could even access in via azure mobile service sdk in client by using "InvokeApiAsync<>()" method.
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn614130.aspx
If you want to access the api via fidder/httpclient than AZM SDK, pass the mobile service key in HTTP header as Name:'x-zumo-application' value:'application key from portal'

AWS Lambda : Can those event can be integrated with API Management Tools?

What i am trying to do:
i am planning to write my mobile back-end api using aws lambda. From the recent releases i got the info, that all events can triggered via aws-sdk on any platform including (android and iOS).
i have done POC for that, and its working fine. But how to manage all those events for metrics? security (OAuth)? Metering?. I know all these can be done via an api management tool. So i planned and chose CA API Management Gateway for doing these.
Where i am struck:
How can i integrate those lambda events in CA API Management Gateway or Any other API Management Gateway?
Extra Question's i have:
Can this be Done?
Will the api scale?
Is it a good idea of building all api in lambda?
There is no easy solution for this, I'm encountering a similar problem. It would be great if Amazon could provide an API gateway functionality for Lambda but they don't seem to at present. It feels like a big hole in their service.
If your CA API gateway has the ability to execute code you could write an intermediary that utilizes the Amazon mobile SDKs as detailed here, otherwise you might need to develop an intermediary application that performs a similar role.
The problem with developing an intermediary application however is then you will need to utilize EC2 compute resources and configure auto scaling mechanisms yourself. It would be much better if Amazon could provide this as a managed service.
Update
Amazon has just announced an API Gateway service.

Resources