Swagger API Documentation
Interactive Swagger/OpenAPI 3.0 documentation is available for the HANA CLI web server. The OpenAPI specification is generated from JSDoc annotations in the route files.
Accessing the Documentation
When the web server is running:
- Swagger UI: http://localhost:3010/api-docs
- OpenAPI JSON Spec: http://localhost:3010/api-docs.json
Starting the Server
bash
# Start the web server
node bin/cli.js UI
# Or using the CLI
hana-cli UI
# Aliases
hana-cli ui
hana-cli serverWhat's Available in Swagger UI
The Swagger interface provides:
- Complete API reference with routes, parameters, and schemas
- Try It Out support for interactive endpoint testing
- Tag-based grouping of endpoints
- OpenAPI JSON export for external tooling
API Categories
Core tags configured in the Swagger setup include:
- Configuration
- HANA System
- HANA Objects
- HANA Inspect
- HDI
- Cloud Services
- Documentation
- Export
- Digital First Adoption
- WebSockets
Additional route-level tags can also appear (for example: BTP System, HANA Procedures).
Endpoint Coverage
Configuration
GET /- Get current prompts/configurationPUT /- Update prompts/configurationGET /appconfig/fioriSandboxConfig.json- Get Fiori sandbox configuration
HANA System
GET /hana- System information (session, user, overview, services, version)GET /hana/version-ui- hana-cli and tooling version infoGET /hana/dataTypes- List database data typesGET /hana/features- List database featuresGET /hana/featureUsage- Feature usage statisticsGET /hana/certificates- List certificates
HANA Objects
GET /hana/tables- List tablesGET /hana/views- List viewsGET /hana/schemas- List schemasGET /hana/containers- List HDI containersGET /hana/functions- List functionsGET /hana/indexes- List indexesGET /hana/users- List usersGET /hana/procedures- List procedures
HANA Inspect and Procedures
GET /hana/inspectTable- Inspect table metadata and generated artifactsGET /hana/inspectView- Inspect view metadata and generated artifactsGET /hana/querySimple- Execute a simple SQL queryGET /hana/callProcedure/parameters/- Get procedure parameter metadataGET /hana/callProcedure-ui/- Execute a stored procedure
Cloud and BTP
GET /hana/hdi- List HANA Cloud HDI instancesGET /hana/sbss- List HANA Cloud SBSS instancesGET /hana/schemaInstances- List HANA Cloud Schema instancesGET /hana/securestore- List HANA Cloud Secure Store instancesGET /hana/ups- List User-Provided Service instancesGET /hana/btpInfo- Get BTP informationGET /hana/btpSubs- List BTP subscriptionsGET /hana/btp-ui- Get BTP hierarchy for target selectionPOST /hana/btp-ui/setTarget- Set BTP subaccount target
Documentation, Export, and WebSockets
GET /docs/readme- Render README as HTMLGET /docs/changelog- Render CHANGELOG as HTMLGET /excel- Export last query results to ExcelGET /websockets- WebSocket information endpointGET /sap/dfa/help/webassistant/catalogue- DFA catalogueGET /sap/dfa/help/webassistant/context- DFA context help
Example API Calls
bash
# System information
curl http://localhost:3010/hana
# List tables
curl http://localhost:3010/hana/tables
# Update prompts/configuration
curl -X PUT http://localhost:3010/ -H "Content-Type: application/json" -d '{"schema":"MYSCHEMA"}'OpenAPI Specification
Use the raw JSON spec for SDK generation or import into API tooling:
text
http://localhost:3010/api-docs.jsonTroubleshooting
If Swagger UI does not load:
- Confirm the web server is running on port 3010
- Verify
swagger-jsdocandswagger-ui-expressare installed - Check server logs for Swagger setup errors
- Open
/api-docs.jsonto verify spec generation