REST Console
REST Console
The REST Console allows you to execute Elasticsearch API calls directly from Secan's web interface. It features a persistent right-side drawer that stays open while you navigate the UI, and a detachable modal mode for focused work.
Console Modes
Drawer Mode (Default)
The console appears as a resizable panel on the right side of the screen:
- Persistent: Stays open while you navigate between different views
- Resizable: Drag the left border to adjust the width (minimum 400px)
- Contextual: Automatically associated with the current cluster
- State Persistence: Your console history and state are saved per cluster
Detached Modal Mode
Click the detach button to convert the console into a floating modal:
- Focused Work: Dedicated window for complex queries
- Larger Space: More room for request/response content
- Quick Access: Easily switch between modal and drawer modes
- Persistent State: Mode preference is saved across sessions
Using the Console
Using the Console
Opening the Console
The console toggle button is located in the cluster header next to the lock button:
- Navigate to any cluster view (Overview, Nodes, Indices, etc.)
- Click the Terminal icon in the cluster header to open the console
- The console slides in from the right as a resizable drawer
Execute Queries
- The console is automatically associated with the current cluster
- Choose the HTTP method (GET, POST, PUT, DELETE, PATCH)
- Enter the API path (e.g.,
/_search,/_cat/indices,/_cluster/health) - Optional: Add request body (JSON) for POST/PUT requests
- Click Execute or press
Ctrl+Enter
View Responses
- Response Body: Full JSON response from Elasticsearch with syntax highlighting
- Response Status: HTTP status code and message
- Response Time: Query execution duration
- Request History: Previous queries are saved and can be re-executed
- Formatted Output: Pretty-printed JSON for readability
Request History
The console maintains a history of your requests:
- Access previous queries from the History tab
- Click any history item to reload it into the editor
- History is persisted per cluster across browser sessions
- Clear history using the trash icon
Console Features
Resizing the Drawer
The console drawer can be resized to fit your workflow:
- Drag the left border to adjust the width
- Minimum width: 400px to ensure content readability
- Maximum width: 50% of the viewport
- Width persistence: Your preferred width is saved per cluster
Switching Modes
Toggle between drawer and modal modes:
- Detach button (↗️): Convert drawer to modal
- Attach button (↙️): Convert modal back to drawer
- Your mode preference is saved automatically
Keyboard Shortcuts
Ctrl+Enter: Execute the current queryEscape: Close the console drawer or modal
Common Queries
Cluster Health
GET /_cluster/health
List Indices
GET /_cat/indices?v
Search
POST /index-name/_search
\{
"query": \{
"match_all": \{\}
\}
\}
Get Cluster Settings
GET /_cluster/settings
Update Cluster Setting
PUT /_cluster/settings
\{
"transient": \{
"cluster.max_shards_per_node": 1000
\}
\}
Authentication
The console automatically uses the authentication configured for your cluster. If the cluster requires credentials, they're applied automatically based on your Secan configuration.
Safety Notes
- The REST Console can execute any Elasticsearch API call
- Use caution with DELETE and destructive operations
- Always test queries in a dev/test cluster first
- Monitor your Elasticsearch logs when experimenting
Related Features
- Cluster Details - View cluster overview
- Index Management - Manage indices with UI
- Shard Management - Manage shard allocation