Backend resource · STATIC DECLARATIONS
User API reference · mansoq-core-teleicu
Static source contract for User: 16 declared or inherited operation mappings, schema/field evidence and authorization/refusal references. Deployment and behavioral review remain explicit.
Static API contract — behavior review pending. Source baseline f6e9f05f76d4.
Enable JavaScript to inspect structured operation, parameter, schema and permission evidence. Download this reference and its evidence.
Declared route and availability
This resource is declared in mansoq-core-teleicu at /api/v1/users/. verified core mount in config/urls.py This is an alternative core contract, not proof that the primary core uses the same behavior. A registered path and an indexed handler do not prove deployment availability, user permission or production readiness.
Operation map
| Method | Path | Action | Evidence |
|---|---|---|---|
| GET | /api/v1/users/ |
list | declared/inherited method |
| POST | /api/v1/users/ |
create | declared/inherited method |
| GET | /api/v1/users/{username}/ |
retrieve | declared/inherited method |
| PUT | /api/v1/users/{username}/ |
update | declared/inherited method |
| PATCH | /api/v1/users/{username}/ |
partial_update | declared/inherited method |
| DELETE | /api/v1/users/{username}/ |
destroy | declared/inherited method |
| POST | /api/v1/users/upsert/ |
upsert | @action declaration |
| GET | /api/v1/users/getcurrentuser/ |
getcurrentuser | @action declaration |
| GET | /api/v1/users/{username}/check_availability/ |
check_availability | @action declaration |
| POST | /api/v1/users/{username}/profile_picture/ |
profile_picture | @action declaration |
| DELETE | /api/v1/users/{username}/profile_picture/ |
profile_picture | @action declaration |
| PATCH | /api/v1/users/{username}/pnconfig/ |
pnconfig | @action declaration |
| GET | /api/v1/users/{username}/pnconfig/ |
pnconfig | @action declaration |
| POST | /api/v1/users/{username}/generate_service_account_token/ |
generate_service_account_token | @action declaration |
| DELETE | /api/v1/users/{username}/revoke_service_account_token/ |
revoke_service_account_token | @action declaration |
| POST | /api/v1/users/set_preferences/ |
set_preferences | @action declaration |
list · GET
GET /api/v1/users/ — action list. static contract extracted; runtime/permission/payload behavior review pending.
response: UserSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| first_name | str | true | No extra constraint extracted |
| last_name | str | true | No extra constraint extracted |
| phone_number | str | true | max_length: 14 |
| prefix | str | None | false | max_length: 10 |
| suffix | str | None | false | max_length: 50 |
| last_login | str | true | No extra constraint extracted |
| profile_picture_url | str | true | No extra constraint extracted |
| gender | str | true | No extra constraint extracted |
| username | str | true | No extra constraint extracted |
| mfa_enabled | bool | false | No extra constraint extracted |
| deleted | bool | false | No extra constraint extracted |
| role_orgs | dict | true | No extra constraint extracted |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
create · POST
POST /api/v1/users/ — action create. static contract extracted; runtime/permission/payload behavior review pending.
request: UserCreateSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| first_name | str | true | No extra constraint extracted |
| last_name | str | true | No extra constraint extracted |
| phone_number | str | true | max_length: 14 |
| prefix | str | None | false | max_length: 10 |
| suffix | str | None | false | max_length: 50 |
| gender | GenderChoices | true | No extra constraint extracted |
| geo_organization | UUID4 | None | false | No extra constraint extracted |
| password | str | None | false | No extra constraint extracted |
| username | str | true | No extra constraint extracted |
| str | true | No extra constraint extracted | |
| is_service_account | bool | false | No extra constraint extracted |
| role_orgs | list[UserRoleOrgCreateSpec] | true | No extra constraint extracted |
response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| first_name | str | true | No extra constraint extracted |
| last_name | str | true | No extra constraint extracted |
| phone_number | str | true | max_length: 14 |
| prefix | str | None | false | max_length: 10 |
| suffix | str | None | false | max_length: 50 |
| last_login | str | true | No extra constraint extracted |
| profile_picture_url | str | true | No extra constraint extracted |
| gender | str | true | No extra constraint extracted |
| username | str | true | No extra constraint extracted |
| mfa_enabled | bool | false | No extra constraint extracted |
| deleted | bool | false | No extra constraint extracted |
| role_orgs | dict | true | No extra constraint extracted |
| geo_organization | dict | true | No extra constraint extracted |
| created_by | dict | None | false | No extra constraint extracted |
| str | true | No extra constraint extracted | |
| flags | list[str] | false | No extra constraint extracted |
| is_service_account | bool | true | No extra constraint extracted |
Observed authorization checks: can_create_service_account, can_create_user, can_manage_organization_users_obj. Helper/queryset evidence is included; this is not proof of complete security review.
Declared refusal/error evidence: PermissionDenied: You do not have permission to create service accounts; PermissionDenied: You do not have permission to create Users; ValidationError: Role organization is not a role organization; PermissionDenied: Access denied for requested roles; IntegrityError: User creation failed due to email error..
retrieve · GET
GET /api/v1/users/{username}/ — action retrieve. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
update · PUT
PUT /api/v1/users/{username}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
request: UserUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| first_name | str | true | No extra constraint extracted |
| last_name | str | true | No extra constraint extracted |
| phone_number | str | true | max_length: 14 |
| prefix | str | None | false | max_length: 10 |
| suffix | str | None | false | max_length: 50 |
| gender | GenderChoices | true | No extra constraint extracted |
| geo_organization | UUID4 | None | false | No extra constraint extracted |
response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.
partial_update · PATCH
PATCH /api/v1/users/{username}/ — action partial_update. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
request: UserUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.
The declared field table is shown at its first occurrence in this reference; this operation links the same schema.
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.
destroy · DELETE
DELETE /api/v1/users/{username}/ — action destroy. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: status.HTTP_204_NO_CONTENT. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: You do not have permission to delete this user.
upsert · POST
POST /api/v1/users/upsert/ — action upsert. static contract extracted; runtime/permission/payload behavior review pending.
Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):
| Location | Field | Declared/inferred read type | Requiredness evidence |
|---|---|---|---|
| body | datapoints |
not declared at read site | not established |
Observed authorization checks: can_create_service_account, can_create_user, can_manage_organization_users_obj. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.
Declared refusal/error evidence: RestFrameworkValidationError: Invalid request data; RestFrameworkValidationError: No datapoints provided; RestFrameworkValidationError: Too many datapoints provided; PermissionDenied: You do not have permission to update this user; PermissionDenied: You do not have permission to create service accounts; PermissionDenied: You do not have permission to create Users; ValidationError: Role organization is not a role organization; PermissionDenied: Access denied for requested roles; IntegrityError: User creation failed due to email error..
Conditional gates: conditional/computed expression; inspect pinned declaration comparison settings.MAX_DATAPOINTS_PER_UPSERT.
getcurrentuser · GET
GET /api/v1/users/getcurrentuser/ — action getcurrentuser. static contract extracted; runtime/permission/payload behavior review pending.
decorator responses: CurrentUserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.
| Field | Type | Required | Constraints |
|---|---|---|---|
| meta | dict | false | No extra constraint extracted |
| id | UUID4 | None | false | No extra constraint extracted |
| first_name | str | true | No extra constraint extracted |
| last_name | str | true | No extra constraint extracted |
| phone_number | str | true | max_length: 14 |
| prefix | str | None | false | max_length: 10 |
| suffix | str | None | false | max_length: 50 |
| last_login | str | true | No extra constraint extracted |
| profile_picture_url | str | true | No extra constraint extracted |
| gender | str | true | No extra constraint extracted |
| username | str | true | No extra constraint extracted |
| mfa_enabled | bool | false | No extra constraint extracted |
| deleted | bool | false | No extra constraint extracted |
| role_orgs | dict | true | No extra constraint extracted |
| geo_organization | dict | true | No extra constraint extracted |
| created_by | dict | None | false | No extra constraint extracted |
| str | true | No extra constraint extracted | |
| flags | list[str] | false | No extra constraint extracted |
| is_service_account | bool | true | No extra constraint extracted |
| is_superuser | bool | true | No extra constraint extracted |
| qualification | str | None | true | No extra constraint extracted |
| doctor_experience_commenced_on | str | None | true | No extra constraint extracted |
| doctor_medical_council_registration | str | None | true | No extra constraint extracted |
| weekly_working_hours | str | None | true | No extra constraint extracted |
| alt_phone_number | str | None | true | No extra constraint extracted |
| date_of_birth | str | None | true | No extra constraint extracted |
| verified | bool | true | No extra constraint extracted |
| pf_endpoint | str | None | true | No extra constraint extracted |
| pf_p256dh | str | None | true | No extra constraint extracted |
| pf_auth | str | None | true | No extra constraint extracted |
| organizations | list[dict] | true | No extra constraint extracted |
| facilities | list[dict] | true | No extra constraint extracted |
| permissions | list[str] | true | No extra constraint extracted |
| preferences | dict | true | No extra constraint extracted |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
check_availability · GET
Checks availability of username by getting as query, returns 200 if available, and 409 otherwise.
GET /api/v1/users/{username}/check_availability/ — action check_availability. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: 200, 409. Other branches/framework exception handling may differ.
profile_picture · POST
POST /api/v1/users/{username}/profile_picture/ — action profile_picture. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: 405, 200, 204, 404. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.
profile_picture · DELETE
DELETE /api/v1/users/{username}/profile_picture/ — action profile_picture. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: 405, 200, 204, 404. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.
pnconfig · PATCH
PATCH /api/v1/users/{username}/pnconfig/ — action pnconfig. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
pnconfig · GET
GET /api/v1/users/{username}/pnconfig/ — action pnconfig. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
generate_service_account_token · POST
POST /api/v1/users/{username}/generate_service_account_token/ — action generate_service_account_token. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: You do not have permission to update token for service account.
Conditional gates: not has_permission.
revoke_service_account_token · DELETE
DELETE /api/v1/users/{username}/revoke_service_account_token/ — action revoke_service_account_token. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| path | username | router lookup string; semantic ID validation requires handler/schema review | true |
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.
Declared refusal/error evidence: PermissionDenied: You do not have permission to update token for service account.
Conditional gates: not has_permission.
set_preferences · POST
POST /api/v1/users/set_preferences/ — action set_preferences. static contract extracted; runtime/permission/payload behavior review pending.
Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.
Explicit response statuses in observed code: 201. Other branches/framework exception handling may differ.
Integration review checklist
Confirm the installed route and full schema; review authentication, organization/facility scoping, all accepted fields, value-state and date/time semantics, idempotency, pagination, response/exception branches and the allowed correction/reversal workflow. Test positive and negative cases with synthetic data. This source reference does not establish external certification or replace an illustrated user procedure.
Pinned source evidence
Links require access to the private source repository.
- repositories/teleicu/mansoq-core-teleicu/config/api_router.py:116
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:94
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:165
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:105
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:158
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:327
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:155
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/resources/user/spec.py:108
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:133
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:152
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:139
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:127
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:343
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:108
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:136
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:322
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/resources/user/spec.py:54
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/resources/user/spec.py:126
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:80
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:77
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:74
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:211
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:146
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:225
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:198
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:332
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:177
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:219
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:349
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:346
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/resources/user/spec.py:37
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:215
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:258
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:170
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:255
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:163
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/base.py:268
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:176
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/resources/user/spec.py:147
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:180
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:192
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:215
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:233
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:265
- repositories/teleicu/mansoq-core-teleicu/mansoq/emr/api/viewsets/user.py:288