Skip to main content

Inventory Connection Profile

Manage inventory connection profiles that define connection configurations for inventory systems.

Base URL: https://control.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /inventory_connection_profile/

Retrieve a paginated list of inventory connection profiles with optional filtering by name.

Parameters:

Parameter Type In Required Description
name string query No Filter profiles by name (partial match)
limit integer query No Number of results to return per page
offset integer query No The initial index from which to return the results

Example Request:

GET /api/v1/inventory_connection_profile/?name=production&limit=10&offset=0

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",
      "description": "Production inventory database connection",
      "connection_type": "database",
      "host": "prod-inventory.example.com",
      "port": 5432,
      "database": "inventory_prod",
      "username": "inventory_user",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "is_active": true
    },
    {
      "id": 2,
      "name": "staging-api",
      "description": "Staging environment API connection",
      "connection_type": "api",
      "host": "staging-api.example.com",
      "port": 443,
      "endpoint": "/api/v1/inventory",
      "created_at": "2024-01-14T14:22:00Z",
      "updated_at": "2024-01-14T14:22:00Z",
      "is_active": true
    }
  ]
}
Status Description
200 Success
401 Unauthorized
403 Forbidden

GET /inventory_connection_profile/{id}/

Retrieve detailed information about a specific inventory connection profile.

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the inventory connection profile

Example Request:

GET /api/v1/inventory_connection_profile/1/

Example Response:

{
  "id": 1,
  "name": "production-database",
  "description": "Production inventory database connection",
  "connection_type": "database",
  "host": "prod-inventory.example.com",
  "port": 5432,
  "database": "inventory_prod",
  "username": "inventory_user",
  "ssl_enabled": true,
  "timeout": 30,
  "max_connections": 10,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "created_by": "admin@example.com",
  "is_active": true,
  "last_tested": "2024-01-20T09:15:00Z",
  "test_status": "success"
}
Status Description
200 Success
401 Unauthorized
403 Forbidden
404 Profile not found

Best Practices

  • Filtering: Use the name parameter to search for specific connection profiles when working with large datasets
  • Pagination: Always implement pagination for list requests using limit and offset parameters to optimize performance
  • Error Handling: Check the test_status field to verify connection profile health before using it for inventory operations
  • Security: Connection profiles may contain sensitive information; ensure proper access controls are in place
  • Caching: Consider caching connection profile data as it typically changes infrequently
  • Monitoring: Regularly check the last_tested timestamp to ensure connection profiles are being validated