The SFTP Gateway API provides endpoints for managing SSH connections, users, and Kubernetes pods.
- Base URL:
http://localhost:8080(configurable viaNODE_PORT) - Default Format: All responses are in JSON
- Authentication: See Authentication section
List all accessible Kubernetes pods.
# Example
curl -H "x-rabbit-internal-token: $TOKEN" http://localhost:8080/v1/pods
Parameters:
namespace(query, optional) - Filter by namespace
Response:
{
"pods": [
{
"name": "web-app-prod",
"namespace": "default",
"status": "Running"
}
]
}
List all users with SSH access.
# Example
curl http://localhost:8080/users
Response:
{
"users": [
{
"name": "dev-user",
"pods": ["web-app-dev"],
"permissions": ["admin"]
}
]
}
Get SSH connection details for a user.
# Example
curl http://localhost:8080/_cat/connection-string/dev-user
Response:
{
"connectionString": "ssh dev-user@sftp.company.com",
"pod": "web-app-dev",
"namespace": "default"
}
List all managed applications.
# Example
curl http://localhost:8080/apps
Response:
{
"apps": [
{
"name": "web-app",
"pods": ["web-app-dev", "web-app-prod"],
"users": ["dev-user"]
}
]
}
Clean up stale container data from Firebase.
# Example
curl -X DELETE http://localhost:8080/flushFirebaseContainers
Response:
{
"ok": true,
"message": "Successfully flushed container data",
"removedCount": 42
}
This operation:
- Removes stale container records
- Triggers automatic container re-sync
- Logs all changes for audit
- Helps resolve memory issues