> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/open-api-reference/myaccount.md).

# Myaccount

## GET /myaccount/

> Dedicated my account json response

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedMyAccountList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MyAccount"}}}},"MyAccount":{"type":"object","description":"This serialize class provide the API representation\n\nArgs:\n    serializers ([ModelSerializer])","properties":{"id":{"type":"integer","readOnly":true},"username":{"type":"string","description":"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.","pattern":"^[\\w.@+-]+$","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"password":{"type":"string","writeOnly":true,"maxLength":128},"is_superuser":{"type":"boolean","readOnly":true,"title":"Superuser status","description":"Designates that this user has all permissions without explicitly assigning them."},"groups":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups."},"group_assignments":{"type":"string","readOnly":true},"user_permissions":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Specific permissions for this user."}},"required":["group_assignments","groups","id","is_superuser","password","user_permissions","username"]}}},"paths":{"/myaccount/":{"get":{"operationId":"myaccount_list","description":"Dedicated my account json response","parameters":[{"in":"query","name":"date_joined","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"email","schema":{"type":"string"}},{"in":"query","name":"first_name","schema":{"type":"string"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"query","name":"groups","schema":{"type":"array","items":{"type":"integer"}},"explode":true,"style":"form"},{"in":"query","name":"is_active","schema":{"type":"boolean"}},{"in":"query","name":"is_staff","schema":{"type":"boolean"}},{"in":"query","name":"is_superuser","schema":{"type":"boolean"}},{"in":"query","name":"last_login","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"last_name","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"in":"query","name":"password","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"user_permissions","schema":{"type":"array","items":{"type":"integer"}},"explode":true,"style":"form"},{"in":"query","name":"username","schema":{"type":"string"}}],"tags":["myaccount"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedMyAccountList"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaginatedMyAccountList"}}},"description":""}}}}}}
```

## GET /myaccount/{id}/

> This class will define the view behavior

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"MyAccount":{"type":"object","description":"This serialize class provide the API representation\n\nArgs:\n    serializers ([ModelSerializer])","properties":{"id":{"type":"integer","readOnly":true},"username":{"type":"string","description":"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.","pattern":"^[\\w.@+-]+$","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"password":{"type":"string","writeOnly":true,"maxLength":128},"is_superuser":{"type":"boolean","readOnly":true,"title":"Superuser status","description":"Designates that this user has all permissions without explicitly assigning them."},"groups":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups."},"group_assignments":{"type":"string","readOnly":true},"user_permissions":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Specific permissions for this user."}},"required":["group_assignments","groups","id","is_superuser","password","user_permissions","username"]}}},"paths":{"/myaccount/{id}/":{"get":{"operationId":"myaccount_retrieve","description":"This class will define the view behavior","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this user.","required":true}],"tags":["myaccount"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyAccount"}},"application/xml":{"schema":{"$ref":"#/components/schemas/MyAccount"}}},"description":""}}}}}}
```

## PATCH /myaccount/{id}/

> This class will define the view behavior

```json
{"openapi":"3.0.3","info":{"title":"OCS Inventory Backend API References","version":"3.0.0"},"security":[{"knoxApiToken":[]}],"components":{"securitySchemes":{"knoxApiToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PatchedMyAccount":{"type":"object","description":"This serialize class provide the API representation\n\nArgs:\n    serializers ([ModelSerializer])","properties":{"id":{"type":"integer","readOnly":true},"username":{"type":"string","description":"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.","pattern":"^[\\w.@+-]+$","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"password":{"type":"string","writeOnly":true,"maxLength":128},"is_superuser":{"type":"boolean","readOnly":true,"title":"Superuser status","description":"Designates that this user has all permissions without explicitly assigning them."},"groups":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups."},"group_assignments":{"type":"string","readOnly":true},"user_permissions":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Specific permissions for this user."}}},"MyAccount":{"type":"object","description":"This serialize class provide the API representation\n\nArgs:\n    serializers ([ModelSerializer])","properties":{"id":{"type":"integer","readOnly":true},"username":{"type":"string","description":"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.","pattern":"^[\\w.@+-]+$","maxLength":150},"email":{"title":"Email address","oneOf":[{"type":"string","format":"email","maxLength":254},{"type":"string","maxLength":0}]},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"password":{"type":"string","writeOnly":true,"maxLength":128},"is_superuser":{"type":"boolean","readOnly":true,"title":"Superuser status","description":"Designates that this user has all permissions without explicitly assigning them."},"groups":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups."},"group_assignments":{"type":"string","readOnly":true},"user_permissions":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Specific permissions for this user."}},"required":["group_assignments","groups","id","is_superuser","password","user_permissions","username"]}}},"paths":{"/myaccount/{id}/":{"patch":{"operationId":"myaccount_partial_update","description":"This class will define the view behavior","parameters":[{"in":"query","name":"format","schema":{"type":"string","enum":["json","xml"]}},{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this user.","required":true}],"tags":["myaccount"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedMyAccount"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedMyAccount"}},"application/json":{"schema":{"$ref":"#/components/schemas/PatchedMyAccount"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PatchedMyAccount"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyAccount"}},"application/xml":{"schema":{"$ref":"#/components/schemas/MyAccount"}}},"description":""}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.ocsinventory-ng.org/open-api-reference/myaccount.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
