CLI & API
Interact programmatically with your Bindplane account using the CLI or direct HTTP requests.
The Bindplane CLI and REST API provide programmatic access to all Bindplane functionality, enabling automation, integration, and advanced management of your telemetry infrastructure.
Quick Start
CLI
# Install the CLI
curl -L -o bindplane.zip https://storage.googleapis.com/bindplane-op-releases/bindplane/latest/bindplane-ee-linux-amd64.zip
unzip bindplane.zip
sudo mv bindplane /usr/local/bin/
# Configure with API key
bindplane profile set default --api-key YOUR_API_KEY --remote-url https://app.bindplane.com
# Get started
bindplane get agents
API
# Make your first API call
curl -H "X-Bindplane-Api-Key: YOUR_API_KEY" https://app.bindplane.com/v1/agents
What's Included
CLI (Command Line Interface)
Installation: Cross-platform installation for Linux, macOS, and Windows
Commands: 16+ commands for managing all Bindplane resources
Profiles: Support for multiple environments and configurations
Output Formats: JSON, YAML, table, and raw output options
Key CLI Commands:
get
- Display resources (collectors, configurations, sources, etc.)apply
- Apply resourcesdelete
- Remove resourcesinstall
- Install new collectorsrollout
- Manage configuration rolloutsprofile
- Manage connection profiles
REST API
Complete Coverage: All programmatic functionality available via HTTP endpoints
RESTful Design: Standard HTTP methods and status codes
JSON Responses: Consistent JSON format for all responses
Rate Limiting: Built-in rate limiting with exponential backoff support
API Resource Categories:
Agents: Manage collector instances and configurations
Configurations: Create and manage telemetry configurations
Sources & Destinations: Configure data sources and outputs
Organizations & Users: Manage access and permissions
Rollouts: Control configuration deployments
Authentication
Both CLI and API use the same authentication system with API keys.
CLI Configuration
# Set up a profile with API key
bindplane profile set default --api-key YOUR_API_KEY --remote-url https://app.bindplane.com
bindplane profile use default
API Headers
# Include API key in all requests
curl -H "X-Bindplane-Api-Key: YOUR_API_KEY" https://app.bindplane.com/v1/endpoint
Common Use Cases
Automation
# CLI: Automated collector deployment
bindplane install agent --name "web-server-01" --labels "env=prod,role=web"
# API: Programmatic configuration management
curl -X POST -H "X-Bindplane-Api-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "web-config", "spec": {...}}' \
https://app.bindplane.com/v1/configurations
Integration
# CLI: Export configurations for version control
bindplane get configurations -o yaml > configs.yaml
# API: Integrate with monitoring systems
curl -H "X-Bindplane-Api-Key: $API_KEY" \
https://app.bindplane.com/v1/agents | jq '.agents[].status'
Bulk Operations
# CLI: Bulk agent management
bindplane label agents --add "maintenance=true" --filter "env=staging"
# API: Bulk configuration updates
curl -X PATCH -H "X-Bindplane-Api-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"labels": {"maintenance": "true"}}' \
https://app.bindplane.com/v1/agents/labels
Error Handling
CLI
Exit codes indicate success/failure
Detailed error messages with suggestions
Verbose mode for debugging:
--verbose
API
Standard HTTP status codes (200, 400, 401, 403, 404, 500)
JSON error responses with details:
{
"error": "Error message",
"code": "ERROR_CODE"
}
Last updated
Was this helpful?