Run HANA CLI as an HTTP server for programmatic access.
# Start on default port 3010
hana-cli server
# Equivalent command
hana-cli ui
# Start on custom port
hana-cli server --port 8080
# Start on specific host
hana-cli server --host 0.0.0.0 --port 8080| Option | Type | Description |
|---|---|---|
--port, -p |
number | Server port (default: 3010) |
--host |
string | Server host (default: localhost) |
http://localhost:3010/api-docshttp://localhost:3010/api-docs.jsonAll routes are served from the root path:
http://localhost:3010/curl http://localhost:3010/Response:
{
"schema": "MYSCHEMA",
"table": "EMPLOYEES",
"view": "",
"port": 3010
}The response reflects the current runtime prompt/configuration object and may include additional properties.
curl -X PUT http://localhost:3010/ \
-H "Content-Type: application/json" \
-d '{
"schema": "MYSCHEMA",
"table": "EMPLOYEES"
}'Response:
{
"status": "ok"
}The server also provides a browser-based UI:
http://localhost:3010/ui/#Shell-homeThe server returns standard HTTP status codes:
200- Success404- Route not found500- Internal server error
Error responses include a JSON body:
404 (not found):
{
"error": {
"message": "Route not found",
"status": 404,
"path": "/invalid-path"
}
}500 (and other server errors):
{
"message": "Internal server error",
"status": 500
}