OpenSearch REST API overview
Logit.io runs OpenSearch on Logs stacks and on dedicated OpenSearch stacks. Both expose the same REST paths as self-hosted OpenSearch — search, index documents, manage templates, check health — at https://{stack-id}-es.logit.io. Authentication and connection details are Logit-specific; request and response formats follow OpenSearch's API reference (opens in a new tab).
| Stack type | Connection guide | Placeholders in signed-in docs |
|---|---|---|
| Logs | Connect to Your Cluster | @opensearch.* |
| OpenSearch | Connect to Your Cluster | @opensearch.* |
Before calling any API, copy your endpoint, credentials, and ports (443 or 9200) from Settings → Endpoints.
How requests are formed
Every API call follows this pattern:
{method} https://{stack-id}-es.logit.io:{port}/{opensearch-api-path}Append authentication on every request:
- API key mode —
?apikey={your-stack-api-key}query parameter - Basic mode — HTTP Basic auth with username = stack ID, password = stack API key
See Managed Stack Limitations for operations that may not be available on a hosted stack.
Match your OpenSearch version
OpenSearch API behaviour can differ between major versions. Check the OpenSearch version on your stack (Settings → OpenSearch or the stack summary), then use the matching docs where possible:
https://docs.opensearch.org/docs/{version}/api-reference/If unsure, the latest API reference (opens in a new tab) is a reasonable default.
Core API families
OpenSearch groups REST APIs into families. The table below lists those most relevant on Logit.io Logs stacks, with a Logit guide (where we have one) and the upstream specification.
| API family | Common use on Logit.io | Logit guide | Upstream reference |
|---|---|---|---|
| Search | Query logs, scroll exports, counts | Search APIs | Search APIs (opens in a new tab) |
| Document | Index, update, delete documents; bulk ingest | Document APIs | Document APIs (opens in a new tab) |
| Index | Templates, mappings, aliases, create/delete indexes | Index & Template APIs | Index APIs (opens in a new tab) |
| CAT | Quick tabular cluster/index summaries | Cluster & CAT APIs | CAT APIs (opens in a new tab) |
| Cluster | Health checks, read cluster state | Cluster & CAT APIs | Cluster APIs (opens in a new tab) |
| Snapshot | Backup/restore | Contact support — snapshots are platform-managed | Snapshot APIs (opens in a new tab) |
| Security | Users, roles, permissions | Not exposed for stack API access — use Dashboards and account roles | Security APIs (opens in a new tab) |
| Ingest | Ingest pipelines | Usually managed via Logstash on Logit.io | Ingest APIs (opens in a new tab) |
Plugin and advanced APIs
These APIs exist on OpenSearch but are less commonly called directly against {stack-id}-es.logit.io on Logs stacks. Use OpenSearch Dashboards or contact support if you need them.
| API | Upstream reference | Notes |
|---|---|---|
| Alerting | Alerting API (opens in a new tab) | Prefer OpenSearch Alerting in Dashboards |
| Index State Management (ISM) | ISM API (opens in a new tab) | Retention is typically configured via your Logit.io plan |
| Anomaly detection | Anomaly detection API (opens in a new tab) | Dashboards UI |
| Scroll | Scroll API (opens in a new tab) | Covered in Search APIs and Export Data to CSV |
| Point in Time (PIT) | PIT API (opens in a new tab) | Deep pagination alternative to scroll |
| Multi-search | Multi-search (opens in a new tab) | Batch multiple searches in one request |
Logit guides and cookbooks
| Task | Guide |
|---|---|
| Connect and authenticate | Connect to Your Cluster |
| Search and export logs | Search APIs, Export Data to CSV |
| Query from Python | Querying with Python |
| View templates and mappings | Index & Template APIs, Index templates |
| Reindex data | Reindexing |
| Monitor cluster health | Cluster & CAT APIs |
| What you cannot do via API | Managed Stack Limitations |
OpenSearch Dashboards API (separate)
The stack OpenSearch API (-es.logit.io) is not the same as the OpenSearch Dashboards API. Dashboards uses Profile proxy credentials via kibana.logit.io. See Access OpenSearch Dashboards features via REST API.