Analytics Legends logoAI & Analytics Legends Sign inSign up
Academy module

Datasphere CLI & APIs

Datasphere CLI and API promotion pipeline: DEV space to TEST space via CLI export, Git review, CLI import and an OAuth client-credentials token, then a manual approval gate to PROD space — architecture diagram for Datasphere CLI & APIs, Analytics Legends Academy module M013

As of 2026-11-07

SAP Datasphere CLI: the short answer

Datasphere CLI & APIs is where a Datasphere project stops depending on one person clicking through the UI and starts behaving like software: version-controlled, repeatable, auditable. The deliverable that pays for the module is the DEV→TEST→PROD promotion pipeline — CLI export, Git review, CLI import into TEST, approval before PROD — which replaces a day of UI export and import with an automated run of under 10 minutes. Two failure modes decide whether that pipeline survives production: an OAuth client that silently reaches its expiry date (default 3 months) and a technical user whose scoped roles do not cover the space it calls — both surface as 401/403 errors on a night nobody is watching. A consultant who ships this pattern in week one turns a recurring manual bottleneck into an automated pipeline step of under 10 minutes — exactly the automation story that justifies a senior day rate in a scope conversation.

What you will learn

  • Work through a realistic scenario: A mid-size industrial equipment manufacturer runs one Datasphere landscape (DEV, TEST and PROD tenants) shared across three plants and is scaling its analytics team from 4 to 12 developers over two quarters. Two production incidents already came from manually promoted views whose upstream Data Product dependency in another space was never promoted.
  • Recognize and avoid the anti-pattern: Hard-coding OAuth client_id/client_secret in pipeline YAML — The credential is compromised the moment it lands in Git history — removing the line afterward does not fix it, only rotation does.
  • Apply the module's core decision: Script the operation or use the UI? — choose: script promotion, bulk space/user provisioning, and replication-flow monitoring; avoid: wrapping every UI save in a CLI export/import cycle — it breaks the 30-90 second development feedback loop and fills Git history with noise instead of meaningful promotion commits.
  • Track mastery with the KPI: Promotion cycle time (DEV → TEST) (target: < 10 minutes from merge to imported; red flag: > 1 hour or a human has to babysit the run — the promotion isn't actually automated).

Datasphere CLI and REST APIs: Automation, CI/CD, and When to Script

SAP Datasphere has a command-line interface and documented REST APIs, and most projects use neither. The default working mode is the browser: modellers build views in the Data Builder, administrators manage spaces, users and transports in the UI. That holds for one team in one tenant. It stops holding when the same space definition must reach a Test and a Production tenant identically, when a nightly load must be started and checked by a scheduler outside Datasphere, or when fifty users must be assigned to roles from an HR list. This module covers what the datasphere CLI and each documented API actually do, which OAuth client each needs, and where scripting beats clicking.

Source: SAP Datasphere docs — Manage Your Space via the Command Line

The Datasphere CLI

The Datasphere CLI (datasphere) is a Node.js command-line tool distributed on npm as @sap/datasphere-cli. Its versions follow the Datasphere release calendar — 2026.22.0 was the current version on 28 October 2026 — and the commands it offers are downloaded from the tenant itself when the CLI is initialised, so the help output depends on your tenant release.

Prerequisites

  • Intermediate hands-on experience on SAP analytics projects
  • Review core concepts first: C008, C006, C005

Outcomes

  • Work through a realistic scenario: A mid-size industrial equipment manufacturer runs one Datasphere landscape (DEV, TEST and PROD tenants) shared across three plants and is scaling its analytics team from 4 to 12 developers over two quarters. Two production incidents already came from manually promoted views whose upstream Data Product dependency in another space was never promoted.
  • Recognize and avoid the anti-pattern: Hard-coding OAuth client_id/client_secret in pipeline YAML — The credential is compromised the moment it lands in Git history — removing the line afterward does not fix it, only rotation does.
  • Apply the module's core decision: Script the operation or use the UI? — choose: script promotion, bulk space/user provisioning, and replication-flow monitoring; avoid: wrapping every UI save in a CLI export/import cycle — it breaks the 30-90 second development feedback loop and fills Git history with noise instead of meaningful promotion commits.
  • Track mastery with the KPI: Promotion cycle time (DEV → TEST) (target: < 10 minutes from merge to imported; red flag: > 1 hour or a human has to babysit the run — the promotion isn't actually automated).

Full module with the Consultant plan — €19.90/month. The full module adds: the decision framework · the end-to-end scenario walkthrough · the KPI scorecard · the anti-patterns · the code blocks · the knowledge check · the diagrams.

Open in the app →

Open missions

104 live roles and contracts in SAP Datasphere right now — see the SAP Datasphere missions · freelance SAP contracts.