"description":"User has been archived with username %s"
},
"500":{
"description":"Failed to find system setting | Failed to unmarshal system setting | Incorrect login credentials, please try again | Failed to generate tokens | Failed to create activity"
}
}
}
},
"/api/v1/auth/signin/sso":{
"post":{
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"auth"
],
"summary":"Sign-in to memos using SSO.",
"parameters":[
{
"description":"SSO sign-in object",
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.SSOSignIn"
}
}
],
"responses":{
"200":{
"description":"User information",
"schema":{
"$ref":"#/definitions/store.User"
}
},
"400":{
"description":"Malformatted signin request"
},
"401":{
"description":"Access denied, identifier does not match the filter."
},
"403":{
"description":"User has been archived with username {username}"
},
"404":{
"description":"Identity provider not found"
},
"500":{
"description":"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"
}
}
}
},
"/api/v1/auth/signout":{
"post":{
"produces":[
"application/json"
],
"tags":[
"auth"
],
"summary":"Sign-out from memos.",
"responses":{
"200":{
"description":"Sign-out success",
"schema":{
"type":"boolean"
}
}
}
}
},
"/api/v1/auth/signup":{
"post":{
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"auth"
],
"summary":"Sign-up to memos.",
"parameters":[
{
"description":"Sign-up object",
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.SignUp"
}
}
],
"responses":{
"200":{
"description":"User information",
"schema":{
"$ref":"#/definitions/store.User"
}
},
"400":{
"description":"Malformatted signup request | Failed to find users"
},
"401":{
"description":"signup is disabled"
},
"403":{
"description":"Forbidden"
},
"404":{
"description":"Not found"
},
"500":{
"description":"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"
}
}
}
},
"/api/v1/idp":{
"get":{
"description":"*clientSecret is only available for host user",
"produces":[
"application/json"
],
"tags":[
"idp"
],
"summary":"Get a list of identity providers",
"responses":{
"200":{
"description":"List of available identity providers",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/v1.IdentityProvider"
}
}
},
"500":{
"description":"Failed to find identity provider list | Failed to find user"
"description":"ID is not a number: %s | Malformatted patch identity provider request"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"500":{
"description":"Failed to find user | Failed to patch identity provider"
}
}
}
},
"/api/v1/memo":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Get a list of memos matching optional filters",
"parameters":[
{
"type":"integer",
"description":"Creator ID",
"name":"creatorId",
"in":"query"
},
{
"type":"string",
"description":"Creator username",
"name":"creatorUsername",
"in":"query"
},
{
"enum":[
"NORMAL",
"ARCHIVED"
],
"type":"string",
"description":"Row status",
"name":"rowStatus",
"in":"query"
},
{
"type":"boolean",
"description":"Pinned",
"name":"pinned",
"in":"query"
},
{
"type":"string",
"description":"Search for tag. Do not append #",
"name":"tag",
"in":"query"
},
{
"type":"string",
"description":"Search for content",
"name":"content",
"in":"query"
},
{
"type":"integer",
"description":"Limit",
"name":"limit",
"in":"query"
},
{
"type":"integer",
"description":"Offset",
"name":"offset",
"in":"query"
}
],
"responses":{
"200":{
"description":"Memo list",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/store.Memo"
}
}
},
"400":{
"description":"Missing user to find memo"
},
"500":{
"description":"Failed to get memo display with updated ts setting value | Failed to fetch memo list | Failed to compose memo response"
}
}
},
"post":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Visibility can be PUBLIC, PROTECTED or PRIVATE\n*You should omit fields to use their default values",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Create a memo",
"parameters":[
{
"description":"Request object.",
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.CreateMemoRequest"
}
}
],
"responses":{
"200":{
"description":"Stored memo",
"schema":{
"$ref":"#/definitions/store.Memo"
}
},
"400":{
"description":"Malformatted post memo request | Content size overflow, up to 1MB"
},
"401":{
"description":"Missing user in session"
},
"404":{
"description":"User not found | Memo not found: %d"
},
"500":{
"description":"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"
}
}
}
},
"/api/v1/memo/all":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"This should also list protected memos if the user is logged in\nAuthentication is optional",
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Get a list of public memos matching optional filters",
"parameters":[
{
"type":"integer",
"description":"Limit",
"name":"limit",
"in":"query"
},
{
"type":"integer",
"description":"Offset",
"name":"offset",
"in":"query"
}
],
"responses":{
"200":{
"description":"Memo list",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/store.Memo"
}
}
},
"500":{
"description":"Failed to get memo display with updated ts setting value | Failed to fetch all memo list | Failed to compose memo response"
}
}
}
},
"/api/v1/memo/stats":{
"get":{
"description":"Used to generate the heatmap",
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Get memo stats by creator ID or username",
"parameters":[
{
"type":"integer",
"description":"Creator ID",
"name":"creatorId",
"in":"query"
},
{
"type":"string",
"description":"Creator username",
"name":"creatorUsername",
"in":"query"
}
],
"responses":{
"200":{
"description":"Memo createdTs list",
"schema":{
"type":"array",
"items":{
"type":"integer"
}
}
},
"400":{
"description":"Missing user id to find memo"
},
"500":{
"description":"Failed to get memo display with updated ts setting value | Failed to find memo list | Failed to compose memo response"
}
}
}
},
"/api/v1/memo/{memoId}":{
"get":{
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Get memo by ID",
"parameters":[
{
"type":"integer",
"description":"Memo ID",
"name":"memoId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"Memo list",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/store.Memo"
}
}
},
"400":{
"description":"ID is not a number: %s"
},
"401":{
"description":"Missing user in session"
},
"403":{
"description":"this memo is private only | this memo is protected, missing user in session"
},
"404":{
"description":"Memo not found: %d"
},
"500":{
"description":"Failed to find memo by ID: %v | Failed to compose memo response"
}
}
},
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Delete memo by ID",
"parameters":[
{
"type":"integer",
"description":"Memo ID to delete",
"name":"memoId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"Memo deleted",
"schema":{
"type":"boolean"
}
},
"400":{
"description":"ID is not a number: %s"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"404":{
"description":"Memo not found: %d"
},
"500":{
"description":"Failed to find memo | Failed to delete memo ID: %v"
}
}
},
"patch":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Visibility can be PUBLIC, PROTECTED or PRIVATE\n*You should omit fields to use their default values",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"memo"
],
"summary":"Update a memo",
"parameters":[
{
"type":"integer",
"description":"ID of memo to update",
"name":"memoId",
"in":"path",
"required":true
},
{
"description":"Patched object.",
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.PatchMemoRequest"
}
}
],
"responses":{
"200":{
"description":"Stored memo",
"schema":{
"$ref":"#/definitions/store.Memo"
}
},
"400":{
"description":"ID is not a number: %s | Malformatted patch memo request | Content size overflow, up to 1MB"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"404":{
"description":"Memo not found: %d"
},
"500":{
"description":"Failed to find memo | Failed to patch memo | Failed to upsert memo resource | Failed to delete memo resource | Failed to compose memo response"
"description":"ID is not a number: %s | Malformatted post memo resource request | Resource not found"
},
"401":{
"description":"Missing user in session | Unauthorized to bind this resource"
},
"500":{
"description":"Failed to fetch resource | Failed to upsert memo resource"
}
}
}
},
"/api/v1/memo/{memoId}/resource/{resourceId}":{
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"memo-resource"
],
"summary":"Unbind resource from memo",
"parameters":[
{
"type":"integer",
"description":"ID of memo to unbind resource from",
"name":"memoId",
"in":"path",
"required":true
},
{
"type":"integer",
"description":"ID of resource to unbind from memo",
"name":"resourceId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"Memo resource unbinded. *200 is returned even if the reference doesn't exists ",
"schema":{
"type":"boolean"
}
},
"400":{
"description":"Memo ID is not a number: %s | Resource ID is not a number: %s | Memo not found"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"500":{
"description":"Failed to find memo | Failed to fetch resource list"
}
}
}
},
"/api/v1/resource":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"resource"
],
"summary":"Get a list of resources",
"parameters":[
{
"type":"integer",
"description":"Limit",
"name":"limit",
"in":"query"
},
{
"type":"integer",
"description":"Offset",
"name":"offset",
"in":"query"
}
],
"responses":{
"200":{
"description":"Resource list",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/store.Resource"
}
}
},
"401":{
"description":"Missing user in session"
},
"500":{
"description":"Failed to fetch resource list"
}
}
},
"post":{
"security":[
{
"ApiKeyAuth":[]
}
],
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"resource"
],
"summary":"Create resource",
"parameters":[
{
"description":"Request object.",
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.CreateResourceRequest"
}
}
],
"responses":{
"200":{
"description":"Created resource",
"schema":{
"$ref":"#/definitions/store.Resource"
}
},
"400":{
"description":"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":{
"description":"Missing user in session"
},
"500":{
"description":"Failed to save resource | Failed to create resource | Failed to create activity"
}
}
}
},
"/api/v1/resource/blob":{
"post":{
"security":[
{
"ApiKeyAuth":[]
}
],
"consumes":[
"multipart/form-data"
],
"produces":[
"application/json"
],
"tags":[
"resource"
],
"summary":"Upload resource",
"parameters":[
{
"type":"file",
"description":"File to upload",
"name":"file",
"in":"formData",
"required":true
}
],
"responses":{
"200":{
"description":"Created resource",
"schema":{
"$ref":"#/definitions/store.Resource"
}
},
"400":{
"description":"Upload file not found | File size exceeds allowed limit of %d MiB | Failed to parse upload data"
},
"401":{
"description":"Missing user in session"
},
"500":{
"description":"Failed to get uploading file | Failed to open file | Failed to save resource | Failed to create resource | Failed to create activity"
}
}
}
},
"/api/v1/resource/{resourceId}":{
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"resource"
],
"summary":"Delete a resource",
"parameters":[
{
"type":"integer",
"description":"Resource ID",
"name":"resourceId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"Resource deleted",
"schema":{
"type":"boolean"
}
},
"400":{
"description":"ID is not a number: %s"
},
"401":{
"description":"Missing user in session"
},
"404":{
"description":"Resource not found: %d"
},
"500":{
"description":"Failed to find resource | Failed to delete resource"
}
}
},
"patch":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"resource"
],
"summary":"Update a resource",
"parameters":[
{
"type":"integer",
"description":"Resource ID",
"name":"resourceId",
"in":"path",
"required":true
},
{
"description":"Patch resource request",
"name":"patch",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.UpdateResourceRequest"
}
}
],
"responses":{
"200":{
"description":"Updated resource",
"schema":{
"$ref":"#/definitions/store.Resource"
}
},
"400":{
"description":"ID is not a number: %s | Malformatted patch resource request"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"404":{
"description":"Resource not found: %d"
},
"500":{
"description":"Failed to find resource | Failed to patch resource"
}
}
}
},
"/api/v1/storage":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"storage"
],
"summary":"Get a list of storages",
"responses":{
"200":{
"description":"List of storages",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/store.Storage"
}
}
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"500":{
"description":"Failed to find user | Failed to convert storage"
}
}
},
"post":{
"security":[
{
"ApiKeyAuth":[]
}
],
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"tags":[
"storage"
],
"summary":"Create storage",
"parameters":[
{
"description":"Request object.",
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.CreateStorageRequest"
}
}
],
"responses":{
"200":{
"description":"Created storage",
"schema":{
"$ref":"#/definitions/store.Storage"
}
},
"400":{
"description":"Malformatted post storage request"
},
"401":{
"description":"Missing user in session"
},
"500":{
"description":"Failed to find user | Failed to create storage | Failed to convert storage"
}
}
}
},
"/api/v1/storage/{storageId}":{
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"storage"
],
"summary":"Delete a storage",
"parameters":[
{
"type":"integer",
"description":"Storage ID",
"name":"storageId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"Storage deleted",
"schema":{
"type":"boolean"
}
},
"400":{
"description":"ID is not a number: %s | Storage service %d is using"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"500":{
"description":"Failed to find user | Failed to find storage | Failed to unmarshal storage service id | Failed to delete storage"
}
}
},
"patch":{
"security":[
{
"ApiKeyAuth":[]
}
],
"produces":[
"application/json"
],
"tags":[
"storage"
],
"summary":"Update a storage",
"parameters":[
{
"type":"integer",
"description":"Storage ID",
"name":"storageId",
"in":"path",
"required":true
},
{
"description":"Patch request",
"name":"patch",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/v1.UpdateStorageRequest"
}
}
],
"responses":{
"200":{
"description":"Updated resource",
"schema":{
"$ref":"#/definitions/store.Storage"
}
},
"400":{
"description":"ID is not a number: %s | Malformatted patch storage request | Malformatted post storage request"
},
"401":{
"description":"Missing user in session | Unauthorized"
},
"500":{
"description":"Failed to find user | Failed to patch storage | Failed to convert storage"