Endpoint for user accounts, authentication, and authorization
Version: 1.0.0
Summary: authenticates user
Description: authenticates user
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| body | body | login info | Yes | login |
Responses
| Code | Description | Schema |
|---|---|---|
| 200 | login success | user |
| 401 | account deactivated | |
| 404 | user not found | |
| 422 | invalid password | |
| 500 | internal server error |
Summary: user registration
Description: register a new user
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| body | body | new user info | Yes | register |
Responses
| Code | Description | Schema |
|---|---|---|
| 200 | register success | user-sanitized |
| 400 | bad request | |
| 500 | internal server error |
Summary: fellow registration
Description: register a new fellow
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| body | body | new fellow info | Yes | fellow-new |
Responses
| Code | Description | Schema |
|---|---|---|
| 201 | register success | fellow-sanitized |
| 401 | not authorized | |
| 400 | bad request | |
| 500 | internal server error |
Summary: Retrieve fellow by id
Description: Retrieve a fellow by their id
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| id | path | Yes | string |
Responses
| Code | Description | Schema |
|---|---|---|
| 200 | retrieve info of a fellow | fellow-sanitized |
| 401 | not authorized | |
| 404 | fellow not found | |
| 500 | internal server error |
Summary: Update an fellow account associated with id
Description: Update an fellow account associated with id
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| id | path | Yes | string | |
| body | body | new fellow attributes | Yes | fellow-name |
Responses
| Code | Description | Schema |
|---|---|---|
| 200 | return updated fellow profile | fellow-sanitized |
| 401 | not authorized | |
| 404 | fellow not found | |
| 400 | bad request | |
| 500 | internal server error |
Summary: Retrieve a list of fellows
Description: get a list of all fellows
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| filter | query | No | object | |
| limit | query | No | number | |
| skip | query | No | number | |
| search | query | No | string | |
| sort | query | No | object | |
| fields | query | No | singleOrArray |
Responses
| Code | Description | Schema |
|---|---|---|
| 200 | return a list of fellows | fellow-sanitized |
| 401 | not authorized | |
| 500 | internal server error |
Summary: Delete fellow account
Description: Delete fellow account
Parameters
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| id | path | Yes | string |
Responses
| Code | Description | Schema |
|---|---|---|
| 204 | empty body | |
| 401 | not authorized | |
| 400 | cannot delete fellow | |
| 404 | fellow not found | |
| 500 | internal server error |
| Name | Type | Description | Required |
|---|---|---|---|
| string | Yes | ||
| password | string | Yes | |
| register |
| Name | Type | Description | Required |
|---|---|---|---|
| payload | user-new | yes | |
| user |
| Name | Type | Description | Required |
|---|---|---|---|
| user | user-sanitized | No | |
| token | string(token) | No |
| Name | Type | Description | Required |
|---|---|---|---|
| first | string | Yes | |
| middle | string | No | |
| last | string | Yes | |
| user-new |
| Name | Type | Description | Required |
|---|---|---|---|
| name | user-name | Yes | |
| string | Yes | ||
| password | string | Yes | |
| position | string | Yes | |
| user-sanitized |
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | No | |
| string | No | ||
| name | user-name | No | |
| position | string | No | |
| createdAt | Date(ISO String) | No | |
| updatedAt | Date(ISO String) | No | |
| error-generic |
| Name | Type | Description | Required |
|---|---|---|---|
| code | integer | No | |
| message | string | No | |
| fields | string | No |
| Name | Type | Description | Required |
|---|---|---|---|
| first | string | Yes | |
| middle | string | No | |
| last | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| createdBy | string | No | |
| updatedBy | string | No | |
| createdAt | Date(ISO String) | No | |
| updatedAt | Date(ISO String) | No |
| Name | Type | Description | Required |
|---|---|---|---|
| name | fellow-name | Yes | |
| string | Yes | ||
| cohortName | string | Yes | |
| dLevel | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | No | |
| string | No | ||
| name | fellow-name | No | |
| dLevel | string | No | |
| cohortName | string | No | |
| docInfo | new-docinfo | No |