API Reference¶
The NetBox Toolkit Plugin provides a comprehensive REST API for network device command execution and management.
Quick Start¶
Authentication¶
All API requests require authentication using NetBox's token system:
curl -H "Authorization: Token YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
https://netbox.example.com/api/plugins/toolkit/commands/
Base URL¶
All API endpoints are prefixed with:
Available Resources¶
Each API resource has its own dedicated documentation page:
Commands API¶
- Purpose: Manage network commands and execute them on devices
- Endpoints:
/commands/
- Key Features: CRUD operations, command execution, bulk operations
Command Logs API¶
- Purpose: Track command execution history and results
- Endpoints:
/command-logs/
- Key Features: Execution history, statistics, export capabilities
Authentication & Permissions¶
- Purpose: Security and access control
- Key Features: Token authentication, object permissions, action permissions
Error Handling¶
- Purpose: Error codes and troubleshooting
- Key Features: Error structure, common errors, resolution strategies
Common Patterns¶
Pagination¶
All list endpoints support pagination:
Filtering¶
Extensive filtering is available on most endpoints:
Sorting¶
Results can be sorted using the ordering
parameter:
Interactive Documentation¶
- Swagger UI:
/api/docs/
- ReDoc:
/api/redoc/
- OpenAPI Schema:
/api/schema/
Rate Limiting¶
The API implements intelligent rate limiting: - Device-specific limits: Protects individual network devices - User bypass capability: Configurable for privileged users - Smart counting: Only successful commands count toward limits