Welcome to this series of hands on tutorials from the SAP HANA Academy
I'm Philip Mugglestone
in this series, we're covering the SAP Business Technology Platform
in this video tutorial we're going to have a look at SAP API Business Hub,
This is where you can discover, explore and test different types of content
to help you accelerate your integration and extension scenarios.
So for example we might want to look at
different API s or events or business processes.
Either for SAP products such as SAP S/4HANA Cloud or
SAP SuccessFactors or even for products available via partner.
So you go to API dot SAP.com and then you'll get the main
landing page for SAP API Business Hub and it's a very comprehensive environment.
You can do searching in all sorts of different
ways or you can go through the different kind of
categories that we've got set up here so you
can discover different products processes or discover new partners,
you can explore and see how the A.
P. I. S. Or events etcetera work in detail,
you can different types of integrations and workflows.
So for example in terms of the products,
you can see there's a tile for all sorts of different products.
The main line of business systems we get from SAP are covered here but also
you see that SAP BTP is there as a product because there are different API s
specific to when you're working within SAP BTP itself,
then we've got business processes here,
we can see for example lead to cash Source to pay different business processes
and if you look At that what we'LL be able to see
our in particular different types of
architecture view for those business processes.
If we look at categories,
we'll see that we've got for example, API s events integrations, adapters
and they're actually quite a lot.
There's actually over 1000 different rest API s actually hundreds of
OData API s all sorts of API S and things available.
Also, for example, information on open connectors are 100 and 70 rest API s
that allow you to access non SAP systems.
So if you want to learn more about those for example,
you want to access Act-On or Acuity or Amazon S3,
then we've got all sorts of API S for doing that and
open connectors as part of integration suite makes that very easy.
If we look at industries,
you can see we've got different types of industry where you can look at API s.
and content for those industries
and if we look at partners, you'll see that there are a number of different partners,
there are actually quite a few
that are highlighted in SAP API Business Hub and learn about
those API S actually directly from SAP API Business Hub.
So for example, here is one good example with some geospatial kind of API s,
well these are integrated into SAP API Business Hub so
we can actually find information about those API s
and actually learn to get
started with them very very easily now as an SAP partner,
you may also warned that your API is actually appear within the SAP API Business Hub
now I may be interested in looking
at sales orders as one example from SAP S/4HANA Cloud
so I know it's SAP S/4HANA Cloud I can click on the tile or I could also
search on it here and then within SAP S/4HANA Cloud
you see we've got API these events,
CDS views etcetera etcetera.
So I'm going to go for API S and then we've got different types of API now probably the
easiest thing here is just to search on sales order and
then we can see we've got SOAP and OData API yes
it's this Sales Order (A2X) that I'm gonna maybe work with allow me to create,
read update so CRUD events basically on
sales orders
so I can select the tile now I get lots
of useful information about this and it's pretty much the
same for any API this is just one example then
we can see we've got access to the business documentation,
we've got different resources here for example
we can see in this SAP S/4HANA Cloud case
that what's the communication scenario it's based on
so its sales under integration has become a
109 we can see what kind of authentication we can do what the business object is,
we can also see for example the configuration details so that will allow us to
know what would the endpoint look like when we want to actually access this API now
when we work with SAP API Business Hub typically
we'll get a sandbox made available for us
that we can actually use to do some simple kind of queries typically read only,
but of course you can also want to use SAP API Business Hub to help you get
started and working when you're working with real
productive environments of a real SAP S/4HANA Cloud tenant.
What we can also do is look at the API reference,
so we can get a swagger kind of UI so we can
actually actually see what's in the different endpoints for the sales orders,
for example, we've got to get,
you can see the different options available etcetera, etcetera.
And you can also see what the different kind of results you should get are,
we can have a look at the schemer,
so if you want to see things from more from an entity perspective,
we can have a look at that and see the structure of
the things that are returned or things you need to put in.
If you're going to use the SAP Cloud SDK then that makes things much easier,
either with java or javascript in terms of how you can access
this API
so you get information here about how to actually get started with the
SAP Cloud SDK to do that and something that's really useful is the ability
to try out either using the sandbox or even a real SAP S/4HANA Cloud system.
So from here, you can actually try out the different API s now to do that,
you're going to need to have an api key
and for the sandbox system it's very easy what you just
need to do is to log in to SAP API Business Hub
now you can use your regular SAP.com account so if you
work with the community or you've got a SAP BTP global account,
you have access to using the SAP identity provider,
then you can use that in terms of your credentials to log into SAP API Business Hub,
I'm gonna go ahead and log in
and now if we go to the tryout option we can see we get details,
we're looking at the sandbox so the one provided by appear business hub,
we can have a look at these various different API maybe get the sales orders,
maybe we'll just get the top three sales orders and we
can then go ahead and actually go ahead and run it.
So let's hit run
and you'll see it's generated as the right URL for making
that kind of request using the API we've got a 200 response
and here we can see we've got the actual response body,
you can actually go ahead and run the API is directly here from
SAP API Business Hub.
Now what's quite nice here,
is that actually as well as getting a response if you go to the request section,
you can see we can access code snippets
so if you're using java script or java or curl
or SAP BTP, ABAP environment
you can actually look at the source code
that's needed to make this kind of call to the API that
maybe will help you accelerate how you integrate API into your applications.
So the code snippets can be very useful now in addition to working with the sandbox,
it's also possible to access real systems
and not every API in
SAP API Business Hub actually has a sandbox provided.
So in this case what we can do is say add a new environment because I have a real
SAP S/4HANA Cloud system.
So for that I'll just go over to my SAP S/4HANA Cloud environment to my tenant.
We see I've actually got some communication arrangements so I'm going
to search find the right one that's been set up,
notice that it's using the scenario
SAP_COM_0109 that's what we actually saw in the definition
and then we can see we've got a technical user set
up and we're here we can see the Sales Order (A2X)
that is the OData to URL So what we
need to do is just to basically take the tenant information.
So the bit after the https up to where we actually get the path
and copy that and then we need to paste that in here as the
host you see now it fills in the resulting URL we need to put support
typically https so it's gonna be 443, give it a name
and you need to specify the authentication.
So we've got our user name and we saw we had the communication arrangement there,
so we've got a communication user
and of course you'll need to paste in the password for your communication user.
Of course you set all of that up in SAP S/4HANA Cloud
and then you can say you want to actually use this environment just for this session
until I log out or close the browser or save it for the future.
So it's it configure Now we've got that environment we can go ahead and actually run
and this time you see it's run
the query basically against our SAP S/4HANA Cloud system.
We've got our results which are now based on
S/4 SAP HANA Cloud system, we can see our results.
It's actually slightly different results to what we got with the sandbox.
So that's a quick look at how we can really get working with an API
Now, if you go to the SAP HANA Academy on our channel,
you'll find that we've got lots of videos that reference SAP API Business Hub.
And in terms of sort of end to end scenarios.
So if we look for example at SAP Extension Suite,
we've got a series looking at extending SAP SuccessFactors using API VS
and in there you'll find that there are videos
that actually show you SAP API Business Hub and similarly we've
got stuff for SAP S/4HANA Cloud using API s we've got
stuff for looking at SAP Fieldglass etcetera etcetera.
So you'll find lots of good examples of doing
that on the SAP HANA Academy what you'll also be able to
find is that we actually have an extension generator or
jump start generator which covered in this series here,
which actually shows you how you can actually
get going working with building extension apps in SAP BTP
and a key part of that is actually how you can connect to different API s so we can see,
we've got an example here using SAP Ariba using the SAP API Business Hub sandbox,
we've got examples using conquer
and we've got lots and lots of other examples as well very quickly.
Let's just have a quick look at how we might do that now, what we need to do is to go to
in this case SAP Business Application Studio where I've got the
jump start generator for SAP Cloud Application Programming Model actually installed,
so go ahead and start it.
So we've got lots of different settings, you'll see more of this in the video series,
but I'm just going to get something very straight forward,
I'm not gonna bother working with SAP HANA Cloud or anything,
but I am going to look at external API s so
you can see that I'm going to work with the sales,
order a two X API that's the one we've just been looking at and actually why not,
why don't we actually have a look at a non SAP one.
So we've also got the here location service, we saw that earlier,
but you see there are lots of different API s that are provided as examples Now,
if you want to work with the here location services, you'll need an aPI key,
there's not actually a sandbox available on SAP API Business Hub for that.
So for that one,
what you need to do is you go to your here developer
account and then you can create for your project and API key
and then you can just simply copy
and pace that API key in here and it will get used
and as we're going to be working with the SAP API Business Hub sandbox.
In terms of the sales orders
then for that we'll need to get our
aPI key and when you're logged into SAP API Business Hub
then simply just click the show API key button,
it will show you your API key
and you can use the copy key and close
and then simply paste that value in
here. So that's all we need to do.
Let's go ahead and just click next and it will actually scaffold out a project for us
so we can see on the left we've got a project and in there let's notice that we've got
access to different external API yes, we've got the sales order service, API
and we've got the location services from here API we can see some of
the specific code but what we can just simply do is open up a terminal
go to our project folder.
We can try cds watch,
you can see it's connecting to the different endpoints
of the systems that we're going to work with.
So it's working by default with the sandbox
can actually open up the generated UI
you can see we've got sales orders and geo codes
and if we have a look here
now we can see we're getting sales orders
and this is coming out of the SAP S/4HANA Cloud
sandbox, fire, SAP API Business Hub and we can look at geo coding,
we can again we can see we're getting some geo code information
and it's calling that here API
So if you want to see all of the detail then just go to the source code,
you actually understand how it all works
and of course when you want to deploy to something more productive
then you will typically have destinations so you can see
that the destination service in SAP BTP is set up here,
pointing initially to the sandbox or to the test environment for here,
but of course you can go and then configure that to
use real destinations that point to real back end systems.
So in this video tutorial we've seen SAP API Business Hub we've
actually discovered explored consumed different API s we looked at here,
we looked at
sales orders in SAP S/4HANA Cloud of course there are
hundreds and hundreds of others that you could do
but the SAP API Business Hub is a great place to come to get a real
consensus of what is available in terms of API S actually get working learning,
playing with them and then really moving on
to actually working with those in production.
So that's the SAP API Business Hub.
You can find more video tutorials on our Youtube channel
if you'd like to be informed as soon as new video tutorials are published,
then please subscribe.
Thanks for watching.