🚀 Brokerpilot API Usage Documentation
This document serves as the primary technical reference for the Brokerpilot API, covering service authentication, frontend data retrieval, and backend communication protocols.
🔑 1. Getting Your API Token
Before utilizing the API, you must obtain a static token from a Brokerpilot administrator.
Steps to Generate a Token:
- Go to Administration - Users page on your Brokerpilot instance.
- Click the "Create API Token" button.
- In the "Service Name" field, provide a unique name for your application/service.
- Click "Generate Token".
- Security Warning: Copy and store your token in a secure location immediately. You will not be able to view it again after closing the window.
- Ensure the administrator enables the required permissions for this specific service.
⚠️ The token remains valid indefinitely until revoked by an administrator.
🔐 2. Service Authentication
To begin a session, you must exchange your API token for a session_token.
- Endpoint:
POST /api/auth/service - Header:
Authorization: Bearer <your_token> - Content-Type:
application/json
Success Response:
A JSON object containing a session_token. Store this token for all subsequent requests.
🖥️ 3. Frontend Data Retrieval
Standard resource requests (e.g., user lists) are made directly to the frontend API.
- Endpoint:
GET /api/users - Header:
Authorization: Bearer <your_session_token> - Content-Type:
application/json
⚙️ 4. Backend Data Requests
Specific backend data is retrieved by passing a JSON object as a URL parameter.
Request Formatting
The JSON payload must be URL-encoded.
- Example (JavaScript):
encodeURIComponent(JSON.stringify({"RequestName": "RequestNodesInfo"}))
Key Request Types
| Resource | JSON Payload |
|---|---|
| List of Nodes | {"RequestName": "RequestNodesInfo"} |
| List of Issues | {"RequestName": "RequestIssues"} |
Request Template
GET /api/request?request=<URL-safe_JSON>
- Header:
Authorization: Bearer <your_session_token> - Content-Type:
application/json
🚫 5. Constraints and Rate Limits
- Concurrency: The API allows no more than one concurrent request.
- Service Creation: Only one service can be created at a time.
- Safety: Ensure all JSON payloads in URLs are properly sanitized and encoded.
🛠️ 6. Support
For technical assistance or troubleshooting, please contact the Brokerpilot support team.
📂 API Reference Directory
Navigate to the specific module of the documentation on the left panel or look for the required API request using the search function at the top right.