TurboBulk Quick Start Guide
Available inCommunityCloudEnterprise
Get started with TurboBulk in 5 minutes.
Prerequisites
- NetBox Cloud or NetBox Enterprise instance with TurboBulk enabled
- API token with appropriate permissions (add/change/delete on target models)
- Python 3.10+ with
pip(for client library and examples)
Step 1: Get Your API Token
- Log in to your NetBox instance
- Navigate to Admin > API Tokens (or click your username → API Tokens)
- Create a new token with appropriate permissions for the models you'll be working with
- Copy the token value (v2 tokens start with
nbt_)
Step 2: Set Up Your Environment
# Set environment variables
export NETBOX_URL="https://your-instance-name.cloud.netboxapp.com"
export NETBOX_TOKEN="nbt_your-api-token"
# Install the TurboBulk client
pip install turbobulk-clientStep 3: Verify API Access
Test that TurboBulk is accessible:
curl -H "Authorization: Bearer $NETBOX_TOKEN" \
"$NETBOX_URL/api/plugins/turbobulk/models/" | head -20You should see a list of available models with their schemas.
Step 4: Run Your First Example
Using the Python Client
from turbobulk_client import TurboBulkClient
import gzip
import json
# Initialize client (uses NETBOX_URL and NETBOX_TOKEN env vars)
client = TurboBulkClient()
# Create test data - 10 sites
sites = [
{'name': f'tb-site-{i}', 'slug': f'tb-site-{i}', 'status': 'active'}
for i in range(10)
]
# Write JSONL file
with gzip.open('sites.jsonl.gz', 'wt', encoding='utf-8') as f:
for site in sites:
f.write(json.dumps(site) + '\n')
# Submit bulk load
result = client.load('dcim.site', 'sites.jsonl.gz')
print(f"Rows inserted: {result['data']['rows_inserted']}")Save this as hello_turbobulk.py and run:
python hello_turbobulk.pyExpected output:
Rows inserted: 10Common FK Column Naming Issue
IMPORTANT: Foreign key columns must use the
_idsuffix.# CORRECT: data = {'site_id': 1, 'device_type_id': 1} # WRONG (causes "FK value=0" errors): data = {'site': 1, 'device_type': 1}
Next Steps
-
Explore the examples - See the examples directory for progressive tutorials:
- Basic site insert
- Devices with FK resolution
- ETL workflow (export → transform → load)
- Bulk interface creation
- Cable connections
-
Read the documentation:
- User Guide - When to use, what gets bypassed
- API Reference - Complete endpoint documentation
- Python Client - Full client library reference
-
Understand the tradeoffs:
- TurboBulk dispatches webhooks and event rules asynchronously
- Use for bulk operations (>1,000 objects)
- Use REST API for interactive changes
-
Leverage export caching:
- Repeated exports return cached files if data hasn't changed
- Use
force_refresh=Trueto bypass cache - Use
check_cache_only=Trueto verify cache status without creating jobs
Troubleshooting
| Problem | Solution |
|---|---|
Connection refused | Check NETBOX_URL is correct |
401 Unauthorized | Check NETBOX_TOKEN is valid |
404 Not Found on /turbobulk/ | TurboBulk may not be enabled - contact support |
FK value=0 errors | Use _id suffix for FK columns (e.g., site_id) |
Jobs stuck in pending | Contact support |
Permission denied | Request add/change/delete permissions from your administrator |
Write operations are disabled | The server has enable_writes: False set - contact your administrator |
Getting Help
- Troubleshooting Guide - Detailed error resolution
- Examples - Working code examples
- NetBox Labs Support - Contact support for platform issues
TurboBulk
TurboBulk is a high-performance bulk data API for NetBox that loads, updates, deletes, and exports tens of thousands of objects per second - orders of magnit...
TurboBulk User Guide
TurboBulk is a high-performance bulk data API for NetBox that achieves massive throughput improvements over the REST API for large-scale data operations.