Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>OpenSearch DevTools & SupportNew to Visual Studio Code? Get it now.
OpenSearch DevTools & Support

OpenSearch DevTools & Support

Data Ops Pulse

|
131 installs
| (1) | Free
OpenSearch client like OpenSearch Dashboards DevTools for VS Code, supercharged with everything a builder and maintainer needs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Supercharged OpenSearch Tools for VS Code

For engineers building with OpenSearch; or looking for easier way to maintain OpenSearch in production. DevTools in your IDE, snippets and intellisense, mock-data generator and more.

Fully supporting all modern OpenSearch versions, running anywhere (Amazon OpenSearch Service and self-managed), with smart configuration management.

OpenSearch DevTools Interface

🚀 What's Inside?

🛠️ DevTools in your IDE

  • Query and commands execution for .os.http files. Click Run or ctrl+enter to execute the highlighted command.
  • Stream files into requests in .os.http requests using the @ operator instead of copy-paste.
  • Save the requests panel as .os.http files and commit them to your SCM if needed.
  • Syntax highlighting and auto-completion.
  • Wrap in boolean hacks and more.
  • Tabular Data Viewer for _cat APIs.
  • Copy as cURL option.

Example test.os.http file:

POST myindex/_bulk
@bulk_data.jsonl

POST _search
{
    "query": {
        "match_all": {}
    }
}

🔍 Advanced Query Editor

  • Smart completion for *.os.query and *.os.query.json files with OpenSearch queries
  • IntelliSense for queries, aggregations, and field types
  • Quick actions: Wrap selections in bool clauses (filter, should, must_not)

🗺️ Index Mapping Editor

  • Comprehensive mapping validation for *.os.mapping.json and *.os.json files
  • Best practices recommendations and warnings
  • Field type validation
  • Performance impact analysis

🎲 Mock Data Generator

  • Generate realistic test data from index mappings
  • Support for all OpenSearch field types
  • Configurable document count and data patterns
  • Command Palette integration and context menu access

More Coming Soon

🎯 Quick Start

1. Configure OpenSearch Connection

To use DevTools, you need to set up a connection to a cluster.

# Open Command Palette (Ctrl+Shift+P)
> OpenSearch: Configure Connection

The configuration dialog will open with the following options:

  • Hosts: Enter one or more OpenSearch hosts with protocol (e.g., https://localhost:9200, https://os-node1:9200)
  • Port: Default OpenSearch port (optional if specified in hosts)
  • Username: Username for authentication (optional)
  • Password: Password for authentication (optional)
  • AWS Region: AWS region for Amazon OpenSearch Service (when using AWS)

Note: If no configuration is set, a warning banner will appear in .os.http files prompting you to configure your connection.

Alternatively, you ca create a .os-config file in your project root for persistent, version-controlled configuration:

url: "https://localhost:9200"
authMethod: "basic"
username: "admin"
allowSelfSignedCerts: true
compression: false

Security Note: Passwords, API keys, and AWS secret access keys are never stored in the configuration file. The extension will prompt for these values when needed and store them securely in memory only.

2. Create Your First Query File

DevTools-style HTTP queries (.os.http)

GET /_cluster/health

POST /my-index/_search
{
  "query": {
    "match_all": {}
  },
  "size": 10
}

OpenSearch query files (.os.query.json or .os.query)

{
  "query": {
    ...
  }
}

Index mappings (.os.mapping.json)

{
  "properties": {
    "title": {
      "type": "text",
      "analyzer": "standard"
    },
    "price": {
      "type": "scaled_float",
      "scaling_factor": 100
    }
  }
}

⌨️ Keyboard Shortcuts

Shortcut Action Context
Cmd/Ctrl+Enter Execute Query .os.http, .os.query.json files
Cmd/Ctrl+Shift+F Format Query .os.query.json files
Cmd/Ctrl+Shift+D Open DevTools Panel Global

🎛️ Commands

Command Description Context
OpenSearch: Configure Connection Open configuration dialog Global
OpenSearch: Execute Query Execute current query .os.http, .os.query.json files
OpenSearch: Format Query Format JSON query .os.query.json files
OpenSearch: Wrap in Bool Filter Wrap selection in bool filter clause .os.query.json files
OpenSearch: Wrap in Bool Should Wrap selection in bool should clause .os.query.json files
OpenSearch: Wrap in Bool Must Not Wrap selection in bool must_not clause .os.query.json files
OpenSearch: Open DevTools Open DevTools panel Global
OpenSearch: Generate Mock Data from Mapping Generate realistic test data from mapping .os.mapping.json files

🎨 File Types & Features

.os.http - DevTools HTTP Files

  • Purpose: OpenSearch Dashboards DevTools-like interface for HTTP requests
  • Features:
    • HTTP method support (GET, POST, PUT, DELETE)
    • Auto-completion for OpenSearch API endpoints
    • Cluster management operations (health, stats, nodes)
    • Index operations (CRUD, mappings, settings)
    • Advanced features (ISM, snapshots, security)
  • Snippets: 80+ snippets for all OS operations (os-get-health, os-put-ism-policy)
  • Usage: DevTools-style queries with request/response separation

.os.query.json - OpenSearch Query Files

  • Purpose: Valid JSON files for OpenSearch queries and aggregations
  • Features:
    • Full IntelliSense with query and aggregation completion
    • Query validation and JSON formatting
    • Bool query wrapping shortcuts (filter, should, must_not)
    • Real-time syntax validation
  • Snippets: 50+ query and aggregation snippets (os-match, os-bool, os-agg-terms)
  • Usage: Pure JSON query development with execution support

.os.mapping.json - Index Mapping Files

  • Purpose: Valid JSON files for OpenSearch index mappings
  • Features:
    • Comprehensive mapping validation
    • Field type checking and recommendations
    • Best practices analysis
    • Mock data generation from mappings (Command Palette or right-click context menu)
  • Snippets: 30+ field type and mapping snippets (os-field-text, os-mapping-complete)
  • Usage: Index mapping design and validation

🎯 Use Cases

Development Workflow

  1. Design mappings using .os.mapping.json files with validation
  2. Generate mock data from mappings for testing
  3. Develop queries using .os.query.json files with IntelliSense
  4. Test APIs using .os.http files in DevTools style
  5. Explore data using the tabular data viewer

Query Development

  • Build complex bool queries with easy wrapping shortcuts
  • Test aggregations with auto-completion
  • Format and validate queries before deployment
  • Export results for analysis

Data Exploration

  • Browse index data in tabular format
  • Search and filter documents
  • Examine index mappings and settings
  • Generate sample data for development

🐛 Troubleshooting

Common Issues

Connection Refused

  • Verify OpenSearch is running
  • Check hosts configuration in settings
  • Ensure SSL certificates are valid
  • Verify authentication credentials if required

Configuration Warning Banner Appears

  • Open Command Palette and run "OpenSearch: Configure Connection"
  • Add your OpenSearch hosts or AWS endpoint
  • Ensure at least one non-default host is configured
  • For file-based config: Check if .os-config.yaml exists in project root and has valid YAML syntax
  • For multiple connections: Ensure the default connection is properly configured

Queries Not Executing

  • Check OpenSearch configuration in settings
  • Verify hosts are accessible and authentication is correct
  • Check query syntax and formatting
  • Verify index names exist

IntelliSense Not Working

  • Ensure file has correct extension (.os.query.json, .os.http)
  • Reload VS Code window
  • Check extension is enabled

AWS OpenSearch Service Issues

  • Verify AWS credentials are configured
  • Check that IAM roles have proper permissions
  • Ensure VPC/security groups allow access if applicable

Mock Data Generation Fails

  • Validate mapping JSON syntax
  • Check for unsupported field types
  • Ensure reasonable document count (<10,000)

🔗 Links

  • OpenSearch Documentation
  • OpenSearch Documentation and Guides
  • OpenSearch Support

Happy searching! 🔍✨

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft