PackagePackagetypeA library you install and call yourself.See every one →What this type is →by a community orgby a community orgoriginPublished by a community organisation, so it outlives any one maintainer.See every one →

@sapmentors/cds-scp-api

A Node module for CAP that calls an external API through a destination instead of a hardcoded endpoint, taking its address, credentials and on-premise tunnel from the SAP Destination and Connectivity services.

Calling an API outside the application means holding its address, its credentials and, for an on-premise system, a tunnel. This module takes all three from the SAP Destination service and the SAP Connectivity service instead: cdsapi.connect.to("ES5") resolves a destination by name, and service.run({ url: "/pathOfService" }) issues the request against a URL relative to it. The request options are those of axios, minus the ones the module takes from the destination, which its README names as authentication, the proxy settings and the baseURL; csrfProtection: true is the setting the README adds to a request that needs an X-CSRF token. The README lists the destination types it covers: internet destinations with no authentication, with basic authentication, with client credentials including Microsoft Azure and with JWT for Google Cloud Platform, plus on-premise destinations through the Cloud Connector with no authentication or with basic authentication.

Facts

Latestv1.0.4ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
DestinationsCAPDestinationscapabilityReaching a system that is not yours — an S/4HANA tenant, an on-premise service, a third-party API — without the address, the credentials or the tunnel being written into the application. The destination is the indirection, and the reason an endpoint can move without a redeploy.
Flavors
Requires
@sap/cds^4.5.2@sap/cdsartifactThe peer range, as published.SAP Destination serviceSAP Destination serviceartifactHolds the endpoint and the credentials the module resolves by name before it issues the request.axiosaxiosoutside the atlasThe request options are Axios config options, and the module is written as a layer over it.
Optional
SAP Connectivity serviceSAP Connectivity serviceartifactCarries the request to a system behind the Cloud Connector rather than to one reachable over the internet.

Who is behind it

Gregor WolfGregor WolfPersonMaintains this
In the atlas: maintains 17, contributes to 59, wrote 2
@gregorwolf
SAP Mentors & FriendsSAP Mentors & FriendsOrganisationMaintains this
In the atlas: maintains 3
@sapmentors
Volker BuzekVolker BuzekPersonMaintains this
In the atlas: maintains 7, contributes to 53, wrote 2
@vobu
maintainersEdoBPersonContributes to this
In the atlas: contributes to 1
@EdoB
Robert EijpePersonContributes to this
In the atlas: contributes to 1
@raeijpe
2 contributors

Before choosing this

Signals

ActivityQuietRelease and repository quiet for 57 months

Both observable publication channels have been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.

Conditions

PracticalFunctional boundary

The package declares @sap/cds ^4.5.2 among its dependencies and pins @sap-cloud-sdk/core at 1.37.1, so a project on CAP 5 or later is outside the range it states.

LicenceSAP Developer License Agreement 3.2 CAP§ 1from DestinationsA destination used by a covered CAP application sends SAP product data to a non-SAP product rather than only addressing a remote endpoint.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.

A destination is configuration, not the deciding boundary. The licence becomes material when the resulting data flow is extraction into a non-SAP product, so the target and purpose need review.

SAP Developer License Agreement 3.2 CAP →

What it declares

Every artifact

Type
Package
Origin
By a community org
Runtime
Node.js

As a package

Declared for
^4.5.2
Where it runs
Inside its host
Distributed through
npm

Connections6

@sapmentors/cds-scp-api connections@sapmentors/cds-scp-apiPROVIDES→ provides1provides stated Resolves a destination by name from the CAP service and makes the call against it, so the endpoint, the credentials and the on-premise tunnel stay in the destination configuration. CDS-SCP-API Node Module — README, what the module provides: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.md CDS-SCP-API Node Module — README, Compare Axios with CDS-SCP-API: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.mdDestinationsNEEDS→ connects to2connects to stated If: the destination is an on-premise one reached through the Cloud Connector The other service the module reads its connection settings from, for a destination that goes to an on-premise system. CDS-SCP-API Node Module — README, CDS-SCP-API Config Settings: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.md CDS-SCP-API Node Module — README, Supported Destination Types: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.mdSAP Connectivity serviceifconnects to stated Reads the authentication, the proxy settings and the baseURL of the named destination, which is why the call site writes a relative URL. CDS-SCP-API Node Module — README, CDS-SCP-API Config Settings: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.mdSAP Destination service→ needs2needs stated The request options are Axios config options, and the module is written as a layer over it. CDS-SCP-API Node Module — README, CDS-SCP-API Config Settings: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.mdaxiosneeds stated Holds the endpoint and the credentials the module resolves by name before it issues the request. CDS-SCP-API Node Module — README, what the module provides: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.mdSAP Destination service→ optionally needs1optionally needs stated If: the destination is an on-premise one reached through the Cloud Connector Carries the request to a system behind the [Cloud Connector](artifact:sap-cloud-connector) rather than to one reachable over the internet. CDS-SCP-API Node Module — README, Supported Destination Types: https://raw.githubusercontent.com/sapmentors/cds-scp-api/master/README.mdSAP Connectivity serviceif

Install

npm add @sapmentors/cds-scp-api

Derived from the package name. No recipe recorded; the README has the configuration.

Where it sits in your app

Download
Your CAP applicationYour SAP BTP subaccountCDS-SCP-API Node Module — README, CDS-SCP-API Config Settings, checked 2026-10-19: “CDS-SCP-API will ignore the Axios config settings for the authentification, the proxy settings, and the baseURL. The CDS-SCP-API retrieves these settings from the SAP Cloud Platform Destination & Connectivity services.”outboundCDS-SCP-API Node Module — README, CDS-SCP-API Config Settings, checked 2026-10-19: “The CDS-SCP-API retrieves these settings from the SAP Cloud Platform Destination & Connectivity services.”outboundif the destination is anon-premise one reached throughthe Cloud Connectordocumentedrequiresaxios, systemaxiossystem@sapmentors/cds-scp-api, module@sapmentors/cds-scp-…SAP Destination service, service instanceSAP DestinationserviceSAP Connectivity service, service instanceSAP Connectivityservice
SAPnot SAP's, or the project's ownstated in the documentdocumented only

README

quoted from sapmentors/cds-scp-api under MIT, read
sapmentors/cds-scp-api/README.mdOn GitHub

CDS-SCP-API Node Module

CDS Extension for SAP Cloud Platform API Consumption

The node module CDS-SCP-API simplifies the consuming external API from SAP OnPremise & Cloud APIs, Microsoft Office 365 APIs, Google Cloud Platform APIs, and other REST APIs in a Cloud Application Programming (CAP) Model on the SAP Cloud Platform. The module provides:

  • Fluent API consumption concept
  • Endpoint and Configuration using SAP Cloud Platform Destination and Connectivity services
  • Support of all kind of APIs including SAP OnPremise & Cloud OData and Rest APIs, Microsoft Office 365 APIs, Google Cloud Platform APIs and other REST APIs
  • Easy API http request configuration based on Axios config options

History

Jhodel Cailan initially started the CDS Extension concept. SAP Mentor Robert Eijpe created a similar concept integrating Microsoft Azure and Google Cloud APIs into a CDS external services concept. The SAP Devtoberfest 2020 challenge brought concepts together. And this results in a CDS-SCP-API Node Module for the community, making SAP developers' lives better.

Installation

Using npm:

> npm install @sapmentors/cds-scp-api

Javascript/Node.js Code

// Load the module
const cdsapi = require("cds-scp-api");

// Create a connection
const service = await cdsapi.connect.to("SCPDestination");

// Request the API using Axios Config
let result = await service.run({
               url: "/pathOfService"
             })

Example Programs

Click here for examples and environment setup

Supported Destination Types

  • Internet Destinations with No Authentication
  • Internet Destinations with Basic Authentication
  • Internet Destinations with Client Credentials Authentication (including Microsoft Azure)
  • Internet Destinations with JWT token Authentication (currently only Google Cloud Platform)
  • OnPremise Destination and Connectivity via Cloud Connector with No Authentication
  • OnPremise Destinations and Connectivity via Cloud Connector with Basic Authentication

SCP Destination Configuration Examples

CDS-SCP-API Config Settings

The CDS-SCP-API is an SAP Cloud Platform layer on top of Axios. The configuration settings of the CDS-SCP-API service.run code is simular to Axios options, which are documented here. CDS-SCP-API will ignore the Axios config settings for the authentification, the proxy settings, and the baseURL. The CDS-SCP-API retrieves these settings from the SAP Cloud Platform Destination & Connectivity services.

Compare Axios with CDS-SCP-API
  • Axios implementation

    async function AxiosGetRequestwithBasicAuthentication() {
        return await axios({
        	url: 'https://sapes5.sapdevcenter.com/sap/opu/odata/sap/EPM_REF_APPS_SHOP_SRV/Products?$top=2',
      	  auth: {
      		  username: '<SAP S-number>',
      		  password: '<My password>'
      	  }
        })
    }
  • CDS-SCP-API implementation

    async function InternetAPIGetRequestwithBasicAuthentication() {
        const service = await cdsapi.connect.to("ES5");
        return await service.run({
      	  url: "/sap/opu/odata/sap/EPM_REF_APPS_SHOP_SRV/Products?$top=2"
        })
    }  

CDS-SCP-API implementation uses relative URLs, and authorization is configured in the SAP Cloud Platform and handled by the CDS-SCP-API implementation.

Post requests with CSRF token protection
async function InternetAPIPostRequestwithBasicAuthentication() {
  const product = {
  	"ProductID": "NL4B-101",
  	"TypeCode": "PR",
  	"Category": "Notebooks",
  	"Name": "Psychiatric Help",
  	"NameLanguage": "EN",
  	"Description": "",
  	"DescriptionLanguage": "",
  	"SupplierID": "0100000000",
  	"SupplierName": "SAP",
  	"TaxTarifCode": 1,
  	"MeasureUnit": "EA",
  	"WeightMeasure": "0.000",
  	"WeightUnit": "",
  	"CurrencyCode": "EUR",
  	"Price": "0.05",
  	"Width": "0.000",
  	"Depth": "0.000",
  	"Height": "0.000",
  	"DimUnit": "",
  	"CreatedAt": "\/Date(1602106635169)\/",
  	"ChangedAt": "\/Date(1602106635169)\/"
  }

  const service = await cdsapi.connect.to("ES5");
  return await service.run({
  	url: "/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/ProductSet",
  	method: "post",
  	headers: {
  		'content-type': 'application/json'
  	},
  	data: product,
  	csrfProtection: true
  })
}

When request needs a X-CSRF token to fulfill, you can easily add the setting csrfProtection: true

Simultaneous requests
async function SimultaneousRequests() {
  const service = await cdsapi.connect.to("ES5")
  axios.all([
  	service.run({
  		url: "/sap/opu/odata/sap/EPM_REF_APPS_SHOP_SRV/Products?$top=2"
  	}),
  	service.run({
  		url: "/sap/opu/odata/sap/EPM_REF_APPS_SHOP_SRV/Products?$top=3"
  	})
  ])
  	.then(axios.spread((request1, request2) => {
  		console.log('Results request1: ', request1.d.results[0].Name);
  		console.log('Results request2: ', request2.d.results[0].Name);
  	}));

}
MIT, read

History

Latest

v1.0.4

  1. v1.0.3

  2. v1.0.2

  3. v1.0.1

9downloads per week, npm
Weekly downloads for @sapmentors/cds-scp-api26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 9.20 Apr – 26 Apr: 3827 Apr – 3 May: 344 May – 10 May: 4711 May – 17 May: 4418 May – 24 May: 3325 May – 31 May: 361 Jun – 7 Jun: 298 Jun – 14 Jun: 1415 Jun – 21 Jun: 3222 Jun – 28 Jun: 3429 Jun – 5 Jul: 316 Jul – 12 Jul: 3713 Jul – 19 Jul: 2920 Jul – 26 Jul: 2327 Jul – 2 Aug: 223 Aug – 9 Aug: 2510 Aug – 16 Aug: 3417 Aug – 23 Aug: 3724 Aug – 30 Aug: 3731 Aug – 6 Sept: 297 Sept – 13 Sept: 4114 Sept – 20 Sept: 2621 Sept – 27 Sept: 3428 Sept – 4 Oct: 255 Oct – 11 Oct: 2512 Oct – 18 Oct: 9
Destinations
  1. SAP Destination serviceNamed, credentialed addresses of other systems resolved at runtime
  2. com.sap.cds:cds-feature-remote-odataRemote Services for consuming OData V2 and V4 APIs in CAP Java
  3. com.sap.cds:cds-integration-cloud-sdkSAP Cloud SDK integration for remote REST services in CAP Java
  4. capire/s4Prebuilt SAP S/4HANA integration package for CAP projects
  5. cdseDestination resolution and axios calls from CAP configuration
  6. @sap/cdsCAP Node.js runtime
  7. @sap-cloud-sdk/connectivityDestination lookup and connectivity proxy for the Cloud SDK
  8. @sap-cloud-sdk/http-clientHTTP client carrying a destination's credentials
  9. @sap-cloud-sdk/odata-commonShared machinery under the Cloud SDK's OData and OpenAPI clients
  10. @sap-cloud-sdk/openapiGenerated OpenAPI clients for the Cloud SDK
  11. @sap-cloud-sdk/resilienceTimeouts, retries and circuit breaking around remote calls
  12. @sap-cloud-sdk/utilGeneral utilities shared across the Cloud SDK packages

Details

Sources4
npm registrydiscovered herechecked
npm registry, @sapmentors/cds-scp-apiversion, releases, installschecked
github.com/git://github.com/sapmentors/cds-scp-api.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
declared for^4.5.2
latestv1.0.4
first release
releases and cadence2
discovered vianpm registry
first seen in the atlas
ecosystem and domaincap, integration-and-messaging
Flavors1
Node.js
“The node module CDS-SCP-API simplifies the consuming external API from SAP OnPremise & Cloud APIs, Microsoft Office 365 APIs, Google Cloud Platform APIs, and other REST APIs in a Cloud Application Programming (CAP) Model on the SAP Cloud Platform.” — CDS-SCP-API Node Module — README, CDS Extension for SAP Cloud Platform API Consumptionchecked
Contributors2

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:sapmentors-cds-scp-api
JSON
/artifacts/sapmentors-cds-scp-api.json
MCP
Connecting an agent