# User

## Overview

User data model hosts information about any user.

### Summary

| Field          |                                         Create                                        |                                         Update                                        |                                         Unique                                        |                                        Required                                       |
| -------------- | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: |
| id             | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |
| name           | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| email          | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| organization   | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| account        | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| internal       | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| quota          | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| projects       | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| sharedProjects | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| configs        | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| filters        | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |
| attributes     | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) | ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/yes.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |  ![](https://github.com/opencb/opencga/blob/develop/docs/data-models/no.png?raw=true) |

## Data Model

### User

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/user/User.java).

| Field                                                                                                                                                        | Description                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>id</strong><br><em>String</em><br></p>                                                                                                            | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.                        |
| <p><strong>name</strong><br><em>String</em><br></p>                                                                                                          | User name.                                                                                                                  |
| <p><strong>email</strong><br><em>String</em><br></p>                                                                                                         | User email.                                                                                                                 |
| <p><strong>organization</strong><br><em>String</em><br></p>                                                                                                  | User organization.                                                                                                          |
| <p><strong>account</strong><br><a href="https://docs.opencga.opencb.org/data-models/user#account"><em>Account</em></a><br></p>                               | User account.                                                                                                               |
| <p><strong>internal</strong><br><a href="https://docs.opencga.opencb.org/data-models/user#userinternal"><em>UserInternal</em></a><br></p>                    | Internal field for manage the object.                                                                                       |
| <p><strong>quota</strong><br><a href="https://docs.opencga.opencb.org/data-models/user#userquota"><em>UserQuota</em></a><br></p>                             | User quota                                                                                                                  |
| <p><strong>projects</strong><br><em>List<</em><a href="https://docs.opencga.opencb.org/data-models/project"><em>Project</em></a><em>></em><br></p>           | A List with related projects.                                                                                               |
| <p><strong>sharedProjects</strong><br><em>List<</em><a href="https://docs.opencga.opencb.org/data-models/project"><em>Project</em></a><em>></em><br></p>     | A List with shared projects.                                                                                                |
| <p><strong>configs</strong><br><em>Map\<String,Map</em><br></p>                                                                                              | User configurations                                                                                                         |
| <p><strong>filters</strong><br><em>List<</em><a href="https://docs.opencga.opencb.org/data-models/user#userfilter"><em>UserFilter</em></a><em>></em><br></p> | A List with related filters.                                                                                                |
| <p><strong>attributes</strong><br><em>Map\<String,Object></em><br></p>                                                                                       | You can use this field to store any other information, keep in mind this is not indexed so you cannot search by attributes. |

### UserFilter

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/user/UserFilter.java).

| Field                                                      | Description                                                                                                                                                                                                                     |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>id</strong><br><em>String</em><br></p>          | Object ID is a mandatory parameter when creating a new one, this ID cannot be changed at the moment.                                                                                                                            |
| <p><strong>description</strong><br><em>String</em><br></p> | Users may provide a description for the entry.                                                                                                                                                                                  |
| <p><strong>resource</strong><br><em>Resource</em><br></p>  | User resource can have the values AUDIT, USER, PROJECT, STUDY, FILE, SAMPLE, JOB, INDIVIDUAL, COHORT, DISEASE\_PANEL, FAMILY, CLINICAL\_ANALYSIS, INTERPRETATION, VARIANT, ALIGNMENT, CLINICAL, EXPRESSION, RGA and FUNCTIONAL. |
| <p><strong>query</strong><br><em>Query</em><br></p>        | User filter query                                                                                                                                                                                                               |
| <p><strong>query</strong><br><em>QueryOptions</em><br></p> | User filter query options                                                                                                                                                                                                       |

### UserQuota

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/user/UserQuota.java).

### UserInternal

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/user/UserInternal.java).

### Account

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/user/Account.java).

| Field                                                                                                                                                           | Description                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| <p><strong>type</strong><br><em>AccountType</em><br></p>                                                                                                        | User account type can have the values GUEST, FULL and ADMINISTRATOR.                                            |
| <p><strong>creationDate</strong><br><em>String</em><br></p>                                                                                                     | Autogenerated date following the format YYYYMMDDhhmmss containing the date when the entry was first registered. |
| <p><strong>expirationDate</strong><br><em>String</em><br></p>                                                                                                   | Date the account expires.                                                                                       |
| <p><strong>authentication</strong><br><a href="https://docs.opencga.opencb.org/data-models/user#authenticationorigin"><em>AuthenticationOrigin</em></a><br></p> | How the account is authenticated                                                                                |

### AuthenticationOrigin

You can find the Java code [here](https://github.com/opencb/opencga/tree/TASK-1587/opencga-core/src/main/java/org/opencb/opencga/core/models/user/Account/AuthenticationOrigin.java).


---

# Agent Instructions: 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:

```
GET https://docs.opencga.opencb.org/develop-2/data-models/user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
