Organization
Retrieve and filter organizations that the authenticated user has access to, including sub-organizations.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Endpoints
GET /organization/
Retrieves a list of organizations that the requesting user has access to, including any sub-organizations. Supports filtering by organization ID, name, or parent organization.
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | string | query | No | Filter by specific organization ID |
| name | string | query | No | Filter by organization name (supports partial matching) |
| parent | string | query | No | Filter by parent organization ID |
| limit | integer | query | No | Number of results to return per page (default: 20) |
| offset | integer | query | No | The initial index from which to return the results (default: 0) |
Example Request:
GET /api/v1/organization/?name=marketing&limit=10
Example Response:
{
"count": 25,
"next": "https://gate.zequenze.com/api/v1/organization/?limit=10&offset=10",
"previous": null,
"results": [
{
"id": "org_123456",
"name": "Marketing Department",
"parent": "org_000001",
"description": "Global marketing operations",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"member_count": 45,
"sub_organizations": [
{
"id": "org_123457",
"name": "Digital Marketing",
"parent": "org_123456"
}
]
},
{
"id": "org_123458",
"name": "Marketing Analytics",
"parent": "org_123456",
"description": "Data analysis and reporting",
"created_at": "2024-01-10T09:15:00Z",
"updated_at": "2024-01-18T11:20:00Z",
"member_count": 12,
"sub_organizations": []
}
]
}
| Status | Description |
|---|---|
| 200 | Organizations retrieved successfully |
| 401 | Unauthorized - Invalid or missing Bearer token |
| 403 | Forbidden - User does not have permission to view organizations |
| 429 | Too Many Requests - Rate limit exceeded |
Best Practices
- Use pagination parameters (
limitandoffset) when dealing with large organization hierarchies to improve performance - Cache organization data when possible as it typically doesn't change frequently
- Filter by
parentparameter to retrieve specific organizational levels or hierarchies - Use partial name matching to implement organization search functionality
- Monitor rate limits when making multiple requests in succession
- Handle 403 errors gracefully as users may have limited organizational visibility based on their permissions