Hi, welcome back to our video tutorial series about developing applications with SAP Ariba
APIs.
I am Denys van Kempen from the Digital Partner Engineering team of SAP’s global partner
organisation.
In the previous video, we started our investigation of SAP Ariba Network APIs and looked at the
Discovery RFx Publication from External Marketplace API and showed how we create a buyer user.
In this video, we will continue working with Ariba Network and look into its twin cousin
API: Discovery RFx Publication to External Marketplace.
Time of recording is December 2019.
For updates, please check the SAP Ariba API playlist on our YouTube channel.
okay Now, in the public sector it is not uncommon
for companies to have the obligation to publish their RFx documents also to a publicly available
website, a portal.
The Discovery RFx Publication to External Marketplace API enables you to do this.
to automate this no need for copy-paste.
okay Let’s start with the documentation.
help.sap.com SAP Ariba API
and here we have Discovery RFx publication to external marketplace
API with the use cases
and the prerequisites.
you have to go through this at some point, as there are couple of things the we need
to set up first.
some of it is self-service, you can do this yourself in Ariba Sourcing
but there are also some parts that need to be done by Ariba Support.
Here we have the workflow and here is the how-to
That’s the part, we will focus on in this video: the APIs.
Let’s briefly switch to the API specification in the SAP API Business Hub.
For outside-in, we only had a single API to create a buyer user.
For this one, inside out, there is a bit more we can do with the API.
We have three GETs One POST and one PUT
those are the verbs The first GET works with /events
The other two and the PUT with /site, site ID, events
and the POST with /action /site / site ID, events
For how to work with them, we need to go back to the documentation
In step 1, we need to call GET site site ID events
As described here, when a RFx event is created it is pushed to a message queue specific to
your site and with GET site events we can retrieve the
event from the queue Now there is a count and there is a buyer
ID but we will get into that in a minute Then, step 2, optionally - we can GET the
attachments - same URL In 3, then, there is a branch split
If bidding takes place within Sourcing, we do a POST action acknowledge to remove the
event from the queue Otherwise, we need to identify the bidding
site URI with PUT site, site ID, events Step 4, optional again, enables to check the
status with GET events.
So, that’s this one here.
The procedure started with GET events, optionally event attachments,
Then a POST to remove the event from the queue for bidding in Sourcing
or a PUT to identify the bidding URI OK - how does that look like on our Ariba
Developer portal?
Discover Ariba Network
Publication to external marketplace Here we have the runtime URL: openapi.ariba.com
api discoveryrfx and then here
GET events Now, this looks exactly the same as on the
API hub So, it is just a matter of preference
okay - for the GET we have three required parameters
the API key is common to all we need to provide authorization
site ID and optionally the rsqlfilter
We can try it out here but then we would need to know what to put in
The documentation, like with the previous API, is a bit sparse
and we could say the same for responses.
So, let’s switch to Postman I have put all the APIs in a collection
and a folder Discovery RFx Publication to external marketplace
The authorization used here is Basic with username and password.
Now password123 is not exactly a recommended value, of course
and this is because we will be querying a sandbox environment
and not a live production one So, the username password will not be checked
against any real account.
In the real world, we would need to create an RFx first in Sourcing,
and then this would needs to be approved, etc. -
and that’s all a bit out of scope for our API discussion today.
okay Here we have GET site site ID events
with the runtime URL from the collection environment We need to provide the site ID as path variable
We need to provide authorization: username and password - this comes from our collection
as well In the header the API key - which comes from
our environment Send
And this returns the events for our site ID with the event ID
attachments the RFx identifier
Posting ID buyer network ID
with discovery URL We can also add an RSQL filter
In count, we can specify how many records we want back
and in buyer provide a Ariba Network Buyer ID.
Step 2 - from the procedure - was an optional one
With this GET query we can download any attachments We need to add the event ID and CID in the
path. and when we run this we are getting a sample
text file to show that this works but not the actual attachment, the PDF, as were are
in a sandbox.
The event ID and CID, we can get from the GET of step 1.
okay - step 3 here we would either do a POST for situations
where bidding takes place within Ariba Sourcing, to remove the message from the event queue
or a PUT to identify the bidding site in case bidding is going to take place somewhere else.
with site ID and event ID as path variables authorization
and API key in the header - this is the same for all APIs in this collection
In the PUT body, we provide the URL And this returns a 200 OK - event updated
with bidding URL The POST has no body
and returns 200 OK but no response Last one - number 4 GET RFx event status
As query filter, we need to provide the global unique identifier (GUID) as rsqlfilter query
parameter, comma separated, and we can put, up to 45 GUIDs in.
The GUID comes from our first query, here, statusCheckId
okay - that’s it for SAP Ariba Discovery RFx publication to external marketplace
In the next video we will continue with the other Ariba Network APIs.
Thank you for watching