API Reference
Access HANA CLI programmatically through REST APIs.
Overview
HANA CLI can run as an HTTP server, exposing all commands through REST endpoints. This enables:
- Programmatic Access - Integrate with external applications
- Web Dashboards - Build UI on top of HANA operations
- Microservices - Use as a service component
- CI/CD Integration - Automate database operations
Available Resources
- Swagger/OpenAPI - Complete API specification
- HTTP Routes - Web server routes and endpoints
Starting the API Server
bash
hana-cli UIYou can also use aliases:
bash
hana-cli ui
hana-cli serverThe server runs on http://localhost:3010 by default.
Access Swagger UI:
text
http://localhost:3010/api-docsQuick Example
bash
# Start the server
hana-cli UI
# In another terminal, get current configuration
curl http://localhost:3010/
# Update configuration
curl -X PUT http://localhost:3010/ \
-H "Content-Type: application/json" \
-d '{
"schema": "MYSCHEMA",
"table": "EMPLOYEES"
}'Configuration Options
Customize the server with command-line options:
bash
# Custom port
hana-cli UI --port 8080
# Custom host
hana-cli UI --host 0.0.0.0 --port 8080See Swagger documentation for API details.