Inventory Connection Profile
ManageTheinventoryInventory Connection Profile API allows you to manage and retrieve connection profilesthat define connection configurationsused for integrating with external inventory systems. These profiles define authentication credentials, connection settings, and configuration parameters needed to connect BookStack with various inventory management platforms and databases.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Connection Profile endpoints provide access to connection profiles that enable BookStack to integrate with external inventory management systems. These profiles store essential connection information such as API endpoints, authentication credentials, database connection strings, and other configuration parameters required to synchronize inventory data.
Connection profiles are typically used to:
These endpoints work together to provide both list and detailed views of available connection profiles, allowing administrators to review configured integrations and their settings. The list endpoint supports filtering and pagination for efficient browsing of multiple profiles, while the detail endpoint provides complete configuration information for specific profiles.
Understanding connection profiles is crucial for managing inventory integrations, as they serve as the bridge between BookStack and external inventory management systems, ensuring data flows securely and reliably between platforms.
Endpoints
GET /inventory_connection_profile/
RetrieveDescription: Retrieves a paginated list of inventory connection profiles with optional filtering capabilities. This endpoint is essential for discovering available inventory integrations and reviewing their basic configuration details.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_connection_profile/?name=warehouse&limit=20&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | query | No | Filter profiles by name (supports partial |
| limit | integer | query | No | Number of results to return per page (default: 20, max: 100) |
| offset | integer | query | No | The initial index from which to return |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_connection_profile/?name=productionwarehouse&limit=10&offset=010" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,
"next": "https://control.zequenze.com/api/v1/inventory_connection_profile/?limit=10&offset=10",
"previous": null,
"results": [
{
"id": 1,
"name": "production-database"Warehouse Management System",
"description"profile_type": "Production inventory database connection"rest_api",
"connection_type"status": "database"active",
"host"last_sync": "prod-inventory.example.com"2024-01-15T10:30:00Z",
"port": 5432,
"database"organization": "inventory_prod",Main "username": "inventory_user"Warehouse",
"created_at": "2024-01-15T10:30:01T09:00:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"is_active": true
},
{
"id": 2,
"name": "staging-api"Legacy Inventory Database",
"description"profile_type": "Staging environment API connection"database",
"connection_type"status": "api"inactive",
"host"last_sync": "staging-api.example.com"2024-01-10T14:22:00Z",
"port": 443,
"endpoint"organization": "/api/v1/inventory"Legacy Systems",
"created_at": "2024-01-14T14:22:2023-12-15T16:45:00Z",
"updated_at": "2024-01-14T14:10T14:22:00Z",
"is_active": true
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of connection profiles |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions to access inventory profiles |
GET /inventory_connection_profile/{id}/
RetrieveDescription: Retrieves detailed information about a specific inventory connection profile.profile, including full configuration details, authentication settings, and synchronization parameters. This endpoint provides comprehensive profile data needed for managing and troubleshooting inventory integrations.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_connection_profile/1/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | Unique identifier of the inventory connection profile to retrieve |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_connection_profile/1/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,
"name": "production-database"Warehouse Management System",
"description": "ProductionPrimary connection to warehouse inventory databasemanagement connection"system",
"connection_type"profile_type": "database"rest_api",
"host"status": "prod-inventory.example.com"active",
"port": 5432,
"database"endpoint_url": "inventory_prod"https://warehouse-api.company.com/v2",
"username"authentication_type": "inventory_user"api_key",
"ssl_enabled": true,
"timeout"connection_timeout": 30,
"max_connections"retry_attempts": 10,3,
"sync_frequency": "hourly",
"last_sync": "2024-01-15T10:30:00Z",
"last_sync_status": "success",
"sync_record_count": 1247,
"organization": "Main Warehouse",
"created_by": "admin@company.com",
"created_at": "2024-01-15T10:30:01T09:00:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"created_by"configuration": {
"data_mapping": {
"item_id": "admin@example.com"sku",
"is_active"quantity": "stock_count",
"location": "warehouse_section"
},
"filters": {
"active_items_only": true,
"last_tested"exclude_categories": ["obsolete", "discontinued"]
}
},
"health_status": {
"connectivity": "2024-01-20T09:15:00Z"healthy",
"test_status"authentication": "success"valid",
"last_error": null,
"error_count_24h": 0
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns detailed connection profile information |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions to access this profile |
| 404 |
Common Use Cases
Use Case 1: Admin Dashboard Integration List
Display all configured inventory connections in an administrative interface, showing their status and last synchronization times. Use the list endpoint with pagination to handle large numbers of profiles efficiently.
Use Case 2: Connection Profile Health Monitoring
Retrieve detailed information about specific profiles to monitor their health status, check for authentication issues, and review synchronization statistics for operational monitoring.
Use Case 3: Integration Configuration Review
Access complete configuration details for existing connection profiles when setting up similar integrations or troubleshooting synchronization problems with external inventory systems.
Use Case 4: Security Audit and Compliance
Filter and review all inventory connection profiles to ensure proper authentication methods are in use and that connection configurations meet security and compliance requirements.
Use Case 5: Troubleshooting Sync Issues
Examine detailed profile information including error logs, sync statistics, and configuration parameters to diagnose and resolve inventory data synchronization problems.
Best Practices
-
Filtering:Pagination Management: When listing connection profiles, use appropriate limit values (10-50) to balance performance with usability, especially in environments with many configured integrations.
Error Handling: Always implement proper error handling for 404 responses when accessing specific profiles, as profiles may be deleted or access permissions may change.
Security Considerations: Treat connection profile data as sensitive information. The detailed endpoint may expose configuration parameters that could be used to compromise inventory integrations.
Caching Strategy: Cache connection profile data appropriately, but ensure cache invalidation aligns with the frequency of configuration changes in your environment.
Filtering Efficiency: Use the name filter parameter to searchreduce data transfer and improve response times when searching for specific connection profiles when working within large datasetsdeployments.
Pagination:Monitoring Integration Always implement pagination for list requests using limit and offset parameters to optimize performance
test_statuslast_testedhealth_status