User
ManageThe User API provides comprehensive useraccountsmanagementandfunctionality including AAA (Authentication, Authorization, and Accounting) profile information. These endpoints enable you to create, retrieve, update, and delete users, with support for both ID-based and username-based operations for flexible integration scenarios.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The User API category is designed for complete user lifecycle management within the GATE system. It provides dual access patterns - both ID-based and username-based operations - making it versatile for different integration approaches. Whether you're building a user management interface, synchronizing user data from external systems, or implementing automated user provisioning, these endpoints provide the necessary functionality.
Key Features:
Common Integration Scenarios:
Endpoints
GET /user/
Description: Retrieve a paginated list of users with optionalcomprehensive filtering byoptions. ID,This username,endpoint is ideal for building user directory listings, implementing search functionality, or organization.performing bulk operations across user datasets.
Use Cases:
Full URL Example:
https://gate.zequenze.com/api/v1/user/?organization=engineering&limit=25&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | string | query | No | Filter users by specific user ID |
| username | string | query | No | Filter users by username (supports partial matching) |
| organization | string | query | No | Filter |
| 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://gate.zequenze.com/api/v1/user/?organization=acmeengineering&limit=20&offset=025" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 45,156,
"next": "https://gate.zequenze.com/api/v1/user/?limit=2025&offset=20"25&organization=engineering",
"previous": null,
"results": [
{
"id": "12345",42,
"username": "john.doe"smith",
"email": "john.doe@acme.smith@company.com",
"organization": "acme",
"profile": {
"first_name": "John",
"last_name": "Doe"Smith",
"organization": "engineering",
"is_active": true,
"last_login": "2024-01-15T14:22:30Z",
"date_joined": "2023-08-12T09:15:00Z",
"groups": ["developers", "vpn_users"],
"aaa_profile": {
"role": "admin"user",
"created_at"department": "2024-01-15T10:30:00Z"Software Engineering",
"manager": "jane.doe",
"access_level": "standard"
}
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of users |
| 401 | Unauthorized - Invalid or missing authentication token |
POST /user/
Description: Create a new user accountwith withcomplete profile information including AAA profilesettings. information.This endpoint is essential for user onboarding processes, automated provisioning systems, and administrative user creation workflows.
Parameters:Use Cases:
- Automated employee
ParameteronboardingTypefromInHRRequiredsystemsDescription - Self-registration
ExampleFull Request:URL Example:
POST https://gate.zequenze.com/api/v1/user/
Content-Type: application/json
{
"username": "jane.smith",
"email": "jane.smith@acme.com",
"password": "secure_password123",
"organization": "acme",
"profile": {
"first_name": "Jane",
"last_name": "Smith",
"role": "user"
}
}
Example Response:
{
"id": "67890",
"username": "jane.smith",
"email": "jane.smith@acme.com",
"organization": "acme",
"profile": {
"first_name": "Jane",
"last_name": "Smith",
"role": "user",
"created_at": "2024-01-20T14:22:00Z"
}
}
GET /user/username/{username}/
Retrieve a specific user by their username.
Example Request:
GET /api/v1/user/username/john.doe/
Example Response:
{
"id": "12345",
"username": "john.doe",
"email": "john.doe@acme.com",
"organization": "acme",
"profile": {
"first_name": "John",
"last_name": "Doe",
"role": "admin",
"created_at": "2024-01-15T10:30:00Z",
"last_login": "2024-01-20T09:15:00Z"
}
}
PUT /user/username/{username}/
Update a user's complete information by username.
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| data | object | body | Yes | Complete user |
ExamplecURL Request:Example:
PUTcurl -X POST "https://gate.zequenze.com/api/v1/user/username/john.doe/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"username": "john.doe"sarah.johnson",
"email": "john.doe@newcompany.sarah.johnson@company.com",
"first_name": "Sarah",
"last_name": "Johnson",
"organization": "newcompany"marketing",
"profile"password": "SecureP@ssw0rd!",
"is_active": true,
"groups": ["marketing_team", "vpn_users"],
"aaa_profile": {
"first_name": "John",
"last_name": "Doe",
"role": "user",
"department": "Digital Marketing",
"manager": "mike.wilson",
"access_level": "standard"
}
}'
Example Response:
{
"id": 157,
"12345"username": "sarah.johnson",
"email": "sarah.johnson@company.com",
"first_name": "Sarah",
"last_name": "Johnson",
"organization": "marketing",
"is_active": true,
"last_login": null,
"date_joined": "2024-01-16T10:30:45Z",
"groups": ["marketing_team", "vpn_users"],
"aaa_profile": {
"role": "user",
"department": "Digital Marketing",
"manager": "mike.wilson",
"access_level": "standard"
}
}
Response Codes:
GET /user/username/{username}/
Description: Retrieve detailed information for a specific user identified by their username. This endpoint is particularly useful when integrating with systems that primarily work with usernames rather than numeric IDs.
Use Cases:
Full URL Example:
https://gate.zequenze.com/api/v1/user/username/john.smith/
cURL Example:
curl -X GET "https://gate.zequenze.com/api/v1/user/username/john.smith/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 42,
"username": "john.doe"smith",
"email": "john.doe@newcompany.smith@company.com",
"organization": "newcompany",
"profile": {
"first_name": "John",
"last_name": "Doe"Smith",
"organization": "engineering",
"is_active": true,
"last_login": "2024-01-15T14:22:30Z",
"date_joined": "2023-08-12T09:15:00Z",
"groups": ["developers", "vpn_users", "senior_staff"],
"aaa_profile": {
"role": "manager"senior_developer",
"updated_at"department": "2024-01-20T16:45:00Z"Software Engineering",
"manager": "jane.doe",
"access_level": "elevated",
"security_clearance": "confidential"
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success |
PATCHPUT /user/username/{username}/
PartiallyDescription: Completely update a user's profile information byusing username.their username as the identifier. This operation replaces the entire user record with the provided data, making it suitable for comprehensive profile updates.
Parameters:Use Cases:
- Complete profile
ParametersynchronizationTypefromInexternalRequiredHRDescriptionsystems - Administrative
ExampleFull Request:URL Example:
PATCH https://gate.zequenze.com/api/v1/user/username/john.doe/smith/
cURL Example:
curl -X PUT "https://gate.zequenze.com/api/v1/user/username/john.smith/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"profile"username": "john.smith",
"email": "j.smith@company.com",
"first_name": "Jonathan",
"last_name": "Smith",
"organization": "engineering",
"is_active": true,
"groups": ["developers", "vpn_users", "team_leads"],
"aaa_profile": {
"role": "senior_admin"team_lead",
"department": "Software Engineering",
"manager": "jane.doe",
"access_level": "elevated"
}
}'
ExampleResponse Response:Codes:
{
"id": "12345",
"username": "john.doe",
"email": "john.doe@acme.com",
"organization": "acme",
"profile": {
"first_name": "John",
"last_name": "Doe",
"role": "senior_admin",
"updated_at": "2024-01-20T17:30:00Z"
}
}
| Status | Description |
|---|---|
| 200 | Success - User successfully updated |
| 401 | Unauthorized - Invalid or missing authentication token |
PATCH /user/username/{username}/
Description: Partially update specific fields of a user's profile using their username. This endpoint allows you to modify only the fields you specify while leaving other user data unchanged, perfect for targeted updates.
Use Cases:
Full URL Example:
https://gate.zequenze.com/api/v1/user/username/john.smith/
cURL Example:
curl -X PATCH "https://gate.zequenze.com/api/v1/user/username/john.smith/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "john.smith.new@company.com",
"aaa_profile": {
"access_level": "admin"
}
}'
Response Codes:
DELETE /user/username/{username}/
DeleteDescription: Permanently delete a user byaccount using their username.username as the identifier. This operation is irreversible and will remove all user data and associated AAA profile information.
ExampleUse Request:Cases:
Full URL Example:
DELETE https://gate.zequenze.com/api/v1/user/username/john.doe/smith/
cURL Example:
curl -X DELETE "https://gate.zequenze.com/api/v1/user/username/john.smith/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Codes:
| Status | Description |
|---|---|
| 204 | No Content |
GET /user/{id}/
Description: Retrieve detailed information for a specific user identified by their numeric ID. This endpoint is optimal for applications that primarily work with database IDs and need consistent, immutable user references.
ExampleUse Request:Cases:
Full URL Example:
GET https://gate.zequenze.com/api/v1/user/12345/42/
cURL Example:
curl -X GET "https://gate.zequenze.com/api/v1/user/42/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": "12345",42,
"username": "john.doe"smith",
"email": "john.doe@acme.smith@company.com",
"organization": "acme",
"profile": {
"first_name": "John",
"last_name": "Doe"Smith",
"organization": "engineering",
"is_active": true,
"last_login": "2024-01-15T14:22:30Z",
"date_joined": "2023-08-12T09:15:00Z",
"groups": ["developers", "vpn_users"],
"aaa_profile": {
"role": "admin"user",
"created_at"department": "2024-01-15T10:30:00Z"Software Engineering",
"manager": "jane.doe",
"access_level": "standard"
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success |
PUT /user/{id}/
UpdateDescription: Completely update a user's completeprofile information byusing their numeric ID. This operation replaces the entire user record, providing a reliable way to synchronize complete user profiles in ID-based systems.
Parameters:
Example Request:Example:
PUT https://gate.zequenze.com/api/v1/user/12345/42/
cURL Example:
curl -X PUT "https://gate.zequenze.com/api/v1/user/42/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"username": "john.doe.updated"smith",
"email": "john.doe.updated@acme.smith.updated@company.com",
"organization": "acme",
"profile": {
"first_name": "John",
"last_name": "Doe-Smith",
"organization": "engineering",
"is_active": true,
"groups": ["developers", "vpn_users", "architects"],
"aaa_profile": {
"role": "super_admin"senior_developer",
"department": "Software Engineering",
"manager": "jane.doe",
"access_level": "elevated"
}
}'
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - User successfully updated |
| 401 | Unauthorized - Invalid or missing authentication token |
PATCH /user/{id}/
Description: Partially update specific fields of a user's informationprofile byusing their numeric ID. This endpoint enables precise, field-level updates while maintaining data integrity for unchanged fields.
Parameters:
Example Request:Example:
PATCH https://gate.zequenze.com/api/v1/user/12345/42/
cURL Example:
curl -X PATCH "https://gate.zequenze.com/api/v1/user/42/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"is_active": false,
"aaa_profile": {
"email"access_level": "new.email@acme.com"suspended"
}
}'
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - User partially updated |
| 401 | Unauthorized - Invalid or missing authentication token |
DELETE /user/{id}/
DeleteDescription: Permanently delete a user byaccount using their numeric ID. This operation provides a reliable way to remove users in systems that primarily work with database IDs.
ExampleFull Request:URL Example:
DELETE https://gate.zequenze.com/api/v1/user/12345/42/
cURL Example:
curl -X DELETE "https://gate.zequenze.com/api/v1/user/42/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Codes:
| Status | Description |
|---|---|
| 204 | No Content |
Common Use Cases
Employee Onboarding Automation
Integrate with HR systems to automatically create user accounts when new employees join. Use POST /user/ to create accounts with complete AAA profiles, then use PATCH /user/username/{username}/ to update group memberships as roles are assigned.
User Directory Synchronization
Regularly sync user data from external directory services using GET /user/ to retrieve current users, then use PUT operations to update existing profiles or POST to create new ones as needed.
Self-Service Profile Management
Build user portals where individuals can update their own information using GET /user/username/{username}/ to display current data and PATCH operations to save specific field changes.
Compliance and Audit Workflows
Use the dual access patterns (ID and username) to maintain consistent audit trails while supporting both human-readable usernames and immutable ID references for compliance reporting.
Bulk Operations and Maintenance
Leverage the list endpoint with pagination (GET /user/) to process large user datasets efficiently, combined with batch update operations for maintenance tasks like group membership changes or policy updates.
Best Practices
- Choose the Right Identifier: Use username-based endpoints for user-facing applications and ID-based endpoints for backend systems requiring stable references
limit values (recommended: 25-50 users per page) to avoid performance issues with large user datasets
Handle Partial Updates Carefully: Use limitPATCH offsetPUT for complete profile replacements
?organization=acme&role=adminPOST /user/
Implement Soft Deletion: Consider using PATCH to set is_active: false instead of DELETE operations to preserve audit trails and data relationships
Cache User Data Appropriately: User profile data changes infrequently - implement reasonable caching strategies to reduce API calls
Monitor Rate Limits: Bulk operations should implement appropriate delays and respect API rate limiting to maintain system stability