08-11-2023 7:04 AM - edited 08-11-2023 2:37 PM
(Check out the SAP Developer Challenge - APIs blog post for everything you need to know about the challenge to which this task relates!)
It's time to take a look at what the SAP Business Accelerator Hub has to offer in terms of APIs.
The SAP Business Accelerator Hub (formerly known as the SAP Business API Hub) is the central location for all things APIs.
While APIs are key resources on there, the hub contains other types of resource too, including:
and much more.
But we're interested in APIs, which are generally organized by product, and within product, by package. For example, the SAP Business Technology Platform product has APIs, Events, Integrations, Business Process and Workflow Management resources.
Selecting the APIs category, you'll see that the APIs are organized into categories (such as SOAP, OData V2, OData V4 and REST) and presented in packages. You can see this clearly on the packages page for the SAP Business Technology Platform product:
Once you choose an API package, you will find one or more APIs, each of which have one or more endpoints, which are usually arranged into endpoint groups.
You may find this diagram, taken from the Learning about the API structure, authentication and use section of Exercise 05 - Preparing to call a Core Services API of the Hands-on with the btp CLI and APIs SAP CodeJam material serves as a helpful example of this:
+-------------+ | | | API Package | Core Services for SAP BTP | | +-------------+ | +-------------+ | | | API | Entitlements Service | | +-------------+ | +-------------+ | | | Group | Regions for Global Account | | +-------------+ | +-------------+ | | | Endpoint | /entitlements/v1/globalAccountAllowedDataCenters | | +-------------+
This example is from the Core Services for SAP BTP API package.
Your task is to find and explore the Date and Time API (which lives in its own dedicated package) on the SAP Business Accelerator Hub. It's in the REST category, and has an API specification available in both YAML and JSON formats. Specifically, you should download the API specification either in either of those two formats (your choice).
You should then write a script to parse the downloaded specification, to determine the API endpoints ("paths") that have both of the following properties:
You should take that list of paths, sort them and then join them together with colons, into a single string, with no spaces. That single string is the value that you should then send to the hash function and post the resulting hash as a new reply to this discussion thread, as described in Task 0 - Learn to share your task results.
For example, if you determined that the endpoints paths that fit these conditions are:
then the string you should produce to send for hashing should be:
/anotherEndpoint:/endpointOne:/endpointTwo
In order to download API specifications from the SAP Business Accelerator Hub, you'll need to be logged in. You must download them manually via the browser (i.e. rather than retrieve them via another HTTP client).
Response representations are declared using MIME types, and the MIME type for JSON is application/json.
If you want to parse YAML, and you're a JavaScript fan, you may find the js-yaml module useful.
The API specification is available in two formats - JSON and YAML. Often for APIs there is also a third format - EDMX. Why isn't that available here?
Which API specification format did you choose, and why? Do you prefer parsing YAML or JSON?
How did you apply the endpoint conditions described above, and in what language?
08-15-2023 6:15 PM
08-15-2023 8:34 PM
08-16-2023 9:22 AM
08-16-2023 10:47 AM
08-16-2023 11:25 AM
08-16-2023 6:05 PM
08-16-2023 9:56 PM
08-17-2023 7:01 AM
08-17-2023 8:23 AM
8ec53eda298d86453c8b713b777d31012937ab63203023521278f003eedf0555
I did get the API descriptor from the net:
https://api.sap.com/odata/1.0/catalog.svc/APIContent.APIs('DateAndTime')/$value?type=json
08-17-2023 9:00 AM
Nice find 🙂 @nicoschoenteich and I were discussing this resource yesterday, and I'd said I'd not highlighted it as I wasn't sure it was an official and "open" endpoint. But as you mention it, it's great, right? 🙂
08-20-2023 12:11 PM
08-23-2023 7:14 AM
08-29-2023 1:14 AM
wow, I did the same trick to download all API from SAP API Hub to examine them and map with the legacy table field.
08-29-2023 7:53 AM
08-17-2023 9:25 AM
08-17-2023 2:07 PM
08-17-2023 2:22 PM
08-17-2023 4:40 PM
08-18-2023 3:37 AM - edited 08-18-2023 6:17 AM
08-18-2023 8:32 AM
08-18-2023 3:17 PM
08-18-2023 4:21 PM
08-18-2023 11:10 PM
08-19-2023 9:26 AM
08-19-2023 9:16 PM - edited 08-19-2023 9:20 PM
08-21-2023 5:36 AM
08-21-2023 12:21 PM
08-21-2023 1:34 PM
08-21-2023 9:06 PM
08-22-2023 7:51 AM
08-22-2023 7:59 AM
08-22-2023 9:05 AM
08-22-2023 11:42 AM
08-24-2023 1:19 AM
08-24-2023 6:40 AM - last edited on 08-24-2023 9:06 AM by Former Member
08-24-2023 10:41 AM
08-24-2023 10:39 AM
08-24-2023 1:45 PM
08-25-2023 6:39 PM
08-27-2023 4:39 PM