Develop Advanced Extensions with SAP Cloud SDK

Querying SAP APIs in JavaScript or TypeScript

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Query an SAP API using the SAP Cloud SDK in a JavaScript and TypeScript program

Consulting the SAP Cloud SDK for JavaScript Reference Documentation

Search for the Proper Module

The following table guides you to reference documentation sites you can access to learn about the SAP Cloud SDKs for JavaScript APIs:

Where to Find?Information TypeHow to Access?
SAP HelpDocumentation of the SAP Cloud SDK for JavaScriptYou can access the documentation via the following steps:
  1. In your web browser, navigate to https://help.sap.com/viewer/p/SAP_CLOUD_SDK
  2. In the Developtab, choose Latest Version of JSDoc
  3. Choose a module and review the content
npmjs.comInformation on additional modulesYou can access the documentation via the following steps:
  1. In your web browser, navigate to https://www.npmjs.com
  2. Search the package name, or compose the URL as https://www.npmjs.com/package/[package name]
GitHubInformation and additional documentation on the core packages of the SAP Cloud SDK for JavaScript

You can access the documentation at: https://github.com/SAP/cloud-sdk

The Core Packages

The SDK consists of a few core packages and a number of API-specific packages.

The API-Specific Packages

Every API has its own specific package/module to be installed in the project based on its requirements.

Supporting documentation is available at the SAP Help Portal and onnpmjs.com.

The @sap/cloud-sdk-vdm module can be used to install all the APIs in one go.

Querying SAP APIs in a JavaScript or TypeScript program

Let's now look at the steps to query SAP APIs in a JavaScript and TypeScript program.

Save progress to your learning plan by logging in or creating an account