CVE-2024-29028 (Go, published 2024-04-19T15:15Z)
Description: value: memos is a privacy-first, lightweight note-taking service. In memos 0.13.2, an SSRF vulnerability exists at the /o/get/httpmeta that allows unauthenticated users to enumerate the internal network and receive limited html values in json form. This vulnerability is fixed in 0.16.1.
Severity: nan (CVSS v3 base score: )
Weakness: NVD-CWE-noinfo \u2014 Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Repository: https://github.com/usememos/memos
Files changed:
api/v1/docs.go
api/v1/http_getter.go
api/v1/swagger.yaml
docs/api/v1.md
Commit message: chore: remove unused httpmeta getter api


Vulnerable code:
        "/o/get/GetWebsiteMetadata": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "get"
                ],
                "summary": "Get website metadata",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Website URL",
                        "name": "url",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Extracted metadata",
                        "schema": {
                            "$ref": "#/definitions/getter.HTMLMeta"
                        }
                    },
                    "400": {
                        "description": "Missing website url | Wrong url"
                    },
                    "406": {
                        "description": "Failed to get website meta with url: %s"
                    }
                }
            }
        },
        "getter.HTMLMeta": {
            "type": "object",
            "properties": {
                "description": {
                    "type": "string"
                },
                "image": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
                    "description": "Composed fields",
                "ADDITIONAL"
                "MemoRelationAdditional"
                "internalPath": {
                    "type": "string"
                },
	// GET /get/httpmeta?url={url} - Get website meta.
	g.GET("/get/httpmeta", GetWebsiteMetadata)

// GetWebsiteMetadata godoc
//
//	@Summary	Get website metadata
//	@Tags		get
//	@Produce	json
//	@Param		url	query		string			true	"Website URL"
//	@Success	200	{object}	getter.HTMLMeta	"Extracted metadata"
//	@Failure	400	{object}	nil				"Missing website url | Wrong url"
//	@Failure	406	{object}	nil				"Failed to get website meta with url: %s"
//	@Router		/o/get/GetWebsiteMetadata [GET]
func GetWebsiteMetadata(c echo.Context) error {
	urlStr := c.QueryParam("url")
	if urlStr == "" {
		return echo.NewHTTPError(http.StatusBadRequest, "Missing website url")
	}
	if _, err := url.Parse(urlStr); err != nil {
		return echo.NewHTTPError(http.StatusBadRequest, "Wrong url").SetInternal(err)
	}

	htmlMeta, err := getter.GetHTMLMeta(urlStr)
	if err != nil {
		return echo.NewHTTPError(http.StatusNotAcceptable, fmt.Sprintf("Failed to get website meta with url: %s", urlStr)).SetInternal(err)
	}
	return c.JSON(http.StatusOK, htmlMeta)
}

  getter.HTMLMeta:
    properties:
      description:
        type: string
      image:
        type: string
      title:
        type: string
    type: object
        description: Composed fields
    - ADDITIONAL
    - MemoRelationAdditional
      internalPath:
        type: string
  /o/get/GetWebsiteMetadata:
    get:
      parameters:
      - description: Website URL
        in: query
        name: url
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Extracted metadata
          schema:
            $ref: '#/definitions/getter.HTMLMeta'
        "400":
          description: Missing website url | Wrong url
        "406":
          description: 'Failed to get website meta with url: %s'
      summary: Get website metadata
      tags:
      - get
<https://github.com/orgs/usememos/discussions>  
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Sign-in object | Yes | [v1.SignIn](#v1signin) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | User information | [store.User](#storeuser) |
| 400 | Malformatted signin request |  |
| 401 | Password login is deactivated \| Incorrect login credentials, please try again |  |
| 403 | User has been archived with username %s |  |
| 500 | Failed to find system setting \| Failed to unmarshal system setting \| Incorrect login credentials, please try again \| Failed to generate tokens \| Failed to create activity |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | SSO sign-in object | Yes | [v1.SSOSignIn](#v1ssosignin) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | User information | [store.User](#storeuser) |
| 400 | Malformatted signin request |  |
| 401 | Access denied, identifier does not match the filter. |  |
| 403 | User has been archived with username {username} |  |
| 404 | Identity provider not found |  |
| 500 | Failed to find identity provider \| Failed to create identity provider instance \| Failed to exchange token \| Failed to get user info \| Failed to compile identifier filter \| Incorrect login credentials, please try again \| Failed to generate random password \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Sign-out success | boolean |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Sign-up object | Yes | [v1.SignUp](#v1signup) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | User information | [store.User](#storeuser) |
| 400 | Malformatted signup request \| Failed to find users |  |
| 401 | signup is disabled |  |
| 403 | Forbidden |  |
| 404 | Not found |  |
| 500 | Failed to find system setting \| Failed to unmarshal system setting allow signup \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity |  |
*clientSecret is only available for host user
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | List of available identity providers | [ [v1.IdentityProvider](#v1identityprovider) ] |
| 500 | Failed to find identity provider list \| Failed to find user |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Identity provider information | Yes | [v1.CreateIdentityProviderRequest](#v1createidentityproviderrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Identity provider information | [store.IdentityProvider](#storeidentityprovider) |
| 400 | Malformatted post identity provider request |  |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to create identity provider |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| idpId | path | Identity Provider ID | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Identity Provider deleted | boolean |
| 400 | ID is not a number: %s \| Malformatted patch identity provider request |  |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to patch identity provider |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| idpId | path | Identity provider ID | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Requested identity provider | [store.IdentityProvider](#storeidentityprovider) |
| 400 | ID is not a number: %s |  |
| 401 | Missing user in session \| Unauthorized |  |
| 404 | Identity provider not found |  |
| 500 | Failed to find identity provider list \| Failed to find user |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| idpId | path | Identity Provider ID | Yes | integer |
| body | body | Patched identity provider information | Yes | [v1.UpdateIdentityProviderRequest](#v1updateidentityproviderrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Patched identity provider | [store.IdentityProvider](#storeidentityprovider) |
| 400 | ID is not a number: %s \| Malformatted patch identity provider request |  |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to patch identity provider |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| creatorId | query | Creator ID | No | integer |
| creatorUsername | query | Creator username | No | string |
| rowStatus | query | Row status | No | string |
| pinned | query | Pinned | No | boolean |
| tag | query | Search for tag. Do not append # | No | string |
| content | query | Search for content | No | string |
| limit | query | Limit | No | integer |
| offset | query | Offset | No | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo list | [ [store.Memo](#storememo) ] |
| 400 | Missing user to find memo |  |
| 500 | Failed to get memo display with updated ts setting value \| Failed to fetch memo list \| Failed to compose memo response |  |
*You should omit fields to use their default values
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.CreateMemoRequest](#v1creatememorequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Stored memo | [store.Memo](#storememo) |
| 400 | Malformatted post memo request \| Content size overflow, up to 1MB |  |
| 401 | Missing user in session |  |
| 404 | User not found \| Memo not found: %d |  |
| 500 | Failed to find user setting \| Failed to unmarshal user setting value \| Failed to find system setting \| Failed to unmarshal system setting \| Failed to find user \| Failed to create memo \| Failed to create activity \| Failed to upsert memo resource \| Failed to upsert memo relation \| Failed to compose memo \| Failed to compose memo response |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | Memo ID to delete | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo deleted | boolean |
| 400 | ID is not a number: %s |  |
| 401 | Missing user in session \| Unauthorized |  |
| 404 | Memo not found: %d |  |
| 500 | Failed to find memo \| Failed to delete memo ID: %v |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | Memo ID | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo list | [ [store.Memo](#storememo) ] |
| 400 | ID is not a number: %s |  |
| 401 | Missing user in session |  |
| 403 | this memo is private only \| this memo is protected, missing user in session |  |
| 404 | Memo not found: %d |  |
| 500 | Failed to find memo by ID: %v \| Failed to compose memo response |  |
*You should omit fields to use their default values
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to update | Yes | integer |
| body | body | Patched object. | Yes | [v1.PatchMemoRequest](#v1patchmemorequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Stored memo | [store.Memo](#storememo) |
| 400 | ID is not a number: %s \| Malformatted patch memo request \| Content size overflow, up to 1MB |  |
| 401 | Missing user in session \| Unauthorized |  |
| 404 | Memo not found: %d |  |
| 500 | Failed to find memo \| Failed to patch memo \| Failed to upsert memo resource \| Failed to delete memo resource \| Failed to compose memo response |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| limit | query | Limit | No | integer |
| offset | query | Offset | No | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo list | [ [store.Memo](#storememo) ] |
| 500 | Failed to get memo display with updated ts setting value \| Failed to fetch all memo list \| Failed to compose memo response |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| creatorId | query | Creator ID | No | integer |
| creatorUsername | query | Creator username | No | string |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo createdTs list | [ integer ] |
| 400 | Missing user id to find memo |  |
| 500 | Failed to get memo display with updated ts setting value \| Failed to find memo list \| Failed to compose memo response |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to organize | Yes | integer |
| body | body | Memo organizer object | Yes | [v1.UpsertMemoOrganizerRequest](#v1upsertmemoorganizerrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo information | [store.Memo](#storememo) |
| 400 | ID is not a number: %s \| Malformatted post memo organizer request |  |
| 401 | Missing user in session \| Unauthorized |  |
| 404 | Memo not found: %v |  |
| 500 | Failed to find memo \| Failed to upsert memo organizer \| Failed to find memo by ID: %v \| Failed to compose memo response |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to find relations | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo relation information list | [ [store.MemoRelation](#storememorelation) ] |
| 400 | ID is not a number: %s |  |
| 500 | Failed to list memo relations |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to relate | Yes | integer |
| body | body | Memo relation object | Yes | [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo relation information | [store.MemoRelation](#storememorelation) |
| 400 | ID is not a number: %s \| Malformatted post memo relation request |  |
| 500 | Failed to upsert memo relation |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to find relations | Yes | integer |
| relatedMemoId | path | ID of memo to remove relation to | Yes | integer |
| relationType | path | Type of relation to remove | Yes | string |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Memo relation deleted | boolean |
| 400 | Memo ID is not a number: %s \| Related memo ID is not a number: %s |  |
| 500 | Failed to delete memo relation |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | If succeed to ping the system | boolean |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | System GetSystemStatus | [v1.SystemStatus](#v1systemstatus) |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find host user \| Failed to find system setting list \| Failed to unmarshal system setting customized profile value |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Database vacuumed | boolean |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to ExecVacuum database |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| limit | query | Limit | No | integer |
| offset | query | Offset | No | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Resource list | [ [store.Resource](#storeresource) ] |
| 401 | Missing user in session |  |
| 500 | Failed to fetch resource list |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.CreateResourceRequest](#v1createresourcerequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created resource | [store.Resource](#storeresource) |
| 400 | Malformatted post resource request \| Invalid external link \| Invalid external link scheme \| Failed to request %s \| Failed to read %s \| Failed to read mime from %s |  |
| 401 | Missing user in session |  |
| 500 | Failed to save resource \| Failed to create resource \| Failed to create activity |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resourceId | path | Resource ID | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Resource deleted | boolean |
| 400 | ID is not a number: %s |  |
| 401 | Missing user in session |  |
| 404 | Resource not found: %d |  |
| 500 | Failed to find resource \| Failed to delete resource |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resourceId | path | Resource ID | Yes | integer |
| patch | body | Patch resource request | Yes | [v1.UpdateResourceRequest](#v1updateresourcerequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Updated resource | [store.Resource](#storeresource) |
| 400 | ID is not a number: %s \| Malformatted patch resource request |  |
| 401 | Missing user in session \| Unauthorized |  |
| 404 | Resource not found: %d |  |
| 500 | Failed to find resource \| Failed to patch resource |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| file | formData | File to upload | Yes | file |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created resource | [store.Resource](#storeresource) |
| 400 | Upload file not found \| File size exceeds allowed limit of %d MiB \| Failed to parse upload data |  |
| 401 | Missing user in session |  |
| 500 | Failed to get uploading file \| Failed to open file \| Failed to save resource \| Failed to create resource \| Failed to create activity |  |
*Swagger UI may have problems displaying other file types than images
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resourceId | path | Resource ID | Yes | integer |
| thumbnail | query | Thumbnail | No | integer |
| Code | Description |
| ---- | ----------- |
| 200 | Requested resource |
| 400 | ID is not a number: %s \| Failed to get resource visibility |
| 401 | Resource visibility not match |
| 404 | Resource not found: %d |
| 500 | Failed to find resource by ID: %v \| Failed to open the local resource: %s \| Failed to read the local resource: %s |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | List of storages | [ [store.Storage](#storestorage) ] |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to convert storage |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.CreateStorageRequest](#v1createstoragerequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created storage | [store.Storage](#storestorage) |
| 400 | Malformatted post storage request |  |
| 401 | Missing user in session |  |
| 500 | Failed to find user \| Failed to create storage \| Failed to convert storage |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| storageId | path | Storage ID | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Storage deleted | boolean |
| 400 | ID is not a number: %s \| Storage service %d is using |  |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to find storage \| Failed to unmarshal storage service id \| Failed to delete storage |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| storageId | path | Storage ID | Yes | integer |
| patch | body | Patch request | Yes | [v1.UpdateStorageRequest](#v1updatestoragerequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Updated resource | [store.Storage](#storestorage) |
| 400 | ID is not a number: %s \| Malformatted patch storage request \| Malformatted post storage request |  |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to patch storage \| Failed to convert storage |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | System setting list | [ [v1.SystemSetting](#v1systemsetting) ] |
| 401 | Missing user in session \| Unauthorized |  |
| 500 | Failed to find user \| Failed to find system setting list |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.UpsertSystemSettingRequest](#v1upsertsystemsettingrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created system setting | [store.SystemSetting](#storesystemsetting) |
| 400 | Malformatted post system setting request \| invalid system setting |  |
| 401 | Missing user in session \| Unauthorized |  |
| 403 | Cannot disable passwords if no SSO identity provider is configured. |  |
| 500 | Failed to find user \| Failed to upsert system setting |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Tag list | [ string ] |
| 400 | Missing user id to find tag |  |
| 500 | Failed to find tag list |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.UpsertTagRequest](#v1upserttagrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created tag name | string |
| 400 | Malformatted post tag request \| Tag name shouldn't be empty |  |
| 401 | Missing user in session |  |
| 500 | Failed to upsert tag \| Failed to create activity |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.DeleteTagRequest](#v1deletetagrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Tag deleted | boolean |
| 400 | Malformatted post tag request \| Tag name shouldn't be empty |  |
| 401 | Missing user in session |  |
| 500 | Failed to delete tag name: %v |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Tag list | [ string ] |
| 400 | Missing user session |  |
| 500 | Failed to find memo list \| Failed to find tag list |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | User list | [ [store.User](#storeuser) ] |
| 500 | Failed to fetch user list |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object | Yes | [v1.CreateUserRequest](#v1createuserrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created user | [store.User](#storeuser) |
| 400 | Malformatted post user request \| Invalid user create format |  |
| 401 | Missing auth session \| Unauthorized to create user |  |
| 403 | Could not create host user |  |
| 500 | Failed to find user by id \| Failed to generate password hash \| Failed to create user \| Failed to create activity |  |
| id | path | User ID | Yes | string |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | User deleted | boolean |
| 400 | ID is not a number: %s \| Current session user not found with ID: %d |  |
| 401 | Missing user in session |  |
| 403 | Unauthorized to delete user |  |
| 500 | Failed to find user \| Failed to delete user |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | User ID | Yes | integer |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Requested user | [store.User](#storeuser) |
| 400 | Malformatted user id |  |
| 404 | User not found |  |
| 500 | Failed to find user |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | User ID | Yes | string |
| patch | body | Patch request | Yes | [v1.UpdateUserRequest](#v1updateuserrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Updated user | [store.User](#storeuser) |
| 400 | ID is not a number: %s \| Current session user not found with ID: %d \| Malformatted patch user request \| Invalid update user request |  |
| 401 | Missing user in session |  |
| 403 | Unauthorized to update user |  |
| 500 | Failed to find user \| Failed to generate password hash \| Failed to patch user \| Failed to find userSettingList |  |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Current user | [store.User](#storeuser) |
| 401 | Missing auth session |  |
| 500 | Failed to find user \| Failed to find userSettingList |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| username | path | Username | Yes | string |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Requested user | [store.User](#storeuser) |
| 404 | User not found |  |
| 500 | Failed to find user |  |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes | [v1.UpsertUserSettingRequest](#v1upsertusersettingrequest) |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created user setting | [github_com_usememos_memos_store.UserSetting](#github_com_usememos_memos_storeusersetting) |
| 400 | Malformatted post user setting upsert request \| Invalid user setting format |  |
| 401 | Missing auth session |  |
| 500 | Failed to upsert user setting |  |
| Code | Description |
| ---- | ----------- |
| 200 | RSS |
| 500 | Failed to get system customized profile \| Failed to find memo list \| Failed to generate rss |
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | User ID | Yes | integer |
| Code | Description |
| ---- | ----------- |
| 200 | RSS |
| 400 | User id is not a number |
| 500 | Failed to get system customized profile \| Failed to find memo list \| Failed to generate rss |
##### Summary

Get GetImage from URL

##### Parameters

| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| url | query | Image url | Yes | string |
##### Responses

| Code | Description |
| ---- | ----------- |
| 200 | Image |
| 400 | Missing GetImage url \| Wrong url \| Failed to get GetImage url: %s |
| 500 | Failed to write GetImage blob |

### /o/get/GetWebsiteMetadata

#### GET
Get website metadata
| url | query | Website URL | Yes | string |
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Extracted metadata | [getter.HTMLMeta](#getterhtmlmeta) |
| 400 | Missing website url \| Wrong url |  |
| 406 | Failed to get website meta with url: %s |  |
### Models
#### getter.HTMLMeta

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string |  | No |
| image | string |  | No |
| title | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| key | string |  | No |
| userID | integer |  | No |
| value | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| mode | string | Mode can be "prod" or "dev" or "demo" | No |
| version | string | Version is the current version of server | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| displayName | string |  | No |
| email | string |  | No |
| identifier | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [store.IdentityProviderConfig](#storeidentityproviderconfig) |  | No |
| id | integer |  | No |
| identifierFilter | string |  | No |
| name | string |  | No |
| type | [store.IdentityProviderType](#storeidentityprovidertype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| oauth2Config | [store.IdentityProviderOAuth2Config](#storeidentityprovideroauth2config) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| authUrl | string |  | No |
| clientId | string |  | No |
| clientSecret | string |  | No |
| fieldMapping | [store.FieldMapping](#storefieldmapping) |  | No |
| scopes | [ string ] |  | No |
| tokenUrl | string |  | No |
| userInfoUrl | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| store.IdentityProviderType | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| content | string | Domain specific fields | No |
| createdTs | integer |  | No |
| creatorID | integer |  | No |
| id | integer |  | No |
| pinned | boolean | Composed fields | No |
| relationList | [ [store.MemoRelation](#storememorelation) ] |  | No |
| resourceIDList | [ integer ] |  | No |
| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No |
| updatedTs | integer |  | No |
| visibility | [store.Visibility](#storevisibility) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| memoID | integer |  | No |
| relatedMemoID | integer |  | No |
| type | [store.MemoRelationType](#storememorelationtype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| store.MemoRelationType | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| blob | [ integer ] |  | No |
| createdTs | integer |  | No |
| creatorID | integer | Standard fields | No |
| externalLink | string |  | No |
| filename | string | Domain specific fields | No |
| id | integer |  | No |
| internalPath | string |  | No |
| memoID | integer |  | No |
| size | integer |  | No |
| type | string |  | No |
| updatedTs | integer |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| store.Role | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| store.RowStatus | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | string |  | No |
| id | integer |  | No |
| name | string |  | No |
| type | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string |  | No |
| name | string |  | No |
| value | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| avatarURL | string |  | No |
| createdTs | integer |  | No |
| email | string |  | No |
| id | integer |  | No |
| nickname | string |  | No |
| passwordHash | string |  | No |
| role | [store.Role](#storerole) |  | No |
| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No |
| updatedTs | integer |  | No |
| username | string | Domain specific fields | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| store.Visibility | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [v1.IdentityProviderConfig](#v1identityproviderconfig) |  | No |
| identifierFilter | string |  | No |
| name | string |  | No |
| type | [v1.IdentityProviderType](#v1identityprovidertype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| content | string |  | No |
| createdTs | integer |  | No |
| relationList | [ [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) ] |  | No |
| resourceIdList | [ integer ] | Related fields | No |
| visibility | [v1.Visibility](#v1visibility) | Domain specific fields | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| externalLink | string |  | No |
| filename | string |  | No |
| internalPath | string |  | No |
| type | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [v1.StorageConfig](#v1storageconfig) |  | No |
| name | string |  | No |
| type | [v1.StorageType](#v1storagetype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| email | string |  | No |
| nickname | string |  | No |
| password | string |  | No |
| role | [v1.Role](#v1role) |  | No |
| username | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| appearance | string | Appearance is the server default appearance. | No |
| description | string | Description is the server description. | No |
| externalUrl | string | ExternalURL is the external url of server. e.g. <https://usermemos.com> | No |
| locale | string | Locale is the server default locale. | No |
| logoUrl | string | LogoURL is the url of logo image. | No |
| name | string | Name is the server name, default is `memos` | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| name | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| displayName | string |  | No |
| email | string |  | No |
| identifier | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [v1.IdentityProviderConfig](#v1identityproviderconfig) |  | No |
| id | integer |  | No |
| identifierFilter | string |  | No |
| name | string |  | No |
| type | [v1.IdentityProviderType](#v1identityprovidertype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| oauth2Config | [v1.IdentityProviderOAuth2Config](#v1identityprovideroauth2config) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| authUrl | string |  | No |
| clientId | string |  | No |
| clientSecret | string |  | No |
| fieldMapping | [v1.FieldMapping](#v1fieldmapping) |  | No |
| scopes | [ string ] |  | No |
| tokenUrl | string |  | No |
| userInfoUrl | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.IdentityProviderType | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.MemoRelationType | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| content | string | Domain specific fields | No |
| createdTs | integer | Standard fields | No |
| relationList | [ [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) ] |  | No |
| resourceIdList | [ integer ] | Related fields | No |
| rowStatus | [v1.RowStatus](#v1rowstatus) |  | No |
| updatedTs | integer |  | No |
| visibility | [v1.Visibility](#v1visibility) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.Role | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.RowStatus | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| code | string |  | No |
| identityProviderId | integer |  | No |
| redirectUri | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| password | string |  | No |
| username | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| password | string |  | No |
| username | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| s3Config | [v1.StorageS3Config](#v1storages3config) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| accessKey | string |  | No |
| bucket | string |  | No |
| endPoint | string |  | No |
| path | string |  | No |
| region | string |  | No |
| secretKey | string |  | No |
| urlPrefix | string |  | No |
| urlSuffix | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.StorageType | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string |  | No |
| name | [v1.SystemSettingName](#v1systemsettingname) |  | No |
| value | string | Value is a JSON string with basic value. | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.SystemSettingName | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| additionalScript | string | Additional script. | No |
| additionalStyle | string | Additional style. | No |
| allowSignUp | boolean | System settings Allow sign up. | No |
| autoBackupInterval | integer | Auto Backup Interval. | No |
| customizedProfile | [v1.CustomizedProfile](#v1customizedprofile) | Customized server profile, including server name and external url. | No |
| dbSize | integer |  | No |
| disablePasswordLogin | boolean | Disable password login. | No |
| disablePublicMemos | boolean | Disable public memos. | No |
| host | [v1.User](#v1user) |  | No |
| localStoragePath | string | Local storage path. | No |
| maxUploadSizeMiB | integer | Max upload size. | No |
| memoDisplayWithUpdatedTs | boolean | Memo display with updated timestamp. | No |
| profile | [profile.Profile](#profileprofile) |  | No |
| storageServiceId | integer | Storage service ID. | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [v1.IdentityProviderConfig](#v1identityproviderconfig) |  | No |
| identifierFilter | string |  | No |
| name | string |  | No |
| type | [v1.IdentityProviderType](#v1identityprovidertype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| filename | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [v1.StorageConfig](#v1storageconfig) |  | No |
| name | string |  | No |
| type | [v1.StorageType](#v1storagetype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| avatarUrl | string |  | No |
| email | string |  | No |
| nickname | string |  | No |
| password | string |  | No |
| rowStatus | [v1.RowStatus](#v1rowstatus) |  | No |
| username | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| pinned | boolean |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| relatedMemoId | integer |  | No |
| type | [v1.MemoRelationType](#v1memorelationtype) |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string |  | No |
| name | [v1.SystemSettingName](#v1systemsettingname) |  | No |
| value | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| name | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| key | [v1.UserSettingKey](#v1usersettingkey) |  | No |
| value | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| avatarUrl | string |  | No |
| createdTs | integer |  | No |
| email | string |  | No |
| id | integer |  | No |
| nickname | string |  | No |
| role | [v1.Role](#v1role) |  | No |
| rowStatus | [v1.RowStatus](#v1rowstatus) | Standard fields | No |
| updatedTs | integer |  | No |
| userSettingList | [ [v1.UserSetting](#v1usersetting) ] |  | No |
| username | string | Domain specific fields | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| key | [v1.UserSettingKey](#v1usersettingkey) |  | No |
| userId | integer |  | No |
| value | string |  | No |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.UserSettingKey | string |  |  |
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| v1.Visibility | string |  |  |

Fixed code:
                "driver": {
                    "description": "Driver is the database driver\nsqlite, mysql",
                    "type": "string"
                },
                "dsn": {
                    "description": "DSN points to where Memos stores its own data",
                    "type": "string"
                },
                "parentID": {
                    "description": "Composed fields\nFor those comment memos, the parent ID is the memo ID of the memo being commented.\nIf the parent ID is nil, then this memo is not a comment.",
                    "type": "integer"
                },
                "COMMENT"
                "MemoRelationComment"
      driver:
        description: |-
          Driver is the database driver
          sqlite, mysql
        type: string
      dsn:
        description: DSN points to where Memos stores its own data
        type: string
      parentID:
        description: |-
          Composed fields
          For those comment memos, the parent ID is the memo ID of the memo being commented.
          If the parent ID is nil, then this memo is not a comment.
        type: integer
    - COMMENT
    - MemoRelationComment

<https://github.com/orgs/usememos/discussions>


| Name | Located in | Description    | Required | Schema                 |
| ---- | ---------- | -------------- | -------- | ---------------------- |
| body | body       | Sign-in object | Yes      | [v1.SignIn](#v1signin) |
| Code | Description                                                                                                                                                                    | Schema                   |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ |
| 200  | User information                                                                                                                                                               | [store.User](#storeuser) |
| 400  | Malformatted signin request                                                                                                                                                    |                          |
| 401  | Password login is deactivated \| Incorrect login credentials, please try again                                                                                                 |                          |
| 403  | User has been archived with username %s                                                                                                                                        |                          |
| 500  | Failed to find system setting \| Failed to unmarshal system setting \| Incorrect login credentials, please try again \| Failed to generate tokens \| Failed to create activity |                          |

| Name | Located in | Description        | Required | Schema                       |
| ---- | ---------- | ------------------ | -------- | ---------------------------- |
| body | body       | SSO sign-in object | Yes      | [v1.SSOSignIn](#v1ssosignin) |
| Code | Description                                                                                                                                                                                                                                                                                                                                                                                 | Schema                   |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | User information                                                                                                                                                                                                                                                                                                                                                                            | [store.User](#storeuser) |
| 400  | Malformatted signin request                                                                                                                                                                                                                                                                                                                                                                 |                          |
| 401  | Access denied, identifier does not match the filter.                                                                                                                                                                                                                                                                                                                                        |                          |
| 403  | User has been archived with username {username}                                                                                                                                                                                                                                                                                                                                             |                          |
| 404  | Identity provider not found                                                                                                                                                                                                                                                                                                                                                                 |                          |
| 500  | Failed to find identity provider \| Failed to create identity provider instance \| Failed to exchange token \| Failed to get user info \| Failed to compile identifier filter \| Incorrect login credentials, please try again \| Failed to generate random password \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity |                          |

| Code | Description      | Schema  |
| ---- | ---------------- | ------- |
| 200  | Sign-out success | boolean |

| Name | Located in | Description    | Required | Schema                 |
| ---- | ---------- | -------------- | -------- | ---------------------- |
| body | body       | Sign-up object | Yes      | [v1.SignUp](#v1signup) |
| Code | Description                                                                                                                                                                                             | Schema                   |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | User information                                                                                                                                                                                        | [store.User](#storeuser) |
| 400  | Malformatted signup request \| Failed to find users                                                                                                                                                     |                          |
| 401  | signup is disabled                                                                                                                                                                                      |                          |
| 403  | Forbidden                                                                                                                                                                                               |                          |
| 404  | Not found                                                                                                                                                                                               |                          |
| 500  | Failed to find system setting \| Failed to unmarshal system setting allow signup \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity |                          |


\*clientSecret is only available for host user
| Code | Description                                                  | Schema                                         |
| ---- | ------------------------------------------------------------ | ---------------------------------------------- |
| 200  | List of available identity providers                         | [ [v1.IdentityProvider](#v1identityprovider) ] |
| 500  | Failed to find identity provider list \| Failed to find user |                                                |

| Name | Located in | Description                   | Required | Schema                                                               |
| ---- | ---------- | ----------------------------- | -------- | -------------------------------------------------------------------- |
| body | body       | Identity provider information | Yes      | [v1.CreateIdentityProviderRequest](#v1createidentityproviderrequest) |
| Code | Description                                               | Schema                                           |
| ---- | --------------------------------------------------------- | ------------------------------------------------ |
| 200  | Identity provider information                             | [store.IdentityProvider](#storeidentityprovider) |
| 400  | Malformatted post identity provider request               |                                                  |
| 401  | Missing user in session \| Unauthorized                   |                                                  |
| 500  | Failed to find user \| Failed to create identity provider |                                                  |

| Name  | Located in | Description          | Required | Schema  |
| ----- | ---------- | -------------------- | -------- | ------- |
| idpId | path       | Identity Provider ID | Yes      | integer |
| Code | Description                                                            | Schema  |
| ---- | ---------------------------------------------------------------------- | ------- |
| 200  | Identity Provider deleted                                              | boolean |
| 400  | ID is not a number: %s \| Malformatted patch identity provider request |         |
| 401  | Missing user in session \| Unauthorized                                |         |
| 500  | Failed to find user \| Failed to patch identity provider               |         |

| Name  | Located in | Description          | Required | Schema  |
| ----- | ---------- | -------------------- | -------- | ------- |
| idpId | path       | Identity provider ID | Yes      | integer |
| Code | Description                                                  | Schema                                           |
| ---- | ------------------------------------------------------------ | ------------------------------------------------ |
| 200  | Requested identity provider                                  | [store.IdentityProvider](#storeidentityprovider) |
| 400  | ID is not a number: %s                                       |                                                  |
| 401  | Missing user in session \| Unauthorized                      |                                                  |
| 404  | Identity provider not found                                  |                                                  |
| 500  | Failed to find identity provider list \| Failed to find user |                                                  |

| Name  | Located in | Description                           | Required | Schema                                                               |
| ----- | ---------- | ------------------------------------- | -------- | -------------------------------------------------------------------- |
| idpId | path       | Identity Provider ID                  | Yes      | integer                                                              |
| body  | body       | Patched identity provider information | Yes      | [v1.UpdateIdentityProviderRequest](#v1updateidentityproviderrequest) |
| Code | Description                                                            | Schema                                           |
| ---- | ---------------------------------------------------------------------- | ------------------------------------------------ |
| 200  | Patched identity provider                                              | [store.IdentityProvider](#storeidentityprovider) |
| 400  | ID is not a number: %s \| Malformatted patch identity provider request |                                                  |
| 401  | Missing user in session \| Unauthorized                                |                                                  |
| 500  | Failed to find user \| Failed to patch identity provider               |                                                  |


| Name            | Located in | Description                     | Required | Schema  |
| --------------- | ---------- | ------------------------------- | -------- | ------- |
| creatorId       | query      | Creator ID                      | No       | integer |
| creatorUsername | query      | Creator username                | No       | string  |
| rowStatus       | query      | Row status                      | No       | string  |
| pinned          | query      | Pinned                          | No       | boolean |
| tag             | query      | Search for tag. Do not append # | No       | string  |
| content         | query      | Search for content              | No       | string  |
| limit           | query      | Limit                           | No       | integer |
| offset          | query      | Offset                          | No       | integer |
| Code | Description                                                                                                              | Schema                       |
| ---- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
| 200  | Memo list                                                                                                                | [ [store.Memo](#storememo) ] |
| 400  | Missing user to find memo                                                                                                |                              |
| 500  | Failed to get memo display with updated ts setting value \| Failed to fetch memo list \| Failed to compose memo response |                              |

\*You should omit fields to use their default values
| Name | Located in | Description     | Required | Schema                                       |
| ---- | ---------- | --------------- | -------- | -------------------------------------------- |
| body | body       | Request object. | Yes      | [v1.CreateMemoRequest](#v1creatememorequest) |
| Code | Description                                                                                                                                                                                                                                                                                                                                                | Schema                   |
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | Stored memo                                                                                                                                                                                                                                                                                                                                                | [store.Memo](#storememo) |
| 400  | Malformatted post memo request \| Content size overflow, up to 1MB                                                                                                                                                                                                                                                                                         |                          |
| 401  | Missing user in session                                                                                                                                                                                                                                                                                                                                    |                          |
| 404  | User not found \| Memo not found: %d                                                                                                                                                                                                                                                                                                                       |                          |
| 500  | Failed to find user setting \| Failed to unmarshal user setting value \| Failed to find system setting \| Failed to unmarshal system setting \| Failed to find user \| Failed to create memo \| Failed to create activity \| Failed to upsert memo resource \| Failed to upsert memo relation \| Failed to compose memo \| Failed to compose memo response |                          |

| Name   | Located in | Description       | Required | Schema  |
| ------ | ---------- | ----------------- | -------- | ------- |
| memoId | path       | Memo ID to delete | Yes      | integer |
| Code | Description                                         | Schema  |
| ---- | --------------------------------------------------- | ------- |
| 200  | Memo deleted                                        | boolean |
| 400  | ID is not a number: %s                              |         |
| 401  | Missing user in session \| Unauthorized             |         |
| 404  | Memo not found: %d                                  |         |
| 500  | Failed to find memo \| Failed to delete memo ID: %v |         |

| Name   | Located in | Description | Required | Schema  |
| ------ | ---------- | ----------- | -------- | ------- |
| memoId | path       | Memo ID     | Yes      | integer |
| Code | Description                                                                  | Schema                       |
| ---- | ---------------------------------------------------------------------------- | ---------------------------- |
| 200  | Memo list                                                                    | [ [store.Memo](#storememo) ] |
| 400  | ID is not a number: %s                                                       |                              |
| 401  | Missing user in session                                                      |                              |
| 403  | this memo is private only \| this memo is protected, missing user in session |                              |
| 404  | Memo not found: %d                                                           |                              |
| 500  | Failed to find memo by ID: %v \| Failed to compose memo response             |                              |

\*You should omit fields to use their default values
| Name   | Located in | Description          | Required | Schema                                     |
| ------ | ---------- | -------------------- | -------- | ------------------------------------------ |
| memoId | path       | ID of memo to update | Yes      | integer                                    |
| body   | body       | Patched object.      | Yes      | [v1.PatchMemoRequest](#v1patchmemorequest) |
| Code | Description                                                                                                                                        | Schema                   |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | Stored memo                                                                                                                                        | [store.Memo](#storememo) |
| 400  | ID is not a number: %s \| Malformatted patch memo request \| Content size overflow, up to 1MB                                                      |                          |
| 401  | Missing user in session \| Unauthorized                                                                                                            |                          |
| 404  | Memo not found: %d                                                                                                                                 |                          |
| 500  | Failed to find memo \| Failed to patch memo \| Failed to upsert memo resource \| Failed to delete memo resource \| Failed to compose memo response |                          |

| Name   | Located in | Description | Required | Schema  |
| ------ | ---------- | ----------- | -------- | ------- |
| limit  | query      | Limit       | No       | integer |
| offset | query      | Offset      | No       | integer |
| Code | Description                                                                                                                  | Schema                       |
| ---- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| 200  | Memo list                                                                                                                    | [ [store.Memo](#storememo) ] |
| 500  | Failed to get memo display with updated ts setting value \| Failed to fetch all memo list \| Failed to compose memo response |                              |

| Name            | Located in | Description      | Required | Schema  |
| --------------- | ---------- | ---------------- | -------- | ------- |
| creatorId       | query      | Creator ID       | No       | integer |
| creatorUsername | query      | Creator username | No       | string  |
| Code | Description                                                                                                             | Schema      |
| ---- | ----------------------------------------------------------------------------------------------------------------------- | ----------- |
| 200  | Memo createdTs list                                                                                                     | [ integer ] |
| 400  | Missing user id to find memo                                                                                            |             |
| 500  | Failed to get memo display with updated ts setting value \| Failed to find memo list \| Failed to compose memo response |             |


| Name   | Located in | Description            | Required | Schema                                                         |
| ------ | ---------- | ---------------------- | -------- | -------------------------------------------------------------- |
| memoId | path       | ID of memo to organize | Yes      | integer                                                        |
| body   | body       | Memo organizer object  | Yes      | [v1.UpsertMemoOrganizerRequest](#v1upsertmemoorganizerrequest) |
| Code | Description                                                                                                                | Schema                   |
| ---- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | Memo information                                                                                                           | [store.Memo](#storememo) |
| 400  | ID is not a number: %s \| Malformatted post memo organizer request                                                         |                          |
| 401  | Missing user in session \| Unauthorized                                                                                    |                          |
| 404  | Memo not found: %v                                                                                                         |                          |
| 500  | Failed to find memo \| Failed to upsert memo organizer \| Failed to find memo by ID: %v \| Failed to compose memo response |                          |


| Name   | Located in | Description                  | Required | Schema  |
| ------ | ---------- | ---------------------------- | -------- | ------- |
| memoId | path       | ID of memo to find relations | Yes      | integer |
| Code | Description                    | Schema                                       |
| ---- | ------------------------------ | -------------------------------------------- |
| 200  | Memo relation information list | [ [store.MemoRelation](#storememorelation) ] |
| 400  | ID is not a number: %s         |                                              |
| 500  | Failed to list memo relations  |                                              |

| Name   | Located in | Description          | Required | Schema                                                       |
| ------ | ---------- | -------------------- | -------- | ------------------------------------------------------------ |
| memoId | path       | ID of memo to relate | Yes      | integer                                                      |
| body   | body       | Memo relation object | Yes      | [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) |
| Code | Description                                                       | Schema                                   |
| ---- | ----------------------------------------------------------------- | ---------------------------------------- |
| 200  | Memo relation information                                         | [store.MemoRelation](#storememorelation) |
| 400  | ID is not a number: %s \| Malformatted post memo relation request |                                          |
| 500  | Failed to upsert memo relation                                    |                                          |

| Name          | Located in | Description                      | Required | Schema  |
| ------------- | ---------- | -------------------------------- | -------- | ------- |
| memoId        | path       | ID of memo to find relations     | Yes      | integer |
| relatedMemoId | path       | ID of memo to remove relation to | Yes      | integer |
| relationType  | path       | Type of relation to remove       | Yes      | string  |
| Code | Description                                                        | Schema  |
| ---- | ------------------------------------------------------------------ | ------- |
| 200  | Memo relation deleted                                              | boolean |
| 400  | Memo ID is not a number: %s \| Related memo ID is not a number: %s |         |
| 500  | Failed to delete memo relation                                     |         |


| Code | Description                   | Schema  |
| ---- | ----------------------------- | ------- |
| 200  | If succeed to ping the system | boolean |

| Code | Description                                                                                                                   | Schema                             |
| ---- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| 200  | System GetSystemStatus                                                                                                        | [v1.SystemStatus](#v1systemstatus) |
| 401  | Missing user in session \| Unauthorized                                                                                       |                                    |
| 500  | Failed to find host user \| Failed to find system setting list \| Failed to unmarshal system setting customized profile value |                                    |

| Code | Description                                          | Schema  |
| ---- | ---------------------------------------------------- | ------- |
| 200  | Database vacuumed                                    | boolean |
| 401  | Missing user in session \| Unauthorized              |         |
| 500  | Failed to find user \| Failed to ExecVacuum database |         |


| Name   | Located in | Description | Required | Schema  |
| ------ | ---------- | ----------- | -------- | ------- |
| limit  | query      | Limit       | No       | integer |
| offset | query      | Offset      | No       | integer |
| Code | Description                   | Schema                               |
| ---- | ----------------------------- | ------------------------------------ |
| 200  | Resource list                 | [ [store.Resource](#storeresource) ] |
| 401  | Missing user in session       |                                      |
| 500  | Failed to fetch resource list |                                      |

| Name | Located in | Description     | Required | Schema                                               |
| ---- | ---------- | --------------- | -------- | ---------------------------------------------------- |
| body | body       | Request object. | Yes      | [v1.CreateResourceRequest](#v1createresourcerequest) |
| Code | Description                                                                                                                                                             | Schema                           |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| 200  | Created resource                                                                                                                                                        | [store.Resource](#storeresource) |
| 400  | Malformatted post resource request \| Invalid external link \| Invalid external link scheme \| Failed to request %s \| Failed to read %s \| Failed to read mime from %s |                                  |
| 401  | Missing user in session                                                                                                                                                 |                                  |
| 500  | Failed to save resource \| Failed to create resource \| Failed to create activity                                                                                       |                                  |

| Name       | Located in | Description | Required | Schema  |
| ---------- | ---------- | ----------- | -------- | ------- |
| resourceId | path       | Resource ID | Yes      | integer |
| Code | Description                                          | Schema  |
| ---- | ---------------------------------------------------- | ------- |
| 200  | Resource deleted                                     | boolean |
| 400  | ID is not a number: %s                               |         |
| 401  | Missing user in session                              |         |
| 404  | Resource not found: %d                               |         |
| 500  | Failed to find resource \| Failed to delete resource |         |

| Name       | Located in | Description            | Required | Schema                                               |
| ---------- | ---------- | ---------------------- | -------- | ---------------------------------------------------- |
| resourceId | path       | Resource ID            | Yes      | integer                                              |
| patch      | body       | Patch resource request | Yes      | [v1.UpdateResourceRequest](#v1updateresourcerequest) |
| Code | Description                                                   | Schema                           |
| ---- | ------------------------------------------------------------- | -------------------------------- |
| 200  | Updated resource                                              | [store.Resource](#storeresource) |
| 400  | ID is not a number: %s \| Malformatted patch resource request |                                  |
| 401  | Missing user in session \| Unauthorized                       |                                  |
| 404  | Resource not found: %d                                        |                                  |
| 500  | Failed to find resource \| Failed to patch resource           |                                  |

| Name | Located in | Description    | Required | Schema |
| ---- | ---------- | -------------- | -------- | ------ |
| file | formData   | File to upload | Yes      | file   |
| Code | Description                                                                                                                              | Schema                           |
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| 200  | Created resource                                                                                                                         | [store.Resource](#storeresource) |
| 400  | Upload file not found \| File size exceeds allowed limit of %d MiB \| Failed to parse upload data                                        |                                  |
| 401  | Missing user in session                                                                                                                  |                                  |
| 500  | Failed to get uploading file \| Failed to open file \| Failed to save resource \| Failed to create resource \| Failed to create activity |                                  |

\*Swagger UI may have problems displaying other file types than images
| Name       | Located in | Description | Required | Schema  |
| ---------- | ---------- | ----------- | -------- | ------- |
| resourceId | path       | Resource ID | Yes      | integer |
| thumbnail  | query      | Thumbnail   | No       | integer |
| Code | Description                                                                                                         |
| ---- | ------------------------------------------------------------------------------------------------------------------- |
| 200  | Requested resource                                                                                                  |
| 400  | ID is not a number: %s \| Failed to get resource visibility                                                         |
| 401  | Resource visibility not match                                                                                       |
| 404  | Resource not found: %d                                                                                              |
| 500  | Failed to find resource by ID: %v \| Failed to open the local resource: %s \| Failed to read the local resource: %s |


| Code | Description                                      | Schema                             |
| ---- | ------------------------------------------------ | ---------------------------------- |
| 200  | List of storages                                 | [ [store.Storage](#storestorage) ] |
| 401  | Missing user in session \| Unauthorized          |                                    |
| 500  | Failed to find user \| Failed to convert storage |                                    |

| Name | Located in | Description     | Required | Schema                                             |
| ---- | ---------- | --------------- | -------- | -------------------------------------------------- |
| body | body       | Request object. | Yes      | [v1.CreateStorageRequest](#v1createstoragerequest) |
| Code | Description                                                                  | Schema                         |
| ---- | ---------------------------------------------------------------------------- | ------------------------------ |
| 200  | Created storage                                                              | [store.Storage](#storestorage) |
| 400  | Malformatted post storage request                                            |                                |
| 401  | Missing user in session                                                      |                                |
| 500  | Failed to find user \| Failed to create storage \| Failed to convert storage |                                |

| Name      | Located in | Description | Required | Schema  |
| --------- | ---------- | ----------- | -------- | ------- |
| storageId | path       | Storage ID  | Yes      | integer |
| Code | Description                                                                                                         | Schema  |
| ---- | ------------------------------------------------------------------------------------------------------------------- | ------- |
| 200  | Storage deleted                                                                                                     | boolean |
| 400  | ID is not a number: %s \| Storage service %d is using                                                               |         |
| 401  | Missing user in session \| Unauthorized                                                                             |         |
| 500  | Failed to find user \| Failed to find storage \| Failed to unmarshal storage service id \| Failed to delete storage |         |

| Name      | Located in | Description   | Required | Schema                                             |
| --------- | ---------- | ------------- | -------- | -------------------------------------------------- |
| storageId | path       | Storage ID    | Yes      | integer                                            |
| patch     | body       | Patch request | Yes      | [v1.UpdateStorageRequest](#v1updatestoragerequest) |
| Code | Description                                                                                       | Schema                         |
| ---- | ------------------------------------------------------------------------------------------------- | ------------------------------ |
| 200  | Updated resource                                                                                  | [store.Storage](#storestorage) |
| 400  | ID is not a number: %s \| Malformatted patch storage request \| Malformatted post storage request |                                |
| 401  | Missing user in session \| Unauthorized                                                           |                                |
| 500  | Failed to find user \| Failed to patch storage \| Failed to convert storage                       |                                |


| Code | Description                                               | Schema                                   |
| ---- | --------------------------------------------------------- | ---------------------------------------- |
| 200  | System setting list                                       | [ [v1.SystemSetting](#v1systemsetting) ] |
| 401  | Missing user in session \| Unauthorized                   |                                          |
| 500  | Failed to find user \| Failed to find system setting list |                                          |

| Name | Located in | Description     | Required | Schema                                                         |
| ---- | ---------- | --------------- | -------- | -------------------------------------------------------------- |
| body | body       | Request object. | Yes      | [v1.UpsertSystemSettingRequest](#v1upsertsystemsettingrequest) |
| Code | Description                                                         | Schema                                     |
| ---- | ------------------------------------------------------------------- | ------------------------------------------ |
| 200  | Created system setting                                              | [store.SystemSetting](#storesystemsetting) |
| 400  | Malformatted post system setting request \| invalid system setting  |                                            |
| 401  | Missing user in session \| Unauthorized                             |                                            |
| 403  | Cannot disable passwords if no SSO identity provider is configured. |                                            |
| 500  | Failed to find user \| Failed to upsert system setting              |                                            |


| Code | Description                 | Schema     |
| ---- | --------------------------- | ---------- |
| 200  | Tag list                    | [ string ] |
| 400  | Missing user id to find tag |            |
| 500  | Failed to find tag list     |            |

| Name | Located in | Description     | Required | Schema                                     |
| ---- | ---------- | --------------- | -------- | ------------------------------------------ |
| body | body       | Request object. | Yes      | [v1.UpsertTagRequest](#v1upserttagrequest) |
| Code | Description                                                  | Schema |
| ---- | ------------------------------------------------------------ | ------ |
| 200  | Created tag name                                             | string |
| 400  | Malformatted post tag request \| Tag name shouldn't be empty |        |
| 401  | Missing user in session                                      |        |
| 500  | Failed to upsert tag \| Failed to create activity            |        |

| Name | Located in | Description     | Required | Schema                                     |
| ---- | ---------- | --------------- | -------- | ------------------------------------------ |
| body | body       | Request object. | Yes      | [v1.DeleteTagRequest](#v1deletetagrequest) |
| Code | Description                                                  | Schema  |
| ---- | ------------------------------------------------------------ | ------- |
| 200  | Tag deleted                                                  | boolean |
| 400  | Malformatted post tag request \| Tag name shouldn't be empty |         |
| 401  | Missing user in session                                      |         |
| 500  | Failed to delete tag name: %v                                |         |

| Code | Description                                         | Schema     |
| ---- | --------------------------------------------------- | ---------- |
| 200  | Tag list                                            | [ string ] |
| 400  | Missing user session                                |            |
| 500  | Failed to find memo list \| Failed to find tag list |            |


| Code | Description               | Schema                       |
| ---- | ------------------------- | ---------------------------- |
| 200  | User list                 | [ [store.User](#storeuser) ] |
| 500  | Failed to fetch user list |                              |

| Name | Located in | Description    | Required | Schema                                       |
| ---- | ---------- | -------------- | -------- | -------------------------------------------- |
| body | body       | Request object | Yes      | [v1.CreateUserRequest](#v1createuserrequest) |
| Code | Description                                                                                                         | Schema                   |
| ---- | ------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | Created user                                                                                                        | [store.User](#storeuser) |
| 400  | Malformatted post user request \| Invalid user create format                                                        |                          |
| 401  | Missing auth session \| Unauthorized to create user                                                                 |                          |
| 403  | Could not create host user                                                                                          |                          |
| 500  | Failed to find user by id \| Failed to generate password hash \| Failed to create user \| Failed to create activity |                          |

| id   | path       | User ID     | Yes      | string |
| Code | Description                                                          | Schema  |
| ---- | -------------------------------------------------------------------- | ------- |
| 200  | User deleted                                                         | boolean |
| 400  | ID is not a number: %s \| Current session user not found with ID: %d |         |
| 401  | Missing user in session                                              |         |
| 403  | Unauthorized to delete user                                          |         |
| 500  | Failed to find user \| Failed to delete user                         |         |

| Name | Located in | Description | Required | Schema  |
| ---- | ---------- | ----------- | -------- | ------- |
| id   | path       | User ID     | Yes      | integer |
| Code | Description          | Schema                   |
| ---- | -------------------- | ------------------------ |
| 200  | Requested user       | [store.User](#storeuser) |
| 400  | Malformatted user id |                          |
| 404  | User not found       |                          |
| 500  | Failed to find user  |                          |

| Name  | Located in | Description   | Required | Schema                                       |
| ----- | ---------- | ------------- | -------- | -------------------------------------------- |
| id    | path       | User ID       | Yes      | string                                       |
| patch | body       | Patch request | Yes      | [v1.UpdateUserRequest](#v1updateuserrequest) |
| Code | Description                                                                                                                            | Schema                   |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 200  | Updated user                                                                                                                           | [store.User](#storeuser) |
| 400  | ID is not a number: %s \| Current session user not found with ID: %d \| Malformatted patch user request \| Invalid update user request |                          |
| 401  | Missing user in session                                                                                                                |                          |
| 403  | Unauthorized to update user                                                                                                            |                          |
| 500  | Failed to find user \| Failed to generate password hash \| Failed to patch user \| Failed to find userSettingList                      |                          |

| Code | Description                                           | Schema                   |
| ---- | ----------------------------------------------------- | ------------------------ |
| 200  | Current user                                          | [store.User](#storeuser) |
| 401  | Missing auth session                                  |                          |
| 500  | Failed to find user \| Failed to find userSettingList |                          |

| Name     | Located in | Description | Required | Schema |
| -------- | ---------- | ----------- | -------- | ------ |
| username | path       | Username    | Yes      | string |
| Code | Description         | Schema                   |
| ---- | ------------------- | ------------------------ |
| 200  | Requested user      | [store.User](#storeuser) |
| 404  | User not found      |                          |
| 500  | Failed to find user |                          |


| Name | Located in | Description     | Required | Schema                                                     |
| ---- | ---------- | --------------- | -------- | ---------------------------------------------------------- |
| body | body       | Request object. | Yes      | [v1.UpsertUserSettingRequest](#v1upsertusersettingrequest) |
| Code | Description                                                                  | Schema                                                                                     |
| ---- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| 200  | Created user setting                                                         | [github_com_usememos_memos_store.UserSetting](#github_com_usememos_memos_storeusersetting) |
| 400  | Malformatted post user setting upsert request \| Invalid user setting format |                                                                                            |
| 401  | Missing auth session                                                         |                                                                                            |
| 500  | Failed to upsert user setting                                                |                                                                                            |


| Code | Description                                                                                   |
| ---- | --------------------------------------------------------------------------------------------- |
| 200  | RSS                                                                                           |
| 500  | Failed to get system customized profile \| Failed to find memo list \| Failed to generate rss |

| Name | Located in | Description | Required | Schema  |
| ---- | ---------- | ----------- | -------- | ------- |
| id   | path       | User ID     | Yes      | integer |
| Code | Description                                                                                   |
| ---- | --------------------------------------------------------------------------------------------- |
| 200  | RSS                                                                                           |
| 400  | User id is not a number                                                                       |
| 500  | Failed to get system customized profile \| Failed to find memo list \| Failed to generate rss |

Get GetImage from URL
| url  | query      | Image url   | Yes      | string |
| Code | Description                                                         |
| ---- | ------------------------------------------------------------------- |
| 200  | Image                                                               |
| 400  | Missing GetImage url \| Wrong url \| Failed to get GetImage url: %s |
| 500  | Failed to write GetImage blob                                       |
### Models
| Name   | Type    | Description | Required |
| ------ | ------- | ----------- | -------- |
| key    | string  |             | No       |
| userID | integer |             | No       |
| value  | string  |             | No       |
| Name    | Type   | Description                                   | Required |
| ------- | ------ | --------------------------------------------- | -------- |
| driver  | string | Driver is the database driver sqlite, mysql   | No       |
| dsn     | string | DSN points to where Memos stores its own data | No       |
| mode    | string | Mode can be "prod" or "dev" or "demo"         | No       |
| version | string | Version is the current version of server      | No       |
| Name        | Type   | Description | Required |
| ----------- | ------ | ----------- | -------- |
| displayName | string |             | No       |
| email       | string |             | No       |
| identifier  | string |             | No       |
| Name             | Type                                                         | Description | Required |
| ---------------- | ------------------------------------------------------------ | ----------- | -------- |
| config           | [store.IdentityProviderConfig](#storeidentityproviderconfig) |             | No       |
| id               | integer                                                      |             | No       |
| identifierFilter | string                                                       |             | No       |
| name             | string                                                       |             | No       |
| type             | [store.IdentityProviderType](#storeidentityprovidertype)     |             | No       |
| Name         | Type                                                                     | Description | Required |
| ------------ | ------------------------------------------------------------------------ | ----------- | -------- |
| oauth2Config | [store.IdentityProviderOAuth2Config](#storeidentityprovideroauth2config) |             | No       |
| Name         | Type                                     | Description | Required |
| ------------ | ---------------------------------------- | ----------- | -------- |
| authUrl      | string                                   |             | No       |
| clientId     | string                                   |             | No       |
| clientSecret | string                                   |             | No       |
| fieldMapping | [store.FieldMapping](#storefieldmapping) |             | No       |
| scopes       | [ string ]                               |             | No       |
| tokenUrl     | string                                   |             | No       |
| userInfoUrl  | string                                   |             | No       |
| Name                       | Type   | Description | Required |
| -------------------------- | ------ | ----------- | -------- |
| store.IdentityProviderType | string |             |          |
| Name           | Type                                         | Description                                                                                                                                                  | Required |
| -------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| content        | string                                       | Domain specific fields                                                                                                                                       | No       |
| createdTs      | integer                                      |                                                                                                                                                              | No       |
| creatorID      | integer                                      |                                                                                                                                                              | No       |
| id             | integer                                      |                                                                                                                                                              | No       |
| parentID       | integer                                      | Composed fields For those comment memos, the parent ID is the memo ID of the memo being commented. If the parent ID is nil, then this memo is not a comment. | No       |
| pinned         | boolean                                      |                                                                                                                                                              | No       |
| relationList   | [ [store.MemoRelation](#storememorelation) ] |                                                                                                                                                              | No       |
| resourceIDList | [ integer ]                                  |                                                                                                                                                              | No       |
| rowStatus      | [store.RowStatus](#storerowstatus)           | Standard fields                                                                                                                                              | No       |
| updatedTs      | integer                                      |                                                                                                                                                              | No       |
| visibility     | [store.Visibility](#storevisibility)         |                                                                                                                                                              | No       |
| Name          | Type                                             | Description | Required |
| ------------- | ------------------------------------------------ | ----------- | -------- |
| memoID        | integer                                          |             | No       |
| relatedMemoID | integer                                          |             | No       |
| type          | [store.MemoRelationType](#storememorelationtype) |             | No       |
| Name                   | Type   | Description | Required |
| ---------------------- | ------ | ----------- | -------- |
| store.MemoRelationType | string |             |          |
| Name         | Type        | Description            | Required |
| ------------ | ----------- | ---------------------- | -------- |
| blob         | [ integer ] |                        | No       |
| createdTs    | integer     |                        | No       |
| creatorID    | integer     | Standard fields        | No       |
| externalLink | string      |                        | No       |
| filename     | string      | Domain specific fields | No       |
| id           | integer     |                        | No       |
| internalPath | string      |                        | No       |
| memoID       | integer     |                        | No       |
| size         | integer     |                        | No       |
| type         | string      |                        | No       |
| updatedTs    | integer     |                        | No       |
| Name       | Type   | Description | Required |
| ---------- | ------ | ----------- | -------- |
| store.Role | string |             |          |
| Name            | Type   | Description | Required |
| --------------- | ------ | ----------- | -------- |
| store.RowStatus | string |             |          |
| Name   | Type    | Description | Required |
| ------ | ------- | ----------- | -------- |
| config | string  |             | No       |
| id     | integer |             | No       |
| name   | string  |             | No       |
| type   | string  |             | No       |
| Name        | Type   | Description | Required |
| ----------- | ------ | ----------- | -------- |
| description | string |             | No       |
| name        | string |             | No       |
| value       | string |             | No       |
| Name         | Type                               | Description            | Required |
| ------------ | ---------------------------------- | ---------------------- | -------- |
| avatarURL    | string                             |                        | No       |
| createdTs    | integer                            |                        | No       |
| email        | string                             |                        | No       |
| id           | integer                            |                        | No       |
| nickname     | string                             |                        | No       |
| passwordHash | string                             |                        | No       |
| role         | [store.Role](#storerole)           |                        | No       |
| rowStatus    | [store.RowStatus](#storerowstatus) | Standard fields        | No       |
| updatedTs    | integer                            |                        | No       |
| username     | string                             | Domain specific fields | No       |
| Name             | Type   | Description | Required |
| ---------------- | ------ | ----------- | -------- |
| store.Visibility | string |             |          |
| Name             | Type                                                   | Description | Required |
| ---------------- | ------------------------------------------------------ | ----------- | -------- |
| config           | [v1.IdentityProviderConfig](#v1identityproviderconfig) |             | No       |
| identifierFilter | string                                                 |             | No       |
| name             | string                                                 |             | No       |
| type             | [v1.IdentityProviderType](#v1identityprovidertype)     |             | No       |
| Name           | Type                                                             | Description            | Required |
| -------------- | ---------------------------------------------------------------- | ---------------------- | -------- |
| content        | string                                                           |                        | No       |
| createdTs      | integer                                                          |                        | No       |
| relationList   | [ [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) ] |                        | No       |
| resourceIdList | [ integer ]                                                      | Related fields         | No       |
| visibility     | [v1.Visibility](#v1visibility)                                   | Domain specific fields | No       |
| Name         | Type   | Description | Required |
| ------------ | ------ | ----------- | -------- |
| externalLink | string |             | No       |
| filename     | string |             | No       |
| type         | string |             | No       |
| Name   | Type                                 | Description | Required |
| ------ | ------------------------------------ | ----------- | -------- |
| config | [v1.StorageConfig](#v1storageconfig) |             | No       |
| name   | string                               |             | No       |
| type   | [v1.StorageType](#v1storagetype)     |             | No       |
| Name     | Type               | Description | Required |
| -------- | ------------------ | ----------- | -------- |
| email    | string             |             | No       |
| nickname | string             |             | No       |
| password | string             |             | No       |
| role     | [v1.Role](#v1role) |             | No       |
| username | string             |             | No       |
| Name        | Type   | Description                                                             | Required |
| ----------- | ------ | ----------------------------------------------------------------------- | -------- |
| appearance  | string | Appearance is the server default appearance.                            | No       |
| description | string | Description is the server description.                                  | No       |
| externalUrl | string | ExternalURL is the external url of server. e.g. <https://usermemos.com> | No       |
| locale      | string | Locale is the server default locale.                                    | No       |
| logoUrl     | string | LogoURL is the url of logo image.                                       | No       |
| name        | string | Name is the server name, default is `memos`                             | No       |
| Name | Type   | Description | Required |
| ---- | ------ | ----------- | -------- |
| name | string |             | No       |
| Name        | Type   | Description | Required |
| ----------- | ------ | ----------- | -------- |
| displayName | string |             | No       |
| email       | string |             | No       |
| identifier  | string |             | No       |
| Name             | Type                                                   | Description | Required |
| ---------------- | ------------------------------------------------------ | ----------- | -------- |
| config           | [v1.IdentityProviderConfig](#v1identityproviderconfig) |             | No       |
| id               | integer                                                |             | No       |
| identifierFilter | string                                                 |             | No       |
| name             | string                                                 |             | No       |
| type             | [v1.IdentityProviderType](#v1identityprovidertype)     |             | No       |
| Name         | Type                                                               | Description | Required |
| ------------ | ------------------------------------------------------------------ | ----------- | -------- |
| oauth2Config | [v1.IdentityProviderOAuth2Config](#v1identityprovideroauth2config) |             | No       |
| Name         | Type                               | Description | Required |
| ------------ | ---------------------------------- | ----------- | -------- |
| authUrl      | string                             |             | No       |
| clientId     | string                             |             | No       |
| clientSecret | string                             |             | No       |
| fieldMapping | [v1.FieldMapping](#v1fieldmapping) |             | No       |
| scopes       | [ string ]                         |             | No       |
| tokenUrl     | string                             |             | No       |
| userInfoUrl  | string                             |             | No       |
| Name                    | Type   | Description | Required |
| ----------------------- | ------ | ----------- | -------- |
| v1.IdentityProviderType | string |             |          |
| Name                | Type   | Description | Required |
| ------------------- | ------ | ----------- | -------- |
| v1.MemoRelationType | string |             |          |
| Name           | Type                                                             | Description            | Required |
| -------------- | ---------------------------------------------------------------- | ---------------------- | -------- |
| content        | string                                                           | Domain specific fields | No       |
| createdTs      | integer                                                          | Standard fields        | No       |
| relationList   | [ [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) ] |                        | No       |
| resourceIdList | [ integer ]                                                      | Related fields         | No       |
| rowStatus      | [v1.RowStatus](#v1rowstatus)                                     |                        | No       |
| updatedTs      | integer                                                          |                        | No       |
| visibility     | [v1.Visibility](#v1visibility)                                   |                        | No       |
| Name    | Type   | Description | Required |
| ------- | ------ | ----------- | -------- |
| v1.Role | string |             |          |
| Name         | Type   | Description | Required |
| ------------ | ------ | ----------- | -------- |
| v1.RowStatus | string |             |          |
| Name               | Type    | Description | Required |
| ------------------ | ------- | ----------- | -------- |
| code               | string  |             | No       |
| identityProviderId | integer |             | No       |
| redirectUri        | string  |             | No       |
| Name     | Type   | Description | Required |
| -------- | ------ | ----------- | -------- |
| password | string |             | No       |
| username | string |             | No       |
| Name     | Type   | Description | Required |
| -------- | ------ | ----------- | -------- |
| password | string |             | No       |
| username | string |             | No       |
| Name     | Type                                     | Description | Required |
| -------- | ---------------------------------------- | ----------- | -------- |
| s3Config | [v1.StorageS3Config](#v1storages3config) |             | No       |
| Name      | Type   | Description | Required |
| --------- | ------ | ----------- | -------- |
| accessKey | string |             | No       |
| bucket    | string |             | No       |
| endPoint  | string |             | No       |
| path      | string |             | No       |
| region    | string |             | No       |
| secretKey | string |             | No       |
| urlPrefix | string |             | No       |
| urlSuffix | string |             | No       |
| Name           | Type   | Description | Required |
| -------------- | ------ | ----------- | -------- |
| v1.StorageType | string |             |          |
| Name        | Type                                         | Description                              | Required |
| ----------- | -------------------------------------------- | ---------------------------------------- | -------- |
| description | string                                       |                                          | No       |
| name        | [v1.SystemSettingName](#v1systemsettingname) |                                          | No       |
| value       | string                                       | Value is a JSON string with basic value. | No       |
| Name                 | Type   | Description | Required |
| -------------------- | ------ | ----------- | -------- |
| v1.SystemSettingName | string |             |          |
| Name                     | Type                                         | Description                                                        | Required |
| ------------------------ | -------------------------------------------- | ------------------------------------------------------------------ | -------- |
| additionalScript         | string                                       | Additional script.                                                 | No       |
| additionalStyle          | string                                       | Additional style.                                                  | No       |
| allowSignUp              | boolean                                      | System settings Allow sign up.                                     | No       |
| autoBackupInterval       | integer                                      | Auto Backup Interval.                                              | No       |
| customizedProfile        | [v1.CustomizedProfile](#v1customizedprofile) | Customized server profile, including server name and external url. | No       |
| dbSize                   | integer                                      |                                                                    | No       |
| disablePasswordLogin     | boolean                                      | Disable password login.                                            | No       |
| disablePublicMemos       | boolean                                      | Disable public memos.                                              | No       |
| host                     | [v1.User](#v1user)                           |                                                                    | No       |
| localStoragePath         | string                                       | Local storage path.                                                | No       |
| maxUploadSizeMiB         | integer                                      | Max upload size.                                                   | No       |
| memoDisplayWithUpdatedTs | boolean                                      | Memo display with updated timestamp.                               | No       |
| profile                  | [profile.Profile](#profileprofile)           |                                                                    | No       |
| storageServiceId         | integer                                      | Storage service ID.                                                | No       |
| Name             | Type                                                   | Description | Required |
| ---------------- | ------------------------------------------------------ | ----------- | -------- |
| config           | [v1.IdentityProviderConfig](#v1identityproviderconfig) |             | No       |
| identifierFilter | string                                                 |             | No       |
| name             | string                                                 |             | No       |
| type             | [v1.IdentityProviderType](#v1identityprovidertype)     |             | No       |
| Name     | Type   | Description | Required |
| -------- | ------ | ----------- | -------- |
| filename | string |             | No       |
| Name   | Type                                 | Description | Required |
| ------ | ------------------------------------ | ----------- | -------- |
| config | [v1.StorageConfig](#v1storageconfig) |             | No       |
| name   | string                               |             | No       |
| type   | [v1.StorageType](#v1storagetype)     |             | No       |
| Name      | Type                         | Description | Required |
| --------- | ---------------------------- | ----------- | -------- |
| avatarUrl | string                       |             | No       |
| email     | string                       |             | No       |
| nickname  | string                       |             | No       |
| password  | string                       |             | No       |
| rowStatus | [v1.RowStatus](#v1rowstatus) |             | No       |
| username  | string                       |             | No       |
| Name   | Type    | Description | Required |
| ------ | ------- | ----------- | -------- |
| pinned | boolean |             | No       |
| Name          | Type                                       | Description | Required |
| ------------- | ------------------------------------------ | ----------- | -------- |
| relatedMemoId | integer                                    |             | No       |
| type          | [v1.MemoRelationType](#v1memorelationtype) |             | No       |
| Name        | Type                                         | Description | Required |
| ----------- | -------------------------------------------- | ----------- | -------- |
| description | string                                       |             | No       |
| name        | [v1.SystemSettingName](#v1systemsettingname) |             | No       |
| value       | string                                       |             | No       |
| Name | Type   | Description | Required |
| ---- | ------ | ----------- | -------- |
| name | string |             | No       |
| Name  | Type                                   | Description | Required |
| ----- | -------------------------------------- | ----------- | -------- |
| key   | [v1.UserSettingKey](#v1usersettingkey) |             | No       |
| value | string                                 |             | No       |
| Name            | Type                                 | Description            | Required |
| --------------- | ------------------------------------ | ---------------------- | -------- |
| avatarUrl       | string                               |                        | No       |
| createdTs       | integer                              |                        | No       |
| email           | string                               |                        | No       |
| id              | integer                              |                        | No       |
| nickname        | string                               |                        | No       |
| role            | [v1.Role](#v1role)                   |                        | No       |
| rowStatus       | [v1.RowStatus](#v1rowstatus)         | Standard fields        | No       |
| updatedTs       | integer                              |                        | No       |
| userSettingList | [ [v1.UserSetting](#v1usersetting) ] |                        | No       |
| username        | string                               | Domain specific fields | No       |
| Name   | Type                                   | Description | Required |
| ------ | -------------------------------------- | ----------- | -------- |
| key    | [v1.UserSettingKey](#v1usersettingkey) |             | No       |
| userId | integer                                |             | No       |
| value  | string                                 |             | No       |
| Name              | Type   | Description | Required |
| ----------------- | ------ | ----------- | -------- |
| v1.UserSettingKey | string |             |          |
| Name          | Type   | Description | Required |
| ------------- | ------ | ----------- | -------- |
| v1.Visibility | string |             |          |