-
Notifications
You must be signed in to change notification settings - Fork 18
Data Model
Gunnar Schaefer edited this page Jul 25, 2015
·
25 revisions
This page contains a proposal for a streamlined and generalized SciTran data model as delivered by the RESTful API.
The API generally exposes two types of endpoints: lists and details. Fields marked with † are omitted from list requests, such as /projects, but included in detail requests, such as /projects/123.
| Field | Type | Description |
|---|---|---|
| _id | string | database ID |
| name | string | group name |
| roles | [Permission, …] | array of user roles |
| Field | Type | Description |
|---|---|---|
| _id | string | database ID |
| firstname | string | first name |
| lastname | string | last name |
| email address | ||
| avatar | URL | avatar image URL |
| wheel | boolean | user can become superuser |
| root | boolean | user is superuser |
| preferences† | object | application-specific sub-document of user prefernces |
| Field | Type | Description |
|---|---|---|
| uid | string | database ID of permission holder |
| access | ro|rw|admin | access level |
| site | string | permission holder's scitran instance |
| Field | Type | Description |
|---|---|---|
| _id | string | database ID |
| creation | timestamp | creation time in ISO format (automatically set) |
| modification | timestamp | modification time in ISO format (automatically update) |
| notes | [Note, …] | array of Note objects |
| files | [File, …] | array of File objects |
| analyses | [Analysis, …] | array of Analysis objects |
| permissions‡ | [Permission, …] | array of Permission objects |
| public | boolean | indicates whether or not container is public |
| label | string | application-specific label |
| tags | [string, …] | array of application-specific tags |
| metadata† | object | application-specific information |
‡ Only the permission of the requesting user is included for list requests and also for detail requests, if the current user does not have admin permissions.
| Field | Type | Description |
|---|---|---|
| group | string | database ID of project owner |
| Field | Type | Description |
|---|---|---|
| group | string | database ID of parent project owner |
| project | string | database ID of parent project |
| uid | string | data-derived unique ID |
| timestamp | string | data capture time in ISO format |
| timezone | string | data capture time zone |
| subject | Subject | subject information |
| Field | Type | Description |
|---|---|---|
| firstname | string | first name |
| lastname | string | last name |
| firstname_hash | string | hash of first name |
| lastname_hash | string | hash of last name |
| sex | male|female | sex |
| age | int | age at time of session in seconds |
| code | string | subject code |
| tags | [string, …] | array of application-specific tags |
| metadata† | object | application-specific sub-document |
| Field | Type | Description |
|---|---|---|
| session | string | database ID of parent session |
| collections† | [string, …] | array of collection IDs |
| uid | string | data-derived unique ID |
| modality | string | instrument type of primary data |
| datatype | string | type of primary data |
| timestamp | string | data capture time in ISO format |
| timezone | string | data capture time zone |
| Field | Type | Description |
|---|---|---|
| curator | string | user ID of collection creator |
| Field | Type | Description |
|---|---|---|
| user | string | user ID of note writer |
| creation | string | creation time in ISO format |
| text | string | note text |
| Field | Type | Description |
|---|---|---|
| mimetype | string | MIME type |
| filetype | string | internal file type |
| filename | string | name of file |
| filesize | int | size of file |
| hash | string | hash of file |
| modality | string | instrument type |
| datatypes | [string, …] | array of strings |
| processed | boolean | false if file has not been processed |
| tags | [string, …] | array of application-specific tags |
| metadata† | object | application-specific information |
| Field | Type | Description |
|---|---|---|
| TBD |