<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278835#M2921</link>
    <description>&lt;P&gt;aa577776e777a0b574d6c38b74cc374b8d72e2debc61997868b543e9fab2ab5f&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 10:55:27 GMT</pubDate>
    <dc:creator>RaulVega</dc:creator>
    <dc:date>2023-08-11T10:55:27Z</dc:date>
    <item>
      <title>SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278745#M2897</link>
      <description>&lt;P&gt;(Check out the &lt;A href="https://blogs.sap.com/2023/08/01/sap-developer-challenge-apis/" target="_blank" rel="noopener"&gt;SAP Developer Challenge - APIs&lt;/A&gt; blog post for everything you need to know about the challenge to which this task relates!)&lt;/P&gt;&lt;P&gt;It's time to take a look at what the SAP Business Accelerator Hub has to offer in terms of APIs.&lt;/P&gt;&lt;H2&gt;Background&lt;/H2&gt;&lt;P&gt;The &lt;A href="https://api.sap.com" target="_blank" rel="noopener"&gt;SAP Business Accelerator Hub&lt;/A&gt; (formerly known as the SAP Business API Hub) is the central location for all things APIs.&lt;/P&gt;&lt;P&gt;While APIs are key resources on there, the hub contains other types of resource too, including:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://api.sap.com/allprocess" target="_blank" rel="noopener"&gt;Business Processes&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://api.sap.com/discoverintegrations" target="_blank" rel="noopener"&gt;Integrations&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://api.sap.com/content-type/Events/events/events" target="_blank" rel="noopener"&gt;Events&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://api.sap.com/content-type/Workflow/workflowmanagement/packages" target="_blank" rel="noopener"&gt;Process Automation Packages&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and much more.&lt;/P&gt;&lt;P&gt;But we're interested in APIs, which are generally organized by &lt;A href="https://api.sap.com/allproducts" target="_blank" rel="noopener"&gt;product&lt;/A&gt;, and within product, by package. For example, the &lt;A href="https://api.sap.com/products/SAPCloudPlatform" target="_blank" rel="noopener"&gt;SAP Business Technology Platform product&lt;/A&gt; has APIs, Events, Integrations, Business Process and Workflow Management resources.&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.sap.com/assets/sap-btp-api-packages.png" border="0" alt="" /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sap-btp-api-packages.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/41832iDD33996AC0AA9AAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="sap-btp-api-packages.png" alt="sap-btp-api-packages.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;You may find this diagram, taken from the &lt;A href="https://github.com/SAP-samples/cloud-btp-cli-api-codejam/blob/main/exercises/05-core-services-api-prep/README.md#learning-about-the-api-structure-authentication-and-use" target="_blank" rel="noopener"&gt;Learning about the API structure, authentication and use&lt;/A&gt; section of &lt;A href="https://github.com/SAP-samples/cloud-btp-cli-api-codejam/blob/main/exercises/05-core-services-api-prep/README.md" target="_blank" rel="noopener"&gt;Exercise 05 - Preparing to call a Core Services API&lt;/A&gt; of the &lt;A href="https://github.com/SAP-samples/cloud-btp-cli-api-codejam" target="_blank" rel="noopener"&gt;Hands-on with the btp CLI and APIs&lt;/A&gt;&amp;nbsp;SAP CodeJam material serves as a helpful example of this:&lt;/P&gt;&lt;PRE&gt;+-------------+
|             |
| API Package |      Core Services for SAP BTP
|             |
+-------------+
       |
+-------------+
|             |
|     API     |      Entitlements Service
|             |
+-------------+
       |
+-------------+
|             |
|    Group    |      Regions for Global Account
|             |
+-------------+
       |
+-------------+
|             |
|  Endpoint   |      /entitlements/v1/globalAccountAllowedDataCenters
|             |
+-------------+&lt;/PRE&gt;&lt;P&gt;This example is from the &lt;A href="https://api.sap.com/package/SAPCloudPlatformCoreServices/rest" target="_blank" rel="noopener"&gt;Core Services for SAP BTP&lt;/A&gt; API package.&lt;/P&gt;&lt;H2&gt;Your task&lt;/H2&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;You should then write a script to parse the downloaded specification, to determine the API endpoints ("paths") that have &lt;EM&gt;both&lt;/EM&gt; of the following properties:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the endpoint is accessible with the HTTP GET method&lt;/LI&gt;&lt;LI&gt;responses returned from the endpoint are in JSON&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;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 &lt;A href="https://groups.community.sap.com/t5/application-development/sap-developer-challenge-apis-task-0-learn-to-share-your-task/m-p/276058" target="_blank" rel="noopener"&gt;Task 0 - Learn to share your task results&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;For example, if you determined that the endpoints paths that fit these conditions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/endpointOne&lt;/LI&gt;&lt;LI&gt;/endpointTwo&lt;/LI&gt;&lt;LI&gt;/anotherEndpoint&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;then the string you should produce to send for hashing should be:&lt;/P&gt;&lt;PRE&gt;/anotherEndpoint:/endpointOne:/endpointTwo&lt;/PRE&gt;&lt;H2&gt;Hints and tips&lt;/H2&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;Response representations are declared using &lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types" target="_blank" rel="noopener"&gt;MIME types&lt;/A&gt;, and the MIME type for JSON is application/json.&lt;/P&gt;&lt;P&gt;If you want to parse YAML, and you're a JavaScript fan, you may find the &lt;A href="https://github.com/nodeca/js-yaml" target="_blank" rel="noopener"&gt;js-yaml&lt;/A&gt; module useful.&lt;/P&gt;&lt;H2&gt;For discussion&lt;/H2&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;Which API specification format did you choose, and why? Do you prefer parsing YAML or JSON?&lt;/P&gt;&lt;P&gt;How did you apply the endpoint conditions described above, and in what language?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:37:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278745#M2897</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-11T13:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278758#M2899</link>
      <description>&lt;LI-CODE lang="markup"&gt;2a23f73d8853d5eedef0239a8d303c15a9be84a57abd2e26794a638724aaf0f2&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 11 Aug 2023 06:57:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278758#M2899</guid>
      <dc:creator>abdullahgunes</dc:creator>
      <dc:date>2023-08-11T06:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278771#M2900</link>
      <description>&lt;P&gt;That was fast! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 07:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278771#M2900</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-11T07:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278773#M2901</link>
      <description>&lt;P&gt;b2d99205831548e9de1cd05ae4f8dfb2a8b5ab2e231d8906f069ec5b99c890e1&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 07:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278773#M2901</guid>
      <dc:creator>fenna</dc:creator>
      <dc:date>2023-08-11T07:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278779#M2902</link>
      <description>&lt;P&gt;657f3187f8af8cb9beddbf3c39466a945e228082395189d0cac2542a90a39468&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 01:24:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278779#M2902</guid>
      <dc:creator>bztoy</dc:creator>
      <dc:date>2023-08-12T01:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278784#M2904</link>
      <description>&lt;P&gt;9aabbb9c6c040e33e1ad591d7b85152ef8c4606d19b8ef10e08c81561b76098f&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 08:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278784#M2904</guid>
      <dc:creator>AAncos</dc:creator>
      <dc:date>2023-08-11T08:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278787#M2906</link>
      <description>&lt;P&gt;d2f7ac29c29841c3e387b756732d1a8a96fd1998f8a4e6b6478d2592b2a78057&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 08:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278787#M2906</guid>
      <dc:creator>SebastianSchuck19</dc:creator>
      <dc:date>2023-08-11T08:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278789#M2907</link>
      <description>&lt;P&gt;I take a short break from my daily job to do this assignment so submitted my answer with 1 solution first, will cross check and add more stuff later.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;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?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I remember&amp;nbsp;that we had a discussion about this in the b2b hands-on and you already gave us the answer but my bad, I forgot it already. I will re-run that session again. &lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IMO, I think the EDMX is written in full technical details and the CDS can help compile the API into the EDMX format if needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Which API specification format did you choose, and why? Do you prefer parsing YAML or JSON?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In coding I prefer JSON because I familiar with the tools to work with it but for reading, YAML is very nice for me.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How did you apply the endpoint conditions described above, and in what language?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I've done it with bash script.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Updated#1]&lt;/STRONG&gt; I didn't read the instruction carefully then I wrote a script that produce a wrong hash value. I fixed it with 2 version of code (hopefully I have the right answer now &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;).&lt;/P&gt;&lt;P&gt;I would like to share something that I've learned here.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="task-4.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/41910iEF95EA4F38E23135/image-size/large?v=v2&amp;amp;px=999" role="button" title="task-4.png" alt="task-4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Method 1: using jq functionalities&lt;/P&gt;&lt;P&gt;1. I transform the JSON input file to new JSON format with to_entries and map as the following code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;jq '.paths | to_entries | map({endpoint: .key, produce: .value.get.produces[0]})' &amp;lt; "$api_spec_json_file"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the above statement create a JSON string in format a list (array) of objects with 2 key fields including "endpoint" and "produce" like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="json"&gt;{
    "endpoint": "/getTimezoneFromLocation",
    "produce": "application/json"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the key player is the map function that help transform individual objects back to an array with new user define keys.&lt;/P&gt;&lt;P&gt;2. then, I use map, select, sort and join to produce a string of endpoints separated by : with below command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;echo "$transform_json" | jq -r '. | map(select(.produce=="application/json").endpoint) | sort | join(":")'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use -r option to ask jq to return raw string, select only record I want with select (this was my mistake in the 1st answer), sort the output then join them together with join function.&lt;/P&gt;&lt;P&gt;If anyone are interested and would like to learn more in this topic, I highly recommended this &lt;A title="Reshaping data values using jq's with_entries" href="https://qmacro.org/blog/posts/2022/05/30/reshaping-data-values-using-jq's-with_entries/" target="_self"&gt;blog&lt;/A&gt;&amp;nbsp;by DJ ADAMS which I found it from a google search. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 2: Use jq and POSIX commands&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Please note that&lt;/STRONG&gt;, I am a new UNIX/Linux user(but really like it). If you have a question why I use these instead of those commands that because I don't know them yet &lt;/EM&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;EM&gt;(I keep learning Linux everyday).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;1. I extracts the list of endpoints with the following chain of commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;jq .paths &amp;lt; "$api_spec_json_file" | jq 'keys' | paste -s | sed 's/"//g' | sed 's/\[//' | sed 's/\]//' | xargs | sed -e 's/[[:space:]]\/*/\//g'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jq&lt;STRONG&gt; 'keys'&lt;/STRONG&gt; help me extract the keys out from the JSON string and as you can see, I have to manually do things like replace character myself.&lt;/P&gt;&lt;P&gt;I get back a string of all API endpoints (the 1st key of .paths) separated by a comma as below.&lt;/P&gt;&lt;P&gt;/getCountryDateFormat,/getIetfDetailsFromTimezone,...&lt;/P&gt;&lt;P&gt;2. I read the above string in to an array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;IFS=', ' read -r -a array &amp;lt;&amp;lt;&amp;lt; "$api_endpoints"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. loop through all items then get item 0 of the produces array from those particular endpoint from the input file (again).&lt;/P&gt;&lt;P&gt;yes, this looks does not make sense because I have to read data from file multiple time but I have to use this approach because I have an issue with the name of the endpoint.&lt;/P&gt;&lt;P&gt;the API endpoint name leading with a special character (/) ,I have to escape it with double quotes before I can read this JSON property via jq. In my case, variable key was the endpoint name with escapes char.&lt;/P&gt;&lt;P&gt;However, If I want to chain jq's commands, we chain them within a pair of single quotes (as far as learn from the official document). I found that I cannot chain the property name in variable &lt;STRONG&gt;key&lt;/STRONG&gt;&amp;nbsp;that contains double quotes with others jq function because a mix of single quote and double quotes create a wrong syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;        key="\"$element\""
        data=$( jq -c -r .paths."$key".get.produces &amp;lt; "$api_spec_json_file" | awk '{printf $0}' | sed 's/\["//g' | sed 's/"\]//g' )&lt;/LI-CODE&gt;&lt;P&gt;I might did it wrong, will take a look into it later but my work around here was I ask jq to do just 1 thing (no need ' ') then chain the output to other POSIX command like awk and sed to do the job instead as you can see in the above command.&lt;/P&gt;&lt;P&gt;variable data contains type of data the the API will send back, I use if clause statement to collect the endpoint that return&amp;nbsp;application/json into the output string before call the hash API to generate the final output.&lt;/P&gt;&lt;P&gt;This was my journey with bash and jq in this task.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I will have fun with this assignment&amp;nbsp; in TypeScript and Go this weekend.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wises&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 08:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278789#M2907</guid>
      <dc:creator>bztoy</dc:creator>
      <dc:date>2023-08-12T08:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278796#M2909</link>
      <description>&lt;P&gt;2baef2a2ace253804005db6fc4b6727268c77a040b323e82c0806573f9be6692&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 08:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278796#M2909</guid>
      <dc:creator>govardhansahil</dc:creator>
      <dc:date>2023-08-11T08:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278800#M2910</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN class=""&gt;367390432&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;903&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN class=""&gt;4e3&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;9&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;ef&lt;/SPAN&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;eae&lt;/SPAN&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;cb&lt;/SPAN&gt;&lt;SPAN class=""&gt;28&lt;/SPAN&gt;&lt;SPAN&gt;dec&lt;/SPAN&gt;&lt;SPAN class=""&gt;72&lt;/SPAN&gt;&lt;SPAN&gt;d&lt;/SPAN&gt;&lt;SPAN class=""&gt;452515&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;881476827&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 07:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278800#M2910</guid>
      <dc:creator>harsh_itaverma</dc:creator>
      <dc:date>2023-08-14T07:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278803#M2911</link>
      <description>&lt;P&gt;adefda62027144dde101ca42a94b85cfad5202d2ef648479389371f0b37da39a&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278803#M2911</guid>
      <dc:creator>Petchimuthu_M</dc:creator>
      <dc:date>2023-08-11T09:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278804#M2912</link>
      <description>&lt;P&gt;08efec35700dfb2ed380274ffd439b535b6a9e242ad6834839d5633e768e915c&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278804#M2912</guid>
      <dc:creator>emiliocampo</dc:creator>
      <dc:date>2023-08-11T09:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278809#M2913</link>
      <description>&lt;P&gt;7dd0abf3ef14706bf4db5c73135599fa249cc2890d36774a23b08591763591e5&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278809#M2913</guid>
      <dc:creator>prachetas</dc:creator>
      <dc:date>2023-08-11T09:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278815#M2914</link>
      <description>&lt;P&gt;3bc8f1632c1fbaa7881dec56cbda74f7dd769665bf3456ff425af0c7803c14fd&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278815#M2914</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2023-08-11T09:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278816#M2915</link>
      <description>&lt;P&gt;I tried using ChatGPT again... it does produce a string in the format specified, but it includes all paths.... I did a manual check and had to remove the paths that don't produce an application/json format.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:44:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278816#M2915</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2023-08-11T09:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278818#M2917</link>
      <description>&lt;P&gt;Loving this mini-learning series by the way&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/53"&gt;@qmacro&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278818#M2917</guid>
      <dc:creator>berserk</dc:creator>
      <dc:date>2023-08-11T10:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278824#M2918</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":blue_heart:"&gt;💙&lt;/span&gt; Thanks&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/156206"&gt;@berserk&lt;/a&gt;&amp;nbsp;! BTW, be sure to move the hash in your reply to a separate reply, otherwise it won't be counted (remember: hash replies should just contain the hash and nothing else at all).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:16:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278824#M2918</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-11T10:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278834#M2920</link>
      <description>&lt;P&gt;ac120142b7ada67a18025e64b5244ee1187be16d7527834c1338229cb724a904&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:54:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278834#M2920</guid>
      <dc:creator>berserk</dc:creator>
      <dc:date>2023-08-11T10:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278835#M2921</link>
      <description>&lt;P&gt;aa577776e777a0b574d6c38b74cc374b8d72e2debc61997868b543e9fab2ab5f&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:55:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278835#M2921</guid>
      <dc:creator>RaulVega</dc:creator>
      <dc:date>2023-08-11T10:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 4 - Discover the Date and Time API Package</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278836#M2922</link>
      <description>&lt;P&gt;&lt;U&gt;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?&lt;/U&gt;&lt;/P&gt;&lt;P&gt;This is all I could understand from the internet and connect with earlier tasks (I can be completely wrong)&lt;BR /&gt;The API specification document would have been available in EDMX format if the API supports more than just standard HTTP data exchange protocols like GET, POST...&lt;BR /&gt;For example, in our first task when we listed the entity sets, we used the service document representation of the API and got all the entity sets. But when we had to find the product using NorthBreeze for each one of us, we used the metadata document to understand the "Action". The API specification can be exposed in two ways; Service Document&amp;nbsp; (here: JSON, YAML - Using ATOM Protocol) and the XML Document (here: EDMX) which would describe the data model [like for OData we have a entity data model and edmx is the xml representation of the same].&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;Which API specification format did you choose, and why? Do you prefer parsing YAML or JSON?&lt;BR /&gt;&lt;/U&gt;JSON, as I found it pretty easy to parse and use.&lt;BR /&gt;I did try using yaml but was getting errors in BAS while loading it.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;How did you apply the endpoint conditions described above, and in what language?&lt;BR /&gt;&lt;/U&gt;I used Javascript, and the approach was:&lt;BR /&gt;1. Load the JSON representation&lt;/P&gt;&lt;P&gt;2. Extract the "paths" and Using Object.entries() parsed each entry into an array&lt;/P&gt;&lt;P&gt;3. Check if there was a value 'get' and if the&amp;nbsp; 'produces' array had an entry 'application/json' and pushed all such path values into an array.&lt;/P&gt;&lt;P&gt;5. Used array function sort.&lt;/P&gt;&lt;P&gt;4. Used array function join with separator as ':' and got a string out of it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 07:18:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-4-discover-the-date-and-time-api-package/m-p/278836#M2922</guid>
      <dc:creator>harsh_itaverma</dc:creator>
      <dc:date>2023-08-14T07:18:45Z</dc:date>
    </item>
  </channel>
</rss>

