memos/docs/apidocs.swagger.yaml

2665 lines
72 KiB
YAML
Raw Normal View History

swagger: "2.0"
info:
title: api/v2/activity_service.proto
version: version not set
tags:
- name: ActivityService
- name: UserService
- name: AuthService
2024-03-30 14:58:47 +08:00
- name: IdentityProviderService
- name: InboxService
- name: LinkService
- name: ResourceService
- name: MemoService
2024-04-13 02:55:40 +08:00
- name: StorageService
- name: TagService
- name: WebhookService
2024-01-28 07:35:42 +08:00
- name: WorkspaceService
- name: WorkspaceSettingService
consumes:
- application/json
produces:
- application/json
paths:
/api/v2/auth/signin:
post:
summary: SignIn signs in the user with the given username and password.
operationId: AuthService_SignIn
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: username
2024-04-16 22:33:25 +08:00
description: The username to sign in with.
in: query
required: false
type: string
- name: password
2024-04-16 22:33:25 +08:00
description: The password to sign in with.
in: query
required: false
type: string
2024-01-29 23:12:02 +08:00
- name: neverExpire
2024-04-16 22:33:25 +08:00
description: Whether the session should never expire.
2024-01-29 23:12:02 +08:00
in: query
required: false
type: boolean
tags:
- AuthService
/api/v2/auth/signin/sso:
post:
summary: SignInWithSSO signs in the user with the given SSO code.
operationId: AuthService_SignInWithSSO
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: idpId
2024-04-16 22:33:25 +08:00
description: The ID of the SSO provider.
in: query
required: false
type: integer
format: int32
- name: code
2024-04-16 22:33:25 +08:00
description: The code to sign in with.
in: query
required: false
type: string
- name: redirectUri
2024-04-16 22:33:25 +08:00
description: The redirect URI.
in: query
required: false
type: string
tags:
- AuthService
/api/v2/auth/signout:
post:
summary: SignOut signs out the user.
operationId: AuthService_SignOut
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- AuthService
/api/v2/auth/signup:
post:
summary: SignUp signs up the user with the given username and password.
operationId: AuthService_SignUp
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: username
2024-04-16 22:33:25 +08:00
description: The username to sign up with.
in: query
required: false
type: string
- name: password
2024-04-16 22:33:25 +08:00
description: The password to sign up with.
in: query
required: false
type: string
tags:
- AuthService
/api/v2/auth/status:
post:
summary: GetAuthStatus returns the current auth status of the user.
operationId: AuthService_GetAuthStatus
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- AuthService
2024-03-30 14:58:47 +08:00
/api/v2/identityProviders:
get:
2024-04-16 22:33:25 +08:00
summary: ListIdentityProviders lists identity providers.
2024-03-30 14:58:47 +08:00
operationId: IdentityProviderService_ListIdentityProviders
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2ListIdentityProvidersResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- IdentityProviderService
post:
2024-04-16 22:33:25 +08:00
summary: CreateIdentityProvider creates an identity provider.
2024-03-30 14:58:47 +08:00
operationId: IdentityProviderService_CreateIdentityProvider
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/apiv2IdentityProvider'
2024-03-30 14:58:47 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-04-16 22:33:25 +08:00
- name: identityProvider
description: The identityProvider to create.
in: body
required: true
schema:
$ref: '#/definitions/apiv2IdentityProvider'
2024-03-30 14:58:47 +08:00
tags:
- IdentityProviderService
/api/v2/inboxes:
get:
2024-02-01 21:26:09 +08:00
summary: ListInboxes lists inboxes for a user.
operationId: InboxService_ListInboxes
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2ListInboxesResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: user
2024-03-30 14:58:47 +08:00
description: 'Format: users/{id}'
in: query
required: false
type: string
tags:
- InboxService
2024-04-16 22:33:25 +08:00
/api/v2/linkMetadata:
2024-03-16 23:35:36 +08:00
get:
2024-04-16 22:33:25 +08:00
summary: GetLinkMetadata returns metadata for a given link.
2024-03-16 23:35:36 +08:00
operationId: LinkService_GetLinkMetadata
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetLinkMetadataResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: link
in: query
required: false
type: string
tags:
- LinkService
/api/v2/memos:
get:
summary: ListMemos lists memos with pagination and filter.
operationId: MemoService_ListMemos
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2ListMemosResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: pageSize
description: The maximum number of memos to return.
in: query
required: false
type: integer
format: int32
- name: pageToken
2024-03-13 20:25:27 +08:00
description: |-
A page token, received from a previous `ListMemos` call.
Provide this to retrieve the subsequent page.
in: query
required: false
type: string
- name: filter
2024-03-13 20:25:27 +08:00
description: |-
Filter is used to filter memos returned in the list.
2024-03-18 12:56:52 +08:00
Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']"
in: query
required: false
type: string
tags:
- MemoService
post:
summary: CreateMemo creates a memo.
operationId: MemoService_CreateMemo
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Memo'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2CreateMemoRequest'
tags:
- MemoService
/api/v2/memos/stats:
get:
summary: GetUserMemosStats gets stats of memos for a user.
operationId: MemoService_GetUserMemosStats
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetUserMemosStatsResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
name is the name of the user to get stats for.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: query
required: false
type: string
- name: timezone
2024-03-13 20:25:27 +08:00
description: |-
timezone location
Format: uses tz identifier
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
in: query
required: false
type: string
- name: filter
description: Same as ListMemosRequest.filter
in: query
required: false
type: string
tags:
- MemoService
2024-03-18 23:23:53 +08:00
/api/v2/memos:export:
post:
summary: ExportMemos exports memos.
operationId: MemoService_ExportMemos
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ExportMemosResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-04-16 22:33:25 +08:00
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2ExportMemosRequest'
tags:
- MemoService
2024-03-18 23:23:53 +08:00
/api/v2/memos:search:
get:
2024-03-20 21:17:04 +08:00
summary: SearchMemos searches memos.
2024-03-18 23:23:53 +08:00
operationId: MemoService_SearchMemos
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2SearchMemosResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: filter
description: |-
Filter is used to filter memos returned.
Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']"
in: query
required: false
type: string
tags:
- MemoService
2024-04-08 20:52:46 +08:00
/api/v2/reactions/{reactionId}:
delete:
summary: DeleteMemoReaction deletes a reaction for a memo.
operationId: MemoService_DeleteMemoReaction
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
2024-04-08 20:52:46 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: reactionId
in: path
required: true
type: integer
format: int32
tags:
- MemoService
2024-03-18 23:23:53 +08:00
/api/v2/resources:
get:
2024-03-18 23:23:53 +08:00
summary: ListResources lists all resources.
operationId: ResourceService_ListResources
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListResourcesResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
2024-03-18 23:23:53 +08:00
- ResourceService
post:
2024-03-18 23:23:53 +08:00
summary: CreateResource creates a new resource.
operationId: ResourceService_CreateResource
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Resource'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-04-16 22:33:25 +08:00
- name: resource
in: body
required: true
schema:
$ref: '#/definitions/v2Resource'
2024-02-08 11:54:59 +08:00
tags:
2024-03-18 23:23:53 +08:00
- ResourceService
2024-03-20 21:17:04 +08:00
/api/v2/resources:search:
2024-03-18 23:23:53 +08:00
get:
2024-03-20 21:17:04 +08:00
summary: SearchResources searches memos.
operationId: ResourceService_SearchResources
2024-02-08 11:54:59 +08:00
responses:
"200":
description: A successful response.
schema:
2024-03-20 21:17:04 +08:00
$ref: '#/definitions/v2SearchResourcesResponse'
2024-02-08 11:54:59 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-20 21:17:04 +08:00
- name: filter
in: query
required: false
2024-02-08 11:54:59 +08:00
type: string
tags:
2024-03-18 23:23:53 +08:00
- ResourceService
2024-04-13 02:55:40 +08:00
/api/v2/storages:
get:
summary: ListStorages returns a list of storages.
operationId: StorageService_ListStorages
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2ListStoragesResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- StorageService
post:
summary: CreateStorage creates a new storage.
operationId: StorageService_CreateStorage
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2CreateStorageResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2CreateStorageRequest'
tags:
- StorageService
/api/v2/storages/{id}:
get:
summary: GetStorage returns a storage by id.
operationId: StorageService_GetStorage
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetStorageResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: id
in: path
required: true
type: integer
format: int32
tags:
- StorageService
delete:
summary: DeleteStorage deletes a storage by id.
operationId: StorageService_DeleteStorage
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2DeleteStorageResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: id
in: path
required: true
type: integer
format: int32
tags:
- StorageService
/api/v2/storages/{storage.id}:
patch:
summary: UpdateStorage updates a storage.
operationId: StorageService_UpdateStorage
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpdateStorageResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: storage.id
in: path
required: true
type: integer
format: int32
- name: storage
in: body
required: true
schema:
type: object
properties:
title:
type: string
type:
$ref: '#/definitions/apiv2StorageType'
config:
$ref: '#/definitions/apiv2StorageConfig'
tags:
- StorageService
2024-03-18 23:23:53 +08:00
/api/v2/tags:
get:
2024-03-18 23:23:53 +08:00
summary: ListTags lists tags.
operationId: TagService_ListTags
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListTagsResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
2024-03-18 23:23:53 +08:00
- TagService
delete:
summary: DeleteTag deletes a tag.
operationId: TagService_DeleteTag
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: tag.name
in: query
required: false
type: string
- name: tag.creator
description: |-
The creator of tags.
2024-03-20 20:39:16 +08:00
Format: users/{id}
2024-03-18 23:23:53 +08:00
in: query
required: false
type: string
tags:
2024-03-18 23:23:53 +08:00
- TagService
post:
summary: UpsertTag upserts a tag.
operationId: TagService_UpsertTag
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2Tag'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-04-16 22:33:25 +08:00
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2UpsertTagRequest'
tags:
2024-03-18 23:23:53 +08:00
- TagService
/api/v2/tags/suggestion:
get:
summary: GetTagSuggestions gets tag suggestions from the user's memos.
operationId: TagService_GetTagSuggestions
2024-01-30 22:10:17 +08:00
responses:
"200":
2024-02-04 20:20:14 +08:00
description: A successful response.
2024-01-30 22:10:17 +08:00
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2GetTagSuggestionsResponse'
2024-01-30 22:10:17 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: user
description: |-
The creator of tags.
2024-03-20 20:39:16 +08:00
Format: users/{id}
2024-01-30 22:10:17 +08:00
in: query
required: false
type: string
tags:
2024-03-18 23:23:53 +08:00
- TagService
/api/v2/tags:batchUpsert:
post:
summary: BatchUpsertTag upserts multiple tags.
operationId: TagService_BatchUpsertTag
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
2024-04-16 22:33:25 +08:00
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2BatchUpsertTagRequest'
tags:
2024-03-18 23:23:53 +08:00
- TagService
/api/v2/tags:rename:
patch:
summary: |-
RenameTag renames a tag.
All related memos will be updated.
operationId: TagService_RenameTag
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-04-16 22:33:25 +08:00
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2RenameTagRequest'
tags:
2024-03-18 23:23:53 +08:00
- TagService
/api/v2/users:
get:
2024-03-18 23:23:53 +08:00
summary: ListUsers returns a list of users.
operationId: UserService_ListUsers
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListUsersResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- UserService
post:
summary: CreateUser creates a new user.
operationId: UserService_CreateUser
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: user
in: body
required: true
2024-03-18 23:23:53 +08:00
schema:
$ref: '#/definitions/v2User'
tags:
- UserService
/api/v2/users:search:
get:
summary: SearchUsers searches users by filter.
operationId: UserService_SearchUsers
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2SearchUsersResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: filter
2024-03-29 00:01:45 +08:00
description: |-
Filter is used to filter users returned in the list.
Format: "username == frank"
2024-03-18 23:23:53 +08:00
in: query
required: false
2024-02-06 20:55:27 +08:00
type: string
tags:
2024-03-18 23:23:53 +08:00
- UserService
/api/v2/webhooks:
2024-02-06 20:55:27 +08:00
get:
2024-03-18 23:23:53 +08:00
summary: ListWebhooks returns a list of webhooks.
operationId: WebhookService_ListWebhooks
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListWebhooksResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: creatorId
in: query
required: false
type: integer
format: int32
tags:
2024-03-18 23:23:53 +08:00
- WebhookService
post:
summary: CreateWebhook creates a new webhook.
operationId: WebhookService_CreateWebhook
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2Webhook'
2024-03-18 23:23:53 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/v2CreateWebhookRequest'
tags:
- WebhookService
/api/v2/webhooks/{id}:
get:
summary: GetWebhook returns a webhook by id.
operationId: WebhookService_GetWebhook
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2Webhook'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-02-06 20:55:27 +08:00
- name: id
in: path
required: true
2024-02-06 20:55:27 +08:00
type: integer
format: int32
tags:
2024-03-18 23:23:53 +08:00
- WebhookService
delete:
summary: DeleteWebhook deletes a webhook by id.
operationId: WebhookService_DeleteWebhook
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: id
in: path
required: true
type: integer
format: int32
2024-03-18 23:23:53 +08:00
tags:
- WebhookService
/api/v2/webhooks/{webhook.id}:
patch:
summary: UpdateWebhook updates a webhook.
operationId: WebhookService_UpdateWebhook
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2Webhook'
2024-03-18 23:23:53 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: webhook.id
in: path
required: true
type: integer
format: int32
- name: webhook
in: body
required: true
schema:
type: object
properties:
2024-03-18 23:23:53 +08:00
creatorId:
type: integer
format: int32
createdTime:
type: string
format: date-time
2024-03-18 23:23:53 +08:00
updatedTime:
type: string
2024-03-18 23:23:53 +08:00
format: date-time
rowStatus:
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2RowStatus'
2024-03-18 23:23:53 +08:00
name:
type: string
2024-03-18 23:23:53 +08:00
url:
type: string
tags:
2024-03-18 23:23:53 +08:00
- WebhookService
/api/v2/workspace/profile:
get:
2024-03-18 23:23:53 +08:00
summary: GetWorkspaceProfile returns the workspace profile.
operationId: WorkspaceService_GetWorkspaceProfile
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2WorkspaceProfile'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
2024-03-18 23:23:53 +08:00
- WorkspaceService
2024-04-12 08:32:54 +08:00
/api/v2/workspace/settings:
get:
summary: ListWorkspaceSetting returns the list of settings.
operationId: WorkspaceSettingService_ListWorkspaceSettings
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2ListWorkspaceSettingsResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- WorkspaceSettingService
2024-03-18 23:23:53 +08:00
/api/v2/workspace/{name}:
get:
summary: GetWorkspaceSetting returns the setting by name.
operationId: WorkspaceSettingService_GetWorkspaceSetting
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/apiv2WorkspaceSetting'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-18 23:23:53 +08:00
description: |-
The resource name of the workspace setting.
Format: settings/{setting}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: settings/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- WorkspaceSettingService
/api/v2/workspace/{setting.name}:
patch:
summary: SetWorkspaceSetting updates the setting.
operationId: WorkspaceSettingService_SetWorkspaceSetting
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/apiv2WorkspaceSetting'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: setting.name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
name is the name of the setting.
Format: settings/{setting}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: settings/[^/]+
- name: setting
description: setting is the setting to update.
in: body
required: true
2024-02-01 21:13:42 +08:00
schema:
2024-03-18 23:23:53 +08:00
type: object
properties:
generalSetting:
$ref: '#/definitions/apiv2WorkspaceGeneralSetting'
storageSetting:
$ref: '#/definitions/apiv2WorkspaceStorageSetting'
memoRelatedSetting:
$ref: '#/definitions/apiv2WorkspaceMemoRelatedSetting'
2024-03-18 23:23:53 +08:00
title: setting is the setting to update.
2024-02-01 21:13:42 +08:00
tags:
2024-03-18 23:23:53 +08:00
- WorkspaceSettingService
2024-03-30 14:58:47 +08:00
/api/v2/{identityProvider.name}:
patch:
summary: UpdateIdentityProvider updates an identity provider.
operationId: IdentityProviderService_UpdateIdentityProvider
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/apiv2IdentityProvider'
2024-03-30 14:58:47 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: identityProvider.name
description: |-
The name of the identityProvider.
Format: identityProviders/{id}
in: path
required: true
type: string
pattern: identityProviders/[^/]+
- name: identityProvider
description: The identityProvider to update.
in: body
required: true
schema:
type: object
properties:
type:
2024-04-13 10:50:25 +08:00
$ref: '#/definitions/apiv2IdentityProviderType'
2024-03-30 14:58:47 +08:00
title:
type: string
identifierFilter:
type: string
config:
2024-04-13 02:55:40 +08:00
$ref: '#/definitions/apiv2IdentityProviderConfig'
2024-03-30 14:58:47 +08:00
title: The identityProvider to update.
tags:
- IdentityProviderService
2024-03-18 23:23:53 +08:00
/api/v2/{inbox.name}:
patch:
2024-03-18 23:23:53 +08:00
summary: UpdateInbox updates an inbox.
operationId: InboxService_UpdateInbox
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Inbox'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: inbox.name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the inbox.
2024-03-30 14:58:47 +08:00
Format: inboxes/{id}
2024-03-18 23:23:53 +08:00
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: inboxes/[^/]+
- name: inbox
in: body
required: true
schema:
2024-03-18 23:23:53 +08:00
type: object
properties:
sender:
type: string
2024-03-30 14:58:47 +08:00
title: 'Format: users/{id}'
2024-03-18 23:23:53 +08:00
receiver:
type: string
2024-03-30 14:58:47 +08:00
title: 'Format: users/{id}'
2024-03-18 23:23:53 +08:00
status:
$ref: '#/definitions/v2InboxStatus'
createTime:
type: string
format: date-time
type:
$ref: '#/definitions/v2InboxType'
activityId:
type: integer
format: int32
tags:
2024-03-18 23:23:53 +08:00
- InboxService
/api/v2/{memo.name}:
patch:
summary: UpdateMemo updates a memo.
operationId: MemoService_UpdateMemo
2024-02-06 20:55:27 +08:00
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Memo'
2024-02-06 20:55:27 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: memo.name
description: |-
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
id is the system generated id.
2024-03-18 23:23:53 +08:00
in: path
required: true
type: string
pattern: memos/[^/]+
- name: memo
2024-02-06 20:55:27 +08:00
in: body
required: true
schema:
2024-03-18 23:23:53 +08:00
type: object
properties:
2024-03-20 20:39:16 +08:00
uid:
2024-03-18 23:23:53 +08:00
type: string
2024-03-20 20:39:16 +08:00
description: The user defined id of the memo.
2024-03-18 23:23:53 +08:00
rowStatus:
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2RowStatus'
2024-03-18 23:23:53 +08:00
creator:
type: string
title: |-
The name of the creator.
2024-03-20 20:39:16 +08:00
Format: users/{id}
2024-03-18 23:23:53 +08:00
createTime:
type: string
format: date-time
updateTime:
type: string
format: date-time
displayTime:
type: string
format: date-time
content:
type: string
visibility:
$ref: '#/definitions/v2Visibility'
pinned:
type: boolean
parentId:
type: integer
format: int32
readOnly: true
resources:
type: array
items:
type: object
$ref: '#/definitions/v2Resource'
readOnly: true
relations:
type: array
items:
type: object
$ref: '#/definitions/v2MemoRelation'
readOnly: true
reactions:
type: array
items:
type: object
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2Reaction'
2024-03-18 23:23:53 +08:00
readOnly: true
2024-02-06 20:55:27 +08:00
tags:
2024-03-18 23:23:53 +08:00
- MemoService
/api/v2/{name_1}:
2024-03-30 14:58:47 +08:00
get:
2024-04-16 22:33:25 +08:00
summary: GetIdentityProvider gets an identity provider.
2024-03-30 14:58:47 +08:00
operationId: IdentityProviderService_GetIdentityProvider
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/apiv2IdentityProvider'
2024-03-30 14:58:47 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_1
description: |-
The name of the identityProvider to get.
Format: identityProviders/{id}
in: path
required: true
type: string
pattern: identityProviders/[^/]+
tags:
- IdentityProviderService
delete:
summary: DeleteIdentityProvider deletes an identity provider.
operationId: IdentityProviderService_DeleteIdentityProvider
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
2024-03-30 14:58:47 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_1
description: |-
The name of the identityProvider to delete.
Format: identityProviders/{id}
in: path
required: true
type: string
pattern: identityProviders/[^/]+
tags:
- IdentityProviderService
/api/v2/{name_2}:
2024-03-18 12:56:52 +08:00
get:
2024-03-20 21:17:04 +08:00
summary: GetResource returns a resource by name.
operationId: ResourceService_GetResource
2024-03-18 12:56:52 +08:00
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Resource'
2024-03-18 12:56:52 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-30 14:58:47 +08:00
- name: name_2
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
2024-03-18 23:23:53 +08:00
in: path
required: true
2024-03-18 12:56:52 +08:00
type: string
2024-03-20 21:17:04 +08:00
pattern: resources/[^/]+
2024-03-18 12:56:52 +08:00
tags:
2024-03-20 21:17:04 +08:00
- ResourceService
2024-03-18 23:23:53 +08:00
delete:
summary: DeleteInbox deletes an inbox.
operationId: InboxService_DeleteInbox
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-30 14:58:47 +08:00
- name: name_2
2024-03-18 23:23:53 +08:00
description: |-
The name of the inbox to delete.
2024-03-30 14:58:47 +08:00
Format: inboxes/{id}
2024-03-18 23:23:53 +08:00
in: path
required: true
type: string
pattern: inboxes/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- InboxService
2024-03-30 14:58:47 +08:00
/api/v2/{name_3}:
2024-03-20 21:17:04 +08:00
get:
summary: GetMemo gets a memo.
operationId: MemoService_GetMemo
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Memo'
2024-03-20 21:17:04 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-30 14:58:47 +08:00
- name: name_3
2024-03-20 21:17:04 +08:00
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
pattern: memos/[^/]+
tags:
- MemoService
delete:
summary: DeleteResource deletes a resource by name.
operationId: ResourceService_DeleteResource
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
2024-03-20 21:17:04 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-30 14:58:47 +08:00
- name: name_3
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
2024-03-20 21:17:04 +08:00
in: path
required: true
type: string
pattern: resources/[^/]+
tags:
- ResourceService
2024-03-30 14:58:47 +08:00
/api/v2/{name_4}:
2024-03-18 23:23:53 +08:00
delete:
summary: DeleteMemo deletes a memo.
operationId: MemoService_DeleteMemo
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-30 14:58:47 +08:00
- name: name_4
2024-03-18 23:23:53 +08:00
description: |-
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
2024-03-18 23:23:53 +08:00
in: path
required: true
2024-03-18 23:23:53 +08:00
type: string
pattern: memos/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- MemoService
/api/v2/{name}:
get:
2024-03-18 23:23:53 +08:00
summary: GetUser gets a user by name.
operationId: UserService_GetUser
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: name
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: path
required: true
2024-03-18 23:23:53 +08:00
type: string
pattern: users/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- UserService
delete:
2024-03-18 23:23:53 +08:00
summary: DeleteUser deletes a user.
operationId: UserService_DeleteUser
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: name
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: path
required: true
2024-03-18 23:23:53 +08:00
type: string
pattern: users/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- UserService
/api/v2/{name}/access_tokens:
get:
summary: ListUserAccessTokens returns a list of access tokens for a user.
operationId: UserService_ListUserAccessTokens
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListUserAccessTokensResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: name
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: path
required: true
2024-03-18 23:23:53 +08:00
type: string
pattern: users/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- UserService
post:
summary: CreateUserAccessToken creates a new access token for a user.
operationId: UserService_CreateUserAccessToken
2024-01-28 07:35:42 +08:00
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2UserAccessToken'
2024-01-28 07:35:42 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
2024-03-18 23:23:53 +08:00
parameters:
- name: name
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
2024-03-18 23:23:53 +08:00
in: path
required: true
type: string
pattern: users/[^/]+
- name: body
in: body
required: true
schema:
$ref: '#/definitions/UserServiceCreateUserAccessTokenBody'
2024-01-28 07:35:42 +08:00
tags:
2024-03-18 23:23:53 +08:00
- UserService
/api/v2/{name}/access_tokens/{accessToken}:
delete:
summary: DeleteUserAccessToken deletes an access token for a user.
operationId: UserService_DeleteUserAccessToken
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
2024-03-18 23:23:53 +08:00
in: path
required: true
type: string
pattern: users/[^/]+
- name: accessToken
description: access_token is the access token to delete.
in: path
required: true
type: string
tags:
2024-03-18 23:23:53 +08:00
- UserService
/api/v2/{name}/comments:
get:
summary: ListMemoComments lists comments for a memo.
operationId: MemoService_ListMemoComments
2024-01-28 07:35:42 +08:00
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListMemoCommentsResponse'
2024-01-28 07:35:42 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
2024-01-28 07:35:42 +08:00
tags:
2024-03-18 23:23:53 +08:00
- MemoService
post:
summary: CreateMemoComment creates a comment for a memo.
operationId: MemoService_CreateMemoComment
2024-02-06 20:55:27 +08:00
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Memo'
2024-02-06 20:55:27 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
2024-02-06 20:55:27 +08:00
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
2024-04-27 22:02:15 +08:00
- name: comment
2024-04-16 22:33:25 +08:00
in: body
required: true
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2CreateMemoRequest'
2024-02-06 20:55:27 +08:00
tags:
2024-03-18 23:23:53 +08:00
- MemoService
/api/v2/{name}/reactions:
get:
summary: ListMemoReactions lists reactions for a memo.
operationId: MemoService_ListMemoReactions
2024-02-06 19:46:25 +08:00
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListMemoReactionsResponse'
2024-02-06 19:46:25 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
2024-03-18 23:23:53 +08:00
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
2024-02-06 19:46:25 +08:00
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
2024-02-06 19:46:25 +08:00
tags:
2024-03-18 23:23:53 +08:00
- MemoService
post:
summary: UpsertMemoReaction upserts a reaction for a memo.
operationId: MemoService_UpsertMemoReaction
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Reaction'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
2024-04-16 22:33:25 +08:00
- name: body
in: body
required: true
schema:
$ref: '#/definitions/MemoServiceUpsertMemoReactionBody'
tags:
2024-03-18 23:23:53 +08:00
- MemoService
/api/v2/{name}/relations:
get:
2024-03-18 23:23:53 +08:00
summary: ListMemoRelations lists relations for a memo.
operationId: MemoService_ListMemoRelations
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListMemoRelationsResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
tags:
2024-03-18 23:23:53 +08:00
- MemoService
2024-04-16 22:33:25 +08:00
patch:
2024-03-18 23:23:53 +08:00
summary: SetMemoRelations sets relations for a memo.
operationId: MemoService_SetMemoRelations
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
- name: body
in: body
required: true
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/MemoServiceSetMemoRelationsBody'
tags:
2024-03-18 23:23:53 +08:00
- MemoService
/api/v2/{name}/resources:
get:
summary: ListMemoResources lists resources for a memo.
operationId: MemoService_ListMemoResources
responses:
"200":
description: A successful response.
schema:
2024-03-18 23:23:53 +08:00
$ref: '#/definitions/v2ListMemoResourcesResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
tags:
- MemoService
2024-04-16 22:33:25 +08:00
patch:
2024-03-18 23:23:53 +08:00
summary: SetMemoResources sets resources for a memo.
operationId: MemoService_SetMemoResources
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
type: object
properties: {}
2024-03-18 23:23:53 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: |-
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
in: path
required: true
type: string
2024-03-18 23:23:53 +08:00
pattern: memos/[^/]+
- name: body
in: body
required: true
schema:
$ref: '#/definitions/MemoServiceSetMemoResourcesBody'
tags:
2024-03-18 23:23:53 +08:00
- MemoService
/api/v2/{name}/setting:
get:
2024-02-01 21:26:09 +08:00
summary: GetUserSetting gets the setting of a user.
operationId: UserService_GetUserSetting
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/apiv2UserSetting'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
2024-03-13 20:25:27 +08:00
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: path
required: true
type: string
pattern: users/[^/]+
tags:
- UserService
2024-03-20 21:17:04 +08:00
/api/v2/{resource.name}:
patch:
summary: UpdateResource updates a resource.
operationId: ResourceService_UpdateResource
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Resource'
2024-03-20 21:17:04 +08:00
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: resource.name
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
in: path
required: true
type: string
pattern: resources/[^/]+
- name: resource
in: body
required: true
schema:
type: object
properties:
uid:
type: string
description: The user defined id of the resource.
createTime:
type: string
format: date-time
readOnly: true
2024-03-20 21:17:04 +08:00
filename:
type: string
content:
type: string
format: byte
2024-03-20 21:17:04 +08:00
externalLink:
type: string
type:
type: string
size:
type: string
format: int64
memo:
type: string
title: |-
The related memo.
Format: memos/{id}
2024-03-20 21:17:04 +08:00
tags:
- ResourceService
/api/v2/{setting.name}:
patch:
2024-02-01 21:26:09 +08:00
summary: UpdateUserSetting updates the setting of a user.
operationId: UserService_UpdateUserSetting
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/apiv2UserSetting'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: setting.name
2024-03-13 20:25:27 +08:00
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: path
required: true
type: string
pattern: users/[^/]+/setting
- name: setting
in: body
required: true
schema:
type: object
properties:
locale:
type: string
description: The preferred locale of the user.
appearance:
type: string
description: The preferred appearance of the user.
memoVisibility:
type: string
description: The default visibility of the memo.
tags:
- UserService
/api/v2/{user.name}:
patch:
summary: UpdateUser updates a user.
operationId: UserService_UpdateUser
responses:
"200":
description: A successful response.
schema:
2024-04-27 23:14:58 +08:00
$ref: '#/definitions/v2User'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: user.name
2024-03-13 20:25:27 +08:00
description: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
in: path
required: true
type: string
pattern: users/[^/]+
- name: user
in: body
required: true
schema:
type: object
properties:
id:
type: integer
format: int32
2024-03-18 12:56:52 +08:00
description: The system generated uid of the user.
role:
$ref: '#/definitions/UserRole'
username:
type: string
email:
type: string
nickname:
type: string
avatarUrl:
type: string
2024-03-13 22:30:59 +08:00
description:
type: string
password:
type: string
rowStatus:
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2RowStatus'
createTime:
type: string
format: date-time
updateTime:
type: string
format: date-time
tags:
- UserService
2024-02-06 20:55:27 +08:00
/v2/activities/{id}:
get:
2024-02-01 21:26:09 +08:00
summary: GetActivity returns the activity with the given id.
operationId: ActivityService_GetActivity
responses:
"200":
description: A successful response.
schema:
2024-04-27 22:02:15 +08:00
$ref: '#/definitions/v2Activity'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: id
2024-04-16 22:33:25 +08:00
description: The system-generated unique identifier for the activity.
2024-02-06 20:55:27 +08:00
in: path
required: true
type: integer
format: int32
tags:
- ActivityService
definitions:
MemoServiceSetMemoRelationsBody:
type: object
properties:
relations:
type: array
items:
type: object
$ref: '#/definitions/v2MemoRelation'
MemoServiceSetMemoResourcesBody:
type: object
properties:
resources:
type: array
items:
type: object
$ref: '#/definitions/v2Resource'
2024-04-16 22:33:25 +08:00
MemoServiceUpsertMemoReactionBody:
type: object
properties:
reaction:
$ref: '#/definitions/v2Reaction'
UserRole:
type: string
enum:
- ROLE_UNSPECIFIED
- HOST
- ADMIN
- USER
default: ROLE_UNSPECIFIED
UserServiceCreateUserAccessTokenBody:
type: object
properties:
description:
type: string
expiresAt:
type: string
format: date-time
apiv2ActivityMemoCommentPayload:
type: object
properties:
memoId:
type: integer
format: int32
2024-04-16 22:33:25 +08:00
description: The memo id of comment.
relatedMemoId:
type: integer
format: int32
2024-04-16 22:33:25 +08:00
description: The memo id of related memo.
description: ActivityMemoCommentPayload represents the payload of a memo comment activity.
apiv2ActivityPayload:
type: object
properties:
memoComment:
$ref: '#/definitions/apiv2ActivityMemoCommentPayload'
versionUpdate:
$ref: '#/definitions/apiv2ActivityVersionUpdatePayload'
apiv2ActivityVersionUpdatePayload:
type: object
properties:
version:
type: string
2024-04-16 22:33:25 +08:00
description: The updated version of memos.
2024-04-13 02:55:40 +08:00
apiv2FieldMapping:
type: object
properties:
identifier:
type: string
displayName:
type: string
email:
type: string
2024-04-13 10:50:25 +08:00
apiv2IdentityProvider:
type: object
properties:
name:
type: string
title: |-
The name of the identityProvider.
Format: identityProviders/{id}
type:
$ref: '#/definitions/apiv2IdentityProviderType'
title:
type: string
identifierFilter:
type: string
config:
$ref: '#/definitions/apiv2IdentityProviderConfig'
2024-04-13 02:55:40 +08:00
apiv2IdentityProviderConfig:
type: object
properties:
2024-04-13 10:50:25 +08:00
oauth2Config:
2024-04-13 02:55:40 +08:00
$ref: '#/definitions/apiv2OAuth2Config'
2024-04-13 10:50:25 +08:00
apiv2IdentityProviderType:
type: string
enum:
- TYPE_UNSPECIFIED
- OAUTH2
default: TYPE_UNSPECIFIED
2024-04-13 02:55:40 +08:00
apiv2OAuth2Config:
type: object
properties:
clientId:
type: string
clientSecret:
type: string
authUrl:
type: string
tokenUrl:
type: string
userInfoUrl:
type: string
scopes:
type: array
items:
type: string
fieldMapping:
$ref: '#/definitions/apiv2FieldMapping'
apiv2S3Config:
type: object
properties:
endPoint:
type: string
path:
type: string
region:
type: string
accessKey:
type: string
secretKey:
type: string
bucket:
type: string
urlPrefix:
type: string
urlSuffix:
type: string
preSign:
type: boolean
apiv2Storage:
type: object
properties:
id:
type: integer
format: int32
title:
type: string
type:
$ref: '#/definitions/apiv2StorageType'
config:
$ref: '#/definitions/apiv2StorageConfig'
apiv2StorageConfig:
type: object
properties:
s3Config:
$ref: '#/definitions/apiv2S3Config'
apiv2StorageType:
type: string
enum:
- TYPE_UNSPECIFIED
- S3
default: TYPE_UNSPECIFIED
apiv2UserSetting:
type: object
properties:
name:
type: string
2024-03-13 20:25:27 +08:00
title: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
locale:
type: string
description: The preferred locale of the user.
appearance:
type: string
description: The preferred appearance of the user.
memoVisibility:
type: string
description: The default visibility of the memo.
2024-04-12 08:32:54 +08:00
apiv2WorkspaceCustomProfile:
type: object
properties:
title:
type: string
description:
type: string
logoUrl:
type: string
locale:
type: string
appearance:
type: string
apiv2WorkspaceGeneralSetting:
type: object
properties:
instanceUrl:
type: string
description: instance_url is the instance URL.
disallowSignup:
type: boolean
description: disallow_signup is the flag to disallow signup.
disallowPasswordLogin:
type: boolean
description: disallow_password_login is the flag to disallow password login.
additionalScript:
type: string
description: additional_script is the additional script.
additionalStyle:
type: string
description: additional_style is the additional style.
2024-04-12 08:32:54 +08:00
customProfile:
$ref: '#/definitions/apiv2WorkspaceCustomProfile'
description: custom_profile is the custom profile.
apiv2WorkspaceMemoRelatedSetting:
type: object
properties:
disallowPublicVisible:
type: boolean
description: disallow_public_share disallows set memo as public visible.
displayWithUpdateTime:
type: boolean
description: display_with_update_time orders and displays memo with update time.
apiv2WorkspaceSetting:
type: object
properties:
name:
type: string
2024-03-13 20:25:27 +08:00
title: |-
name is the name of the setting.
Format: settings/{setting}
generalSetting:
$ref: '#/definitions/apiv2WorkspaceGeneralSetting'
storageSetting:
$ref: '#/definitions/apiv2WorkspaceStorageSetting'
memoRelatedSetting:
$ref: '#/definitions/apiv2WorkspaceMemoRelatedSetting'
apiv2WorkspaceStorageSetting:
type: object
properties:
storageType:
$ref: '#/definitions/apiv2WorkspaceStorageSettingStorageType'
description: storage_type is the storage type.
2024-04-12 08:32:54 +08:00
activedExternalStorageId:
type: integer
format: int32
description: The id of actived external storage.
2024-04-13 02:08:35 +08:00
localStoragePathTemplate:
type: string
title: |-
2024-04-13 02:08:35 +08:00
The template of local storage path.
e.g. assets/{timestamp}_{filename}
uploadSizeLimitMb:
type: string
format: int64
description: The max upload size in megabytes.
apiv2WorkspaceStorageSettingStorageType:
type: string
enum:
- STORAGE_TYPE_UNSPECIFIED
- STORAGE_TYPE_DATABASE
- STORAGE_TYPE_LOCAL
- STORAGE_TYPE_EXTERNAL
default: STORAGE_TYPE_UNSPECIFIED
description: |2-
- STORAGE_TYPE_DATABASE: STORAGE_TYPE_DATABASE is the database storage type.
- STORAGE_TYPE_LOCAL: STORAGE_TYPE_LOCAL is the local storage type.
- STORAGE_TYPE_EXTERNAL: STORAGE_TYPE_EXTERNAL is the external storage type.
googlerpcStatus:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
$ref: '#/definitions/protobufAny'
protobufAny:
type: object
properties:
'@type':
type: string
additionalProperties: {}
v2Activity:
type: object
properties:
id:
type: integer
format: int32
2024-04-16 22:33:25 +08:00
description: The system-generated unique identifier for the activity.
creatorId:
type: integer
format: int32
2024-04-16 22:33:25 +08:00
description: The system-generated unique identifier for the user who created the activity.
type:
type: string
2024-04-16 22:33:25 +08:00
description: The type of the activity.
level:
type: string
2024-04-16 22:33:25 +08:00
description: The level of the activity.
createTime:
type: string
format: date-time
2024-04-16 22:33:25 +08:00
description: The create time of the activity.
readOnly: true
payload:
$ref: '#/definitions/apiv2ActivityPayload'
2024-04-16 22:33:25 +08:00
description: The payload of the activity.
v2BatchUpsertTagRequest:
type: object
properties:
requests:
type: array
items:
type: object
$ref: '#/definitions/v2UpsertTagRequest'
v2CreateMemoRequest:
type: object
properties:
content:
type: string
visibility:
$ref: '#/definitions/v2Visibility'
2024-04-13 02:55:40 +08:00
v2CreateStorageRequest:
type: object
properties:
storage:
$ref: '#/definitions/apiv2Storage'
v2CreateStorageResponse:
type: object
properties:
storage:
$ref: '#/definitions/apiv2Storage'
v2CreateWebhookRequest:
type: object
properties:
name:
type: string
url:
type: string
2024-04-13 02:55:40 +08:00
v2DeleteStorageResponse:
type: object
2024-04-16 22:33:25 +08:00
v2ExportMemosRequest:
type: object
properties:
filter:
type: string
title: Same as ListMemosRequest.filter
2024-01-30 22:10:17 +08:00
v2ExportMemosResponse:
type: object
properties:
2024-02-04 20:20:14 +08:00
content:
2024-01-30 22:10:17 +08:00
type: string
format: byte
v2GetLinkMetadataResponse:
type: object
properties:
2024-03-16 23:35:36 +08:00
linkMetadata:
2024-03-13 20:25:27 +08:00
$ref: '#/definitions/v2LinkMetadata'
2024-04-13 02:55:40 +08:00
v2GetStorageResponse:
type: object
properties:
storage:
$ref: '#/definitions/apiv2Storage'
v2GetTagSuggestionsResponse:
type: object
properties:
tags:
type: array
items:
type: string
v2GetUserMemosStatsResponse:
type: object
properties:
stats:
type: object
additionalProperties:
type: integer
format: int32
2024-03-13 20:25:27 +08:00
description: |-
stats is the stats of memo creating/updating activities.
key is the year-month-day string. e.g. "2020-01-01".
v2Inbox:
type: object
properties:
name:
type: string
2024-03-13 20:25:27 +08:00
title: |-
The name of the inbox.
2024-03-30 14:58:47 +08:00
Format: inboxes/{id}
sender:
type: string
2024-03-30 14:58:47 +08:00
title: 'Format: users/{id}'
receiver:
type: string
2024-03-30 14:58:47 +08:00
title: 'Format: users/{id}'
status:
$ref: '#/definitions/v2InboxStatus'
createTime:
type: string
format: date-time
type:
$ref: '#/definitions/v2InboxType'
activityId:
type: integer
format: int32
v2InboxStatus:
type: string
enum:
- STATUS_UNSPECIFIED
- UNREAD
- ARCHIVED
default: STATUS_UNSPECIFIED
v2InboxType:
type: string
enum:
- TYPE_UNSPECIFIED
- TYPE_MEMO_COMMENT
- TYPE_VERSION_UPDATE
default: TYPE_UNSPECIFIED
2024-03-13 20:25:27 +08:00
v2LinkMetadata:
type: object
properties:
title:
type: string
description:
type: string
image:
type: string
2024-03-30 14:58:47 +08:00
v2ListIdentityProvidersResponse:
type: object
properties:
identityProviders:
type: array
items:
type: object
2024-04-13 10:50:25 +08:00
$ref: '#/definitions/apiv2IdentityProvider'
v2ListInboxesResponse:
type: object
properties:
inboxes:
type: array
items:
type: object
$ref: '#/definitions/v2Inbox'
v2ListMemoCommentsResponse:
type: object
properties:
memos:
type: array
items:
type: object
$ref: '#/definitions/v2Memo'
2024-02-08 11:54:59 +08:00
v2ListMemoReactionsResponse:
type: object
properties:
reactions:
type: array
items:
type: object
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2Reaction'
v2ListMemoRelationsResponse:
type: object
properties:
relations:
type: array
items:
type: object
$ref: '#/definitions/v2MemoRelation'
v2ListMemoResourcesResponse:
type: object
properties:
resources:
type: array
items:
type: object
$ref: '#/definitions/v2Resource'
v2ListMemosResponse:
type: object
properties:
memos:
type: array
items:
type: object
$ref: '#/definitions/v2Memo'
nextPageToken:
type: string
2024-03-13 20:25:27 +08:00
description: |-
A token, which can be sent as `page_token` to retrieve the next page.
If this field is omitted, there are no subsequent pages.
v2ListResourcesResponse:
type: object
properties:
resources:
type: array
items:
type: object
$ref: '#/definitions/v2Resource'
2024-04-13 02:55:40 +08:00
v2ListStoragesResponse:
type: object
properties:
storages:
type: array
items:
type: object
$ref: '#/definitions/apiv2Storage'
v2ListTagsResponse:
type: object
properties:
tags:
type: array
items:
type: object
$ref: '#/definitions/v2Tag'
v2ListUserAccessTokensResponse:
type: object
properties:
accessTokens:
type: array
items:
type: object
$ref: '#/definitions/v2UserAccessToken'
v2ListUsersResponse:
type: object
properties:
users:
type: array
items:
type: object
$ref: '#/definitions/v2User'
v2ListWebhooksResponse:
type: object
properties:
webhooks:
type: array
items:
type: object
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2Webhook'
2024-04-12 08:32:54 +08:00
v2ListWorkspaceSettingsResponse:
type: object
properties:
settings:
type: array
items:
type: object
$ref: '#/definitions/apiv2WorkspaceSetting'
v2Memo:
type: object
properties:
name:
type: string
2024-03-20 20:39:16 +08:00
description: |-
2024-03-18 23:23:53 +08:00
The name of the memo.
2024-03-20 20:39:16 +08:00
Format: memos/{id}
id is the system generated id.
uid:
2024-03-18 23:23:53 +08:00
type: string
2024-03-20 20:39:16 +08:00
description: The user defined id of the memo.
rowStatus:
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2RowStatus'
creator:
type: string
2024-03-13 20:25:27 +08:00
title: |-
The name of the creator.
2024-03-20 20:39:16 +08:00
Format: users/{id}
createTime:
type: string
format: date-time
updateTime:
type: string
format: date-time
displayTime:
type: string
format: date-time
content:
type: string
visibility:
$ref: '#/definitions/v2Visibility'
pinned:
type: boolean
parentId:
type: integer
format: int32
readOnly: true
resources:
type: array
items:
type: object
$ref: '#/definitions/v2Resource'
readOnly: true
relations:
type: array
items:
type: object
$ref: '#/definitions/v2MemoRelation'
readOnly: true
2024-02-08 11:54:59 +08:00
reactions:
type: array
items:
type: object
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2Reaction'
2024-02-08 11:54:59 +08:00
readOnly: true
v2MemoRelation:
type: object
properties:
2024-03-19 21:53:44 +08:00
memo:
type: string
title: |-
The name of memo.
Format: "memos/{uid}"
relatedMemo:
type: string
title: |-
The name of related memo.
Format: "memos/{uid}"
type:
$ref: '#/definitions/v2MemoRelationType'
v2MemoRelationType:
type: string
enum:
- TYPE_UNSPECIFIED
- REFERENCE
- COMMENT
default: TYPE_UNSPECIFIED
2024-04-13 11:54:37 +08:00
v2Reaction:
type: object
properties:
id:
type: integer
format: int32
creator:
type: string
title: |-
The name of the creator.
Format: users/{id}
contentId:
type: string
reactionType:
$ref: '#/definitions/v2ReactionType'
v2ReactionType:
type: string
enum:
- TYPE_UNSPECIFIED
- THUMBS_UP
- THUMBS_DOWN
- HEART
- FIRE
- CLAPPING_HANDS
- LAUGH
- OK_HAND
- ROCKET
- EYES
- THINKING_FACE
- CLOWN_FACE
- QUESTION_MARK
default: TYPE_UNSPECIFIED
2024-04-16 22:33:25 +08:00
v2RenameTagRequest:
type: object
properties:
user:
type: string
title: |-
The creator of tags.
Format: users/{id}
oldName:
type: string
newName:
type: string
v2Resource:
type: object
properties:
name:
type: string
2024-03-20 21:17:04 +08:00
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
uid:
type: string
description: The user defined id of the resource.
createTime:
type: string
format: date-time
readOnly: true
filename:
type: string
content:
type: string
format: byte
externalLink:
type: string
type:
type: string
size:
type: string
format: int64
memo:
type: string
title: |-
The related memo.
Format: memos/{id}
2024-04-13 11:54:37 +08:00
v2RowStatus:
type: string
enum:
- ROW_STATUS_UNSPECIFIED
- ACTIVE
- ARCHIVED
default: ROW_STATUS_UNSPECIFIED
2024-03-18 23:23:53 +08:00
v2SearchMemosResponse:
type: object
properties:
memos:
type: array
items:
type: object
$ref: '#/definitions/v2Memo'
2024-03-20 21:17:04 +08:00
v2SearchResourcesResponse:
type: object
properties:
resources:
type: array
items:
type: object
$ref: '#/definitions/v2Resource'
2024-03-18 12:56:52 +08:00
v2SearchUsersResponse:
type: object
properties:
users:
type: array
items:
type: object
$ref: '#/definitions/v2User'
v2Tag:
type: object
properties:
name:
type: string
creator:
type: string
2024-03-13 20:25:27 +08:00
title: |-
The creator of tags.
2024-03-20 20:39:16 +08:00
Format: users/{id}
2024-04-13 02:55:40 +08:00
v2UpdateStorageResponse:
type: object
properties:
storage:
$ref: '#/definitions/apiv2Storage'
2024-02-01 21:13:42 +08:00
v2UpsertTagRequest:
type: object
properties:
name:
type: string
v2User:
type: object
properties:
name:
type: string
2024-03-13 20:25:27 +08:00
title: |-
The name of the user.
2024-03-20 20:39:16 +08:00
Format: users/{id}
id:
type: integer
format: int32
2024-03-18 12:56:52 +08:00
description: The system generated uid of the user.
role:
$ref: '#/definitions/UserRole'
username:
type: string
email:
type: string
nickname:
type: string
avatarUrl:
type: string
2024-03-13 22:30:59 +08:00
description:
type: string
password:
type: string
rowStatus:
2024-04-13 11:54:37 +08:00
$ref: '#/definitions/v2RowStatus'
createTime:
type: string
format: date-time
updateTime:
type: string
format: date-time
v2UserAccessToken:
type: object
properties:
accessToken:
type: string
description:
type: string
issuedAt:
type: string
format: date-time
expiresAt:
type: string
format: date-time
v2Visibility:
type: string
enum:
- VISIBILITY_UNSPECIFIED
- PRIVATE
- PROTECTED
- PUBLIC
default: VISIBILITY_UNSPECIFIED
2024-04-13 11:54:37 +08:00
v2Webhook:
type: object
properties:
id:
type: integer
format: int32
creatorId:
type: integer
format: int32
createdTime:
type: string
format: date-time
updatedTime:
type: string
format: date-time
rowStatus:
$ref: '#/definitions/v2RowStatus'
name:
type: string
url:
type: string
2024-01-28 07:35:42 +08:00
v2WorkspaceProfile:
type: object
properties:
2024-03-21 21:39:34 +08:00
owner:
type: string
title: |-
The name of instance owner.
2024-03-21 21:39:34 +08:00
Format: "users/{id}"
2024-01-28 07:35:42 +08:00
version:
type: string
title: version is the current version of instance
2024-01-28 07:35:42 +08:00
mode:
type: string
description: mode is the instance mode (e.g. "prod", "dev" or "demo").