Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 2.91 KB

FAQ.md

File metadata and controls

69 lines (54 loc) · 2.91 KB

FAQ

How do I automate downloads from launchpad.support.sap.com?

Using some revere engineering you can easily configure e.g. a Gradle download task (Gradle plugin) to download the SAP Commerce artifacts for you.

Let's say you want to download SAP Commerce 2011.

  1. Search for the download on launchpad.support.sap.com (cx comm is the search term that consistently works)
  2. Navigate to the download Launchpad Search
  3. Click on the icon in the "Related Info" column, click on "Content Info"
  4. A new page opens Navigate to Content Info
  5. Now, the fun part:
    Use the last part of the URL (after object/) of this page to construct the download URL:
    https://launchpad.support.sap.com/#/softwarecenter/object/0020000000342432021
                                                              ─────────┬─────────
                                                    ┌──────────────────┘
                                                    v
    https://softwaredownloads.sap.com/file/0020000000342432021
    
  6. Voilà, you now have the download URL.
    Provide your S-User and its password using HTTP Basic authentication, and you are done. Object Info

Here is how you would do it with curl:

❯ curl -L -b cookies.txt \
  -u S1234567890 \
  -o hybris-commerce-suite-2011.4.zip \
  https://softwaredownloads.sap.com/file/0020000000342432021
...
100 1483M  100 1483M    0     0  6450k      0  0:03:55  0:03:55 --:--:-- 7130k

Another way to download via curl, if the approach above does not work, e.g. you are always redirected to a login page instead of the download (thank you @aepfli for discovering this!)

# initialize download session, store required cookies in 'cookies.txt'
❯ curl -L -v -b cookies.txt  -c cookie.txt \
	-u "$SAP_USER_ID:$SAP_PASSWORD" \
   -o "download.file" \
	"https://origin.softwaredownloads.sap.com/tokengen/?file=${SAP_FILE_ID}"

# start actual download
curl -L -v -b cookies.txt \
	-u "$SAP_USER_ID:$SAP_PASSWORD" \
	-o "download.file" \
	"https://softwaredownloads.sap.com/file/${SAP_FILE_ID}"

The field "Checksum" of the content info page is the sha-256 hash of the file (that comes in handy if you want to verify the download)

❯ shasum -a 256 -c <<< '5a96db9d91b5136d48f742ac0575981bbf11aadd79e2a45e357cdf9a8b3d434b *hybris-commerce-suite-2011.4.zip'
hybris-commerce-suite-2011.4.zip: OK