SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Using the SAP HANA data lake File Store REST API with Node.js

Learn how to use the SAP HANA data lake REST API to manage, upload, delete, and list your files using Node.js.

Overview

🎓 beginner 30 min. SAP HANA Cloud Data LakeBeginnerSAP HANA Cloud

You will learn

  • โœ”How to use the SAP HANA data lake File Store REST API.
  • โœ”Users without access to the HDLFSCLI can use the REST API to perform File Store operations.
Aum Chotaliya A Aum Chotaliya November 18, 2025
Created by June 18, 2024
Contributors

Prerequisites

Prerequisites

Steps

Intro

SAP HANA data lake file containers are accessible via a REST API. The official REST API reference can be found here. However, below are some javascript demonstrations using some of the common endpoints. Although this tutorial doesn’t cover other endpoint testing tools, these endpoints and the contents of the request body can be used in any other HTTP interface such as PostMan or CURL.


Step 1 Set Up a Node Environment
โ€”

First, in the top of a JavaScript file that you are working with append the following and fill in the variables with the appropriate data for your SAP HANA data lake file container. This will load the appropriate node libraries for making HTTP requests and reading files and will also set some commonly re-used variables for the API calls.

JavaScript
const https = require('https');
const fs = require('fs');

const FILES_REST_API = '<File Container REST API>'; 
const CONTAINER = '<File Container ID>';  
const CRT_PATH = '<Path to Client Certificate>';  
const KEY_PATH = '<Path to Client Key>'; 
Step 2 Use the CREATE Endpoint
+
Step 3 Use the OPEN Endpoint
+
Step 4 Use the LISTSTATUS Endpoint
+
Step 5 Use the LISTSTATUS_RECURSIVE Endpoint
+
Step 6 Use the DELETE Endpoint
+
Step 7 Use the DELETE_BATCH Endpoint
+
Step 8 Explore and Experiment!
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 8
1. Set Up a Node Environment 2. Use the CREATE Endpoint 3. Use the OPEN Endpoint 4. Use the LISTSTATUS Endpoint 5. Use the LISTSTATUS_RECURSIVE Endpoint 6. Use the DELETE Endpoint 7. Use the DELETE_BATCH Endpoint 8. Explore and Experiment!

Learn more →