apidocs.swagger.yaml 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145
  1. swagger: "2.0"
  2. info:
  3. title: api/v1/activity_service.proto
  4. version: version not set
  5. tags:
  6. - name: ActivityService
  7. - name: UserService
  8. - name: AuthService
  9. - name: IdentityProviderService
  10. - name: InboxService
  11. - name: MarkdownService
  12. - name: ResourceService
  13. - name: MemoService
  14. - name: WebhookService
  15. - name: WorkspaceService
  16. - name: WorkspaceSettingService
  17. consumes:
  18. - application/json
  19. produces:
  20. - application/json
  21. paths:
  22. /api/v1/activities/{id}:
  23. get:
  24. summary: GetActivity returns the activity with the given id.
  25. operationId: ActivityService_GetActivity
  26. responses:
  27. "200":
  28. description: A successful response.
  29. schema:
  30. $ref: '#/definitions/v1Activity'
  31. default:
  32. description: An unexpected error response.
  33. schema:
  34. $ref: '#/definitions/googlerpcStatus'
  35. parameters:
  36. - name: id
  37. description: The system-generated unique identifier for the activity.
  38. in: path
  39. required: true
  40. type: integer
  41. format: int32
  42. tags:
  43. - ActivityService
  44. /api/v1/auth/signin:
  45. post:
  46. summary: SignIn signs in the user with the given username and password.
  47. operationId: AuthService_SignIn
  48. responses:
  49. "200":
  50. description: A successful response.
  51. schema:
  52. $ref: '#/definitions/v1User'
  53. default:
  54. description: An unexpected error response.
  55. schema:
  56. $ref: '#/definitions/googlerpcStatus'
  57. parameters:
  58. - name: username
  59. description: The username to sign in with.
  60. in: query
  61. required: false
  62. type: string
  63. - name: password
  64. description: The password to sign in with.
  65. in: query
  66. required: false
  67. type: string
  68. - name: neverExpire
  69. description: Whether the session should never expire.
  70. in: query
  71. required: false
  72. type: boolean
  73. tags:
  74. - AuthService
  75. /api/v1/auth/signin/sso:
  76. post:
  77. summary: SignInWithSSO signs in the user with the given SSO code.
  78. operationId: AuthService_SignInWithSSO
  79. responses:
  80. "200":
  81. description: A successful response.
  82. schema:
  83. $ref: '#/definitions/v1User'
  84. default:
  85. description: An unexpected error response.
  86. schema:
  87. $ref: '#/definitions/googlerpcStatus'
  88. parameters:
  89. - name: idpId
  90. description: The ID of the SSO provider.
  91. in: query
  92. required: false
  93. type: integer
  94. format: int32
  95. - name: code
  96. description: The code to sign in with.
  97. in: query
  98. required: false
  99. type: string
  100. - name: redirectUri
  101. description: The redirect URI.
  102. in: query
  103. required: false
  104. type: string
  105. tags:
  106. - AuthService
  107. /api/v1/auth/signout:
  108. post:
  109. summary: SignOut signs out the user.
  110. operationId: AuthService_SignOut
  111. responses:
  112. "200":
  113. description: A successful response.
  114. schema:
  115. type: object
  116. properties: {}
  117. default:
  118. description: An unexpected error response.
  119. schema:
  120. $ref: '#/definitions/googlerpcStatus'
  121. tags:
  122. - AuthService
  123. /api/v1/auth/signup:
  124. post:
  125. summary: SignUp signs up the user with the given username and password.
  126. operationId: AuthService_SignUp
  127. responses:
  128. "200":
  129. description: A successful response.
  130. schema:
  131. $ref: '#/definitions/v1User'
  132. default:
  133. description: An unexpected error response.
  134. schema:
  135. $ref: '#/definitions/googlerpcStatus'
  136. parameters:
  137. - name: username
  138. description: The username to sign up with.
  139. in: query
  140. required: false
  141. type: string
  142. - name: password
  143. description: The password to sign up with.
  144. in: query
  145. required: false
  146. type: string
  147. tags:
  148. - AuthService
  149. /api/v1/auth/status:
  150. post:
  151. summary: GetAuthStatus returns the current auth status of the user.
  152. operationId: AuthService_GetAuthStatus
  153. responses:
  154. "200":
  155. description: A successful response.
  156. schema:
  157. $ref: '#/definitions/v1User'
  158. default:
  159. description: An unexpected error response.
  160. schema:
  161. $ref: '#/definitions/googlerpcStatus'
  162. tags:
  163. - AuthService
  164. /api/v1/identityProviders:
  165. get:
  166. summary: ListIdentityProviders lists identity providers.
  167. operationId: IdentityProviderService_ListIdentityProviders
  168. responses:
  169. "200":
  170. description: A successful response.
  171. schema:
  172. $ref: '#/definitions/v1ListIdentityProvidersResponse'
  173. default:
  174. description: An unexpected error response.
  175. schema:
  176. $ref: '#/definitions/googlerpcStatus'
  177. tags:
  178. - IdentityProviderService
  179. post:
  180. summary: CreateIdentityProvider creates an identity provider.
  181. operationId: IdentityProviderService_CreateIdentityProvider
  182. responses:
  183. "200":
  184. description: A successful response.
  185. schema:
  186. $ref: '#/definitions/apiv1IdentityProvider'
  187. default:
  188. description: An unexpected error response.
  189. schema:
  190. $ref: '#/definitions/googlerpcStatus'
  191. parameters:
  192. - name: identityProvider
  193. description: The identityProvider to create.
  194. in: body
  195. required: true
  196. schema:
  197. $ref: '#/definitions/apiv1IdentityProvider'
  198. tags:
  199. - IdentityProviderService
  200. /api/v1/inboxes:
  201. get:
  202. summary: ListInboxes lists inboxes for a user.
  203. operationId: InboxService_ListInboxes
  204. responses:
  205. "200":
  206. description: A successful response.
  207. schema:
  208. $ref: '#/definitions/v1ListInboxesResponse'
  209. default:
  210. description: An unexpected error response.
  211. schema:
  212. $ref: '#/definitions/googlerpcStatus'
  213. parameters:
  214. - name: user
  215. description: 'Format: users/{id}'
  216. in: query
  217. required: false
  218. type: string
  219. tags:
  220. - InboxService
  221. /api/v1/markdown/link:metadata:
  222. get:
  223. summary: GetLinkMetadata returns metadata for a given link.
  224. operationId: MarkdownService_GetLinkMetadata
  225. responses:
  226. "200":
  227. description: A successful response.
  228. schema:
  229. $ref: '#/definitions/v1LinkMetadata'
  230. default:
  231. description: An unexpected error response.
  232. schema:
  233. $ref: '#/definitions/googlerpcStatus'
  234. parameters:
  235. - name: link
  236. in: query
  237. required: false
  238. type: string
  239. tags:
  240. - MarkdownService
  241. /api/v1/markdown/parse:
  242. post:
  243. summary: Parses the given markdown content and returns a list of nodes.
  244. operationId: MarkdownService_ParseMarkdown
  245. responses:
  246. "200":
  247. description: A successful response.
  248. schema:
  249. $ref: '#/definitions/v1ParseMarkdownResponse'
  250. default:
  251. description: An unexpected error response.
  252. schema:
  253. $ref: '#/definitions/googlerpcStatus'
  254. parameters:
  255. - name: body
  256. in: body
  257. required: true
  258. schema:
  259. $ref: '#/definitions/v1ParseMarkdownRequest'
  260. tags:
  261. - MarkdownService
  262. /api/v1/markdown:restore:
  263. post:
  264. summary: Restores the given nodes to markdown content.
  265. operationId: MarkdownService_RestoreMarkdown
  266. responses:
  267. "200":
  268. description: A successful response.
  269. schema:
  270. $ref: '#/definitions/v1RestoreMarkdownResponse'
  271. default:
  272. description: An unexpected error response.
  273. schema:
  274. $ref: '#/definitions/googlerpcStatus'
  275. parameters:
  276. - name: body
  277. in: body
  278. required: true
  279. schema:
  280. $ref: '#/definitions/v1RestoreMarkdownRequest'
  281. tags:
  282. - MarkdownService
  283. /api/v1/memos:
  284. get:
  285. summary: ListMemos lists memos with pagination and filter.
  286. operationId: MemoService_ListMemos
  287. responses:
  288. "200":
  289. description: A successful response.
  290. schema:
  291. $ref: '#/definitions/v1ListMemosResponse'
  292. default:
  293. description: An unexpected error response.
  294. schema:
  295. $ref: '#/definitions/googlerpcStatus'
  296. parameters:
  297. - name: pageSize
  298. description: The maximum number of memos to return.
  299. in: query
  300. required: false
  301. type: integer
  302. format: int32
  303. - name: pageToken
  304. description: |-
  305. A page token, received from a previous `ListMemos` call.
  306. Provide this to retrieve the subsequent page.
  307. in: query
  308. required: false
  309. type: string
  310. - name: filter
  311. description: |-
  312. Filter is used to filter memos returned in the list.
  313. Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
  314. in: query
  315. required: false
  316. type: string
  317. tags:
  318. - MemoService
  319. post:
  320. summary: CreateMemo creates a memo.
  321. operationId: MemoService_CreateMemo
  322. responses:
  323. "200":
  324. description: A successful response.
  325. schema:
  326. $ref: '#/definitions/v1Memo'
  327. default:
  328. description: An unexpected error response.
  329. schema:
  330. $ref: '#/definitions/googlerpcStatus'
  331. parameters:
  332. - name: body
  333. in: body
  334. required: true
  335. schema:
  336. $ref: '#/definitions/v1CreateMemoRequest'
  337. tags:
  338. - MemoService
  339. /api/v1/memos/stats:
  340. get:
  341. summary: GetUserMemosStats gets stats of memos for a user.
  342. operationId: MemoService_GetUserMemosStats
  343. responses:
  344. "200":
  345. description: A successful response.
  346. schema:
  347. $ref: '#/definitions/v1GetUserMemosStatsResponse'
  348. default:
  349. description: An unexpected error response.
  350. schema:
  351. $ref: '#/definitions/googlerpcStatus'
  352. parameters:
  353. - name: name
  354. description: |-
  355. name is the name of the user to get stats for.
  356. Format: users/{id}
  357. in: query
  358. required: false
  359. type: string
  360. - name: timezone
  361. description: |-
  362. timezone location
  363. Format: uses tz identifier
  364. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  365. in: query
  366. required: false
  367. type: string
  368. - name: filter
  369. description: Same as ListMemosRequest.filter
  370. in: query
  371. required: false
  372. type: string
  373. tags:
  374. - MemoService
  375. /api/v1/memos:export:
  376. post:
  377. summary: ExportMemos exports memos.
  378. operationId: MemoService_ExportMemos
  379. responses:
  380. "200":
  381. description: A successful response.
  382. schema:
  383. $ref: '#/definitions/v1ExportMemosResponse'
  384. default:
  385. description: An unexpected error response.
  386. schema:
  387. $ref: '#/definitions/googlerpcStatus'
  388. parameters:
  389. - name: body
  390. in: body
  391. required: true
  392. schema:
  393. $ref: '#/definitions/v1ExportMemosRequest'
  394. tags:
  395. - MemoService
  396. /api/v1/memos:search:
  397. get:
  398. summary: SearchMemos searches memos.
  399. operationId: MemoService_SearchMemos
  400. responses:
  401. "200":
  402. description: A successful response.
  403. schema:
  404. $ref: '#/definitions/v1SearchMemosResponse'
  405. default:
  406. description: An unexpected error response.
  407. schema:
  408. $ref: '#/definitions/googlerpcStatus'
  409. parameters:
  410. - name: filter
  411. description: |-
  412. Filter is used to filter memos returned.
  413. Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
  414. in: query
  415. required: false
  416. type: string
  417. tags:
  418. - MemoService
  419. /api/v1/reactions/{reactionId}:
  420. delete:
  421. summary: DeleteMemoReaction deletes a reaction for a memo.
  422. operationId: MemoService_DeleteMemoReaction
  423. responses:
  424. "200":
  425. description: A successful response.
  426. schema:
  427. type: object
  428. properties: {}
  429. default:
  430. description: An unexpected error response.
  431. schema:
  432. $ref: '#/definitions/googlerpcStatus'
  433. parameters:
  434. - name: reactionId
  435. in: path
  436. required: true
  437. type: integer
  438. format: int32
  439. tags:
  440. - MemoService
  441. /api/v1/resources:
  442. get:
  443. summary: ListResources lists all resources.
  444. operationId: ResourceService_ListResources
  445. responses:
  446. "200":
  447. description: A successful response.
  448. schema:
  449. $ref: '#/definitions/v1ListResourcesResponse'
  450. default:
  451. description: An unexpected error response.
  452. schema:
  453. $ref: '#/definitions/googlerpcStatus'
  454. tags:
  455. - ResourceService
  456. post:
  457. summary: CreateResource creates a new resource.
  458. operationId: ResourceService_CreateResource
  459. responses:
  460. "200":
  461. description: A successful response.
  462. schema:
  463. $ref: '#/definitions/v1Resource'
  464. default:
  465. description: An unexpected error response.
  466. schema:
  467. $ref: '#/definitions/googlerpcStatus'
  468. parameters:
  469. - name: resource
  470. in: body
  471. required: true
  472. schema:
  473. $ref: '#/definitions/v1Resource'
  474. tags:
  475. - ResourceService
  476. /api/v1/resources:search:
  477. get:
  478. summary: SearchResources searches memos.
  479. operationId: ResourceService_SearchResources
  480. responses:
  481. "200":
  482. description: A successful response.
  483. schema:
  484. $ref: '#/definitions/v1SearchResourcesResponse'
  485. default:
  486. description: An unexpected error response.
  487. schema:
  488. $ref: '#/definitions/googlerpcStatus'
  489. parameters:
  490. - name: filter
  491. in: query
  492. required: false
  493. type: string
  494. tags:
  495. - ResourceService
  496. /api/v1/users:
  497. get:
  498. summary: ListUsers returns a list of users.
  499. operationId: UserService_ListUsers
  500. responses:
  501. "200":
  502. description: A successful response.
  503. schema:
  504. $ref: '#/definitions/v1ListUsersResponse'
  505. default:
  506. description: An unexpected error response.
  507. schema:
  508. $ref: '#/definitions/googlerpcStatus'
  509. tags:
  510. - UserService
  511. post:
  512. summary: CreateUser creates a new user.
  513. operationId: UserService_CreateUser
  514. responses:
  515. "200":
  516. description: A successful response.
  517. schema:
  518. $ref: '#/definitions/v1User'
  519. default:
  520. description: An unexpected error response.
  521. schema:
  522. $ref: '#/definitions/googlerpcStatus'
  523. parameters:
  524. - name: user
  525. in: body
  526. required: true
  527. schema:
  528. $ref: '#/definitions/v1User'
  529. tags:
  530. - UserService
  531. /api/v1/users:search:
  532. get:
  533. summary: SearchUsers searches users by filter.
  534. operationId: UserService_SearchUsers
  535. responses:
  536. "200":
  537. description: A successful response.
  538. schema:
  539. $ref: '#/definitions/v1SearchUsersResponse'
  540. default:
  541. description: An unexpected error response.
  542. schema:
  543. $ref: '#/definitions/googlerpcStatus'
  544. parameters:
  545. - name: filter
  546. description: |-
  547. Filter is used to filter users returned in the list.
  548. Format: "username == 'frank'"
  549. in: query
  550. required: false
  551. type: string
  552. tags:
  553. - UserService
  554. /api/v1/webhooks:
  555. get:
  556. summary: ListWebhooks returns a list of webhooks.
  557. operationId: WebhookService_ListWebhooks
  558. responses:
  559. "200":
  560. description: A successful response.
  561. schema:
  562. $ref: '#/definitions/v1ListWebhooksResponse'
  563. default:
  564. description: An unexpected error response.
  565. schema:
  566. $ref: '#/definitions/googlerpcStatus'
  567. parameters:
  568. - name: creatorId
  569. in: query
  570. required: false
  571. type: integer
  572. format: int32
  573. tags:
  574. - WebhookService
  575. post:
  576. summary: CreateWebhook creates a new webhook.
  577. operationId: WebhookService_CreateWebhook
  578. responses:
  579. "200":
  580. description: A successful response.
  581. schema:
  582. $ref: '#/definitions/v1Webhook'
  583. default:
  584. description: An unexpected error response.
  585. schema:
  586. $ref: '#/definitions/googlerpcStatus'
  587. parameters:
  588. - name: body
  589. in: body
  590. required: true
  591. schema:
  592. $ref: '#/definitions/v1CreateWebhookRequest'
  593. tags:
  594. - WebhookService
  595. /api/v1/webhooks/{id}:
  596. get:
  597. summary: GetWebhook returns a webhook by id.
  598. operationId: WebhookService_GetWebhook
  599. responses:
  600. "200":
  601. description: A successful response.
  602. schema:
  603. $ref: '#/definitions/v1Webhook'
  604. default:
  605. description: An unexpected error response.
  606. schema:
  607. $ref: '#/definitions/googlerpcStatus'
  608. parameters:
  609. - name: id
  610. in: path
  611. required: true
  612. type: integer
  613. format: int32
  614. tags:
  615. - WebhookService
  616. delete:
  617. summary: DeleteWebhook deletes a webhook by id.
  618. operationId: WebhookService_DeleteWebhook
  619. responses:
  620. "200":
  621. description: A successful response.
  622. schema:
  623. type: object
  624. properties: {}
  625. default:
  626. description: An unexpected error response.
  627. schema:
  628. $ref: '#/definitions/googlerpcStatus'
  629. parameters:
  630. - name: id
  631. in: path
  632. required: true
  633. type: integer
  634. format: int32
  635. tags:
  636. - WebhookService
  637. /api/v1/webhooks/{webhook.id}:
  638. patch:
  639. summary: UpdateWebhook updates a webhook.
  640. operationId: WebhookService_UpdateWebhook
  641. responses:
  642. "200":
  643. description: A successful response.
  644. schema:
  645. $ref: '#/definitions/v1Webhook'
  646. default:
  647. description: An unexpected error response.
  648. schema:
  649. $ref: '#/definitions/googlerpcStatus'
  650. parameters:
  651. - name: webhook.id
  652. in: path
  653. required: true
  654. type: integer
  655. format: int32
  656. - name: webhook
  657. in: body
  658. required: true
  659. schema:
  660. type: object
  661. properties:
  662. creatorId:
  663. type: integer
  664. format: int32
  665. createTime:
  666. type: string
  667. format: date-time
  668. updateTime:
  669. type: string
  670. format: date-time
  671. rowStatus:
  672. $ref: '#/definitions/v1RowStatus'
  673. name:
  674. type: string
  675. url:
  676. type: string
  677. tags:
  678. - WebhookService
  679. /api/v1/workspace/profile:
  680. get:
  681. summary: GetWorkspaceProfile returns the workspace profile.
  682. operationId: WorkspaceService_GetWorkspaceProfile
  683. responses:
  684. "200":
  685. description: A successful response.
  686. schema:
  687. $ref: '#/definitions/v1WorkspaceProfile'
  688. default:
  689. description: An unexpected error response.
  690. schema:
  691. $ref: '#/definitions/googlerpcStatus'
  692. tags:
  693. - WorkspaceService
  694. /api/v1/workspace/{name}:
  695. get:
  696. summary: GetWorkspaceSetting returns the setting by name.
  697. operationId: WorkspaceSettingService_GetWorkspaceSetting
  698. responses:
  699. "200":
  700. description: A successful response.
  701. schema:
  702. $ref: '#/definitions/apiv1WorkspaceSetting'
  703. default:
  704. description: An unexpected error response.
  705. schema:
  706. $ref: '#/definitions/googlerpcStatus'
  707. parameters:
  708. - name: name
  709. description: |-
  710. The resource name of the workspace setting.
  711. Format: settings/{setting}
  712. in: path
  713. required: true
  714. type: string
  715. pattern: settings/[^/]+
  716. tags:
  717. - WorkspaceSettingService
  718. /api/v1/workspace/{setting.name}:
  719. patch:
  720. summary: SetWorkspaceSetting updates the setting.
  721. operationId: WorkspaceSettingService_SetWorkspaceSetting
  722. responses:
  723. "200":
  724. description: A successful response.
  725. schema:
  726. $ref: '#/definitions/apiv1WorkspaceSetting'
  727. default:
  728. description: An unexpected error response.
  729. schema:
  730. $ref: '#/definitions/googlerpcStatus'
  731. parameters:
  732. - name: setting.name
  733. description: |-
  734. name is the name of the setting.
  735. Format: settings/{setting}
  736. in: path
  737. required: true
  738. type: string
  739. pattern: settings/[^/]+
  740. - name: setting
  741. description: setting is the setting to update.
  742. in: body
  743. required: true
  744. schema:
  745. type: object
  746. properties:
  747. generalSetting:
  748. $ref: '#/definitions/apiv1WorkspaceGeneralSetting'
  749. storageSetting:
  750. $ref: '#/definitions/apiv1WorkspaceStorageSetting'
  751. memoRelatedSetting:
  752. $ref: '#/definitions/apiv1WorkspaceMemoRelatedSetting'
  753. title: setting is the setting to update.
  754. tags:
  755. - WorkspaceSettingService
  756. /api/v1/{identityProvider.name}:
  757. patch:
  758. summary: UpdateIdentityProvider updates an identity provider.
  759. operationId: IdentityProviderService_UpdateIdentityProvider
  760. responses:
  761. "200":
  762. description: A successful response.
  763. schema:
  764. $ref: '#/definitions/apiv1IdentityProvider'
  765. default:
  766. description: An unexpected error response.
  767. schema:
  768. $ref: '#/definitions/googlerpcStatus'
  769. parameters:
  770. - name: identityProvider.name
  771. description: |-
  772. The name of the identityProvider.
  773. Format: identityProviders/{id}
  774. in: path
  775. required: true
  776. type: string
  777. pattern: identityProviders/[^/]+
  778. - name: identityProvider
  779. description: The identityProvider to update.
  780. in: body
  781. required: true
  782. schema:
  783. type: object
  784. properties:
  785. type:
  786. $ref: '#/definitions/apiv1IdentityProviderType'
  787. title:
  788. type: string
  789. identifierFilter:
  790. type: string
  791. config:
  792. $ref: '#/definitions/apiv1IdentityProviderConfig'
  793. title: The identityProvider to update.
  794. tags:
  795. - IdentityProviderService
  796. /api/v1/{inbox.name}:
  797. patch:
  798. summary: UpdateInbox updates an inbox.
  799. operationId: InboxService_UpdateInbox
  800. responses:
  801. "200":
  802. description: A successful response.
  803. schema:
  804. $ref: '#/definitions/v1Inbox'
  805. default:
  806. description: An unexpected error response.
  807. schema:
  808. $ref: '#/definitions/googlerpcStatus'
  809. parameters:
  810. - name: inbox.name
  811. description: |-
  812. The name of the inbox.
  813. Format: inboxes/{id}
  814. in: path
  815. required: true
  816. type: string
  817. pattern: inboxes/[^/]+
  818. - name: inbox
  819. in: body
  820. required: true
  821. schema:
  822. type: object
  823. properties:
  824. sender:
  825. type: string
  826. title: 'Format: users/{id}'
  827. receiver:
  828. type: string
  829. title: 'Format: users/{id}'
  830. status:
  831. $ref: '#/definitions/v1InboxStatus'
  832. createTime:
  833. type: string
  834. format: date-time
  835. type:
  836. $ref: '#/definitions/v1InboxType'
  837. activityId:
  838. type: integer
  839. format: int32
  840. tags:
  841. - InboxService
  842. /api/v1/{memo.name}:
  843. patch:
  844. summary: UpdateMemo updates a memo.
  845. operationId: MemoService_UpdateMemo
  846. responses:
  847. "200":
  848. description: A successful response.
  849. schema:
  850. $ref: '#/definitions/v1Memo'
  851. default:
  852. description: An unexpected error response.
  853. schema:
  854. $ref: '#/definitions/googlerpcStatus'
  855. parameters:
  856. - name: memo.name
  857. description: |-
  858. The name of the memo.
  859. Format: memos/{id}
  860. id is the system generated id.
  861. in: path
  862. required: true
  863. type: string
  864. pattern: memos/[^/]+
  865. - name: memo
  866. in: body
  867. required: true
  868. schema:
  869. type: object
  870. properties:
  871. uid:
  872. type: string
  873. description: The user defined id of the memo.
  874. rowStatus:
  875. $ref: '#/definitions/v1RowStatus'
  876. creator:
  877. type: string
  878. title: |-
  879. The name of the creator.
  880. Format: users/{id}
  881. createTime:
  882. type: string
  883. format: date-time
  884. updateTime:
  885. type: string
  886. format: date-time
  887. displayTime:
  888. type: string
  889. format: date-time
  890. content:
  891. type: string
  892. nodes:
  893. type: array
  894. items:
  895. type: object
  896. $ref: '#/definitions/v1Node'
  897. readOnly: true
  898. visibility:
  899. $ref: '#/definitions/v1Visibility'
  900. tags:
  901. type: array
  902. items:
  903. type: string
  904. pinned:
  905. type: boolean
  906. parentId:
  907. type: integer
  908. format: int32
  909. readOnly: true
  910. resources:
  911. type: array
  912. items:
  913. type: object
  914. $ref: '#/definitions/v1Resource'
  915. readOnly: true
  916. relations:
  917. type: array
  918. items:
  919. type: object
  920. $ref: '#/definitions/v1MemoRelation'
  921. readOnly: true
  922. reactions:
  923. type: array
  924. items:
  925. type: object
  926. $ref: '#/definitions/v1Reaction'
  927. readOnly: true
  928. property:
  929. $ref: '#/definitions/v1MemoProperty'
  930. readOnly: true
  931. parent:
  932. type: string
  933. title: |-
  934. The name of the parent memo.
  935. Format: memos/{id}
  936. readOnly: true
  937. tags:
  938. - MemoService
  939. /api/v1/{name_1}:
  940. get:
  941. summary: GetIdentityProvider gets an identity provider.
  942. operationId: IdentityProviderService_GetIdentityProvider
  943. responses:
  944. "200":
  945. description: A successful response.
  946. schema:
  947. $ref: '#/definitions/apiv1IdentityProvider'
  948. default:
  949. description: An unexpected error response.
  950. schema:
  951. $ref: '#/definitions/googlerpcStatus'
  952. parameters:
  953. - name: name_1
  954. description: |-
  955. The name of the identityProvider to get.
  956. Format: identityProviders/{id}
  957. in: path
  958. required: true
  959. type: string
  960. pattern: identityProviders/[^/]+
  961. tags:
  962. - IdentityProviderService
  963. delete:
  964. summary: DeleteIdentityProvider deletes an identity provider.
  965. operationId: IdentityProviderService_DeleteIdentityProvider
  966. responses:
  967. "200":
  968. description: A successful response.
  969. schema:
  970. type: object
  971. properties: {}
  972. default:
  973. description: An unexpected error response.
  974. schema:
  975. $ref: '#/definitions/googlerpcStatus'
  976. parameters:
  977. - name: name_1
  978. description: |-
  979. The name of the identityProvider to delete.
  980. Format: identityProviders/{id}
  981. in: path
  982. required: true
  983. type: string
  984. pattern: identityProviders/[^/]+
  985. tags:
  986. - IdentityProviderService
  987. /api/v1/{name_2}:
  988. get:
  989. summary: GetResource returns a resource by name.
  990. operationId: ResourceService_GetResource
  991. responses:
  992. "200":
  993. description: A successful response.
  994. schema:
  995. $ref: '#/definitions/v1Resource'
  996. default:
  997. description: An unexpected error response.
  998. schema:
  999. $ref: '#/definitions/googlerpcStatus'
  1000. parameters:
  1001. - name: name_2
  1002. description: |-
  1003. The name of the resource.
  1004. Format: resources/{id}
  1005. id is the system generated unique identifier.
  1006. in: path
  1007. required: true
  1008. type: string
  1009. pattern: resources/[^/]+
  1010. tags:
  1011. - ResourceService
  1012. delete:
  1013. summary: DeleteInbox deletes an inbox.
  1014. operationId: InboxService_DeleteInbox
  1015. responses:
  1016. "200":
  1017. description: A successful response.
  1018. schema:
  1019. type: object
  1020. properties: {}
  1021. default:
  1022. description: An unexpected error response.
  1023. schema:
  1024. $ref: '#/definitions/googlerpcStatus'
  1025. parameters:
  1026. - name: name_2
  1027. description: |-
  1028. The name of the inbox to delete.
  1029. Format: inboxes/{id}
  1030. in: path
  1031. required: true
  1032. type: string
  1033. pattern: inboxes/[^/]+
  1034. tags:
  1035. - InboxService
  1036. /api/v1/{name_3}:
  1037. get:
  1038. summary: GetMemo gets a memo.
  1039. operationId: MemoService_GetMemo
  1040. responses:
  1041. "200":
  1042. description: A successful response.
  1043. schema:
  1044. $ref: '#/definitions/v1Memo'
  1045. default:
  1046. description: An unexpected error response.
  1047. schema:
  1048. $ref: '#/definitions/googlerpcStatus'
  1049. parameters:
  1050. - name: name_3
  1051. description: |-
  1052. The name of the memo.
  1053. Format: memos/{id}
  1054. in: path
  1055. required: true
  1056. type: string
  1057. pattern: memos/[^/]+
  1058. tags:
  1059. - MemoService
  1060. delete:
  1061. summary: DeleteResource deletes a resource by name.
  1062. operationId: ResourceService_DeleteResource
  1063. responses:
  1064. "200":
  1065. description: A successful response.
  1066. schema:
  1067. type: object
  1068. properties: {}
  1069. default:
  1070. description: An unexpected error response.
  1071. schema:
  1072. $ref: '#/definitions/googlerpcStatus'
  1073. parameters:
  1074. - name: name_3
  1075. description: |-
  1076. The name of the resource.
  1077. Format: resources/{id}
  1078. id is the system generated unique identifier.
  1079. in: path
  1080. required: true
  1081. type: string
  1082. pattern: resources/[^/]+
  1083. tags:
  1084. - ResourceService
  1085. /api/v1/{name_4}:
  1086. delete:
  1087. summary: DeleteMemo deletes a memo.
  1088. operationId: MemoService_DeleteMemo
  1089. responses:
  1090. "200":
  1091. description: A successful response.
  1092. schema:
  1093. type: object
  1094. properties: {}
  1095. default:
  1096. description: An unexpected error response.
  1097. schema:
  1098. $ref: '#/definitions/googlerpcStatus'
  1099. parameters:
  1100. - name: name_4
  1101. description: |-
  1102. The name of the memo.
  1103. Format: memos/{id}
  1104. in: path
  1105. required: true
  1106. type: string
  1107. pattern: memos/[^/]+
  1108. tags:
  1109. - MemoService
  1110. /api/v1/{name}:
  1111. get:
  1112. summary: GetUser gets a user by name.
  1113. operationId: UserService_GetUser
  1114. responses:
  1115. "200":
  1116. description: A successful response.
  1117. schema:
  1118. $ref: '#/definitions/v1User'
  1119. default:
  1120. description: An unexpected error response.
  1121. schema:
  1122. $ref: '#/definitions/googlerpcStatus'
  1123. parameters:
  1124. - name: name
  1125. description: |-
  1126. The name of the user.
  1127. Format: users/{id}
  1128. in: path
  1129. required: true
  1130. type: string
  1131. pattern: users/[^/]+
  1132. tags:
  1133. - UserService
  1134. delete:
  1135. summary: DeleteUser deletes a user.
  1136. operationId: UserService_DeleteUser
  1137. responses:
  1138. "200":
  1139. description: A successful response.
  1140. schema:
  1141. type: object
  1142. properties: {}
  1143. default:
  1144. description: An unexpected error response.
  1145. schema:
  1146. $ref: '#/definitions/googlerpcStatus'
  1147. parameters:
  1148. - name: name
  1149. description: |-
  1150. The name of the user.
  1151. Format: users/{id}
  1152. in: path
  1153. required: true
  1154. type: string
  1155. pattern: users/[^/]+
  1156. tags:
  1157. - UserService
  1158. /api/v1/{name}/access_tokens:
  1159. get:
  1160. summary: ListUserAccessTokens returns a list of access tokens for a user.
  1161. operationId: UserService_ListUserAccessTokens
  1162. responses:
  1163. "200":
  1164. description: A successful response.
  1165. schema:
  1166. $ref: '#/definitions/v1ListUserAccessTokensResponse'
  1167. default:
  1168. description: An unexpected error response.
  1169. schema:
  1170. $ref: '#/definitions/googlerpcStatus'
  1171. parameters:
  1172. - name: name
  1173. description: |-
  1174. The name of the user.
  1175. Format: users/{id}
  1176. in: path
  1177. required: true
  1178. type: string
  1179. pattern: users/[^/]+
  1180. tags:
  1181. - UserService
  1182. post:
  1183. summary: CreateUserAccessToken creates a new access token for a user.
  1184. operationId: UserService_CreateUserAccessToken
  1185. responses:
  1186. "200":
  1187. description: A successful response.
  1188. schema:
  1189. $ref: '#/definitions/v1UserAccessToken'
  1190. default:
  1191. description: An unexpected error response.
  1192. schema:
  1193. $ref: '#/definitions/googlerpcStatus'
  1194. parameters:
  1195. - name: name
  1196. description: |-
  1197. The name of the user.
  1198. Format: users/{id}
  1199. in: path
  1200. required: true
  1201. type: string
  1202. pattern: users/[^/]+
  1203. - name: body
  1204. in: body
  1205. required: true
  1206. schema:
  1207. $ref: '#/definitions/UserServiceCreateUserAccessTokenBody'
  1208. tags:
  1209. - UserService
  1210. /api/v1/{name}/access_tokens/{accessToken}:
  1211. delete:
  1212. summary: DeleteUserAccessToken deletes an access token for a user.
  1213. operationId: UserService_DeleteUserAccessToken
  1214. responses:
  1215. "200":
  1216. description: A successful response.
  1217. schema:
  1218. type: object
  1219. properties: {}
  1220. default:
  1221. description: An unexpected error response.
  1222. schema:
  1223. $ref: '#/definitions/googlerpcStatus'
  1224. parameters:
  1225. - name: name
  1226. description: |-
  1227. The name of the user.
  1228. Format: users/{id}
  1229. in: path
  1230. required: true
  1231. type: string
  1232. pattern: users/[^/]+
  1233. - name: accessToken
  1234. description: access_token is the access token to delete.
  1235. in: path
  1236. required: true
  1237. type: string
  1238. tags:
  1239. - UserService
  1240. /api/v1/{name}/comments:
  1241. get:
  1242. summary: ListMemoComments lists comments for a memo.
  1243. operationId: MemoService_ListMemoComments
  1244. responses:
  1245. "200":
  1246. description: A successful response.
  1247. schema:
  1248. $ref: '#/definitions/v1ListMemoCommentsResponse'
  1249. default:
  1250. description: An unexpected error response.
  1251. schema:
  1252. $ref: '#/definitions/googlerpcStatus'
  1253. parameters:
  1254. - name: name
  1255. description: |-
  1256. The name of the memo.
  1257. Format: memos/{id}
  1258. in: path
  1259. required: true
  1260. type: string
  1261. pattern: memos/[^/]+
  1262. tags:
  1263. - MemoService
  1264. post:
  1265. summary: CreateMemoComment creates a comment for a memo.
  1266. operationId: MemoService_CreateMemoComment
  1267. responses:
  1268. "200":
  1269. description: A successful response.
  1270. schema:
  1271. $ref: '#/definitions/v1Memo'
  1272. default:
  1273. description: An unexpected error response.
  1274. schema:
  1275. $ref: '#/definitions/googlerpcStatus'
  1276. parameters:
  1277. - name: name
  1278. description: |-
  1279. The name of the memo.
  1280. Format: memos/{id}
  1281. in: path
  1282. required: true
  1283. type: string
  1284. pattern: memos/[^/]+
  1285. - name: comment
  1286. in: body
  1287. required: true
  1288. schema:
  1289. $ref: '#/definitions/v1CreateMemoRequest'
  1290. tags:
  1291. - MemoService
  1292. /api/v1/{name}/properties:
  1293. get:
  1294. summary: ListMemoProperties lists memo properties.
  1295. operationId: MemoService_ListMemoProperties
  1296. responses:
  1297. "200":
  1298. description: A successful response.
  1299. schema:
  1300. $ref: '#/definitions/v1ListMemoPropertiesResponse'
  1301. default:
  1302. description: An unexpected error response.
  1303. schema:
  1304. $ref: '#/definitions/googlerpcStatus'
  1305. parameters:
  1306. - name: name
  1307. description: |-
  1308. The name of the memo.
  1309. Format: memos/{id}. Use "memos/-" to list all properties.
  1310. in: path
  1311. required: true
  1312. type: string
  1313. pattern: memos/[^/]+
  1314. tags:
  1315. - MemoService
  1316. /api/v1/{name}/properties:rebuild:
  1317. post:
  1318. summary: RebuildMemoProperty rebuilds a memo property.
  1319. operationId: MemoService_RebuildMemoProperty
  1320. responses:
  1321. "200":
  1322. description: A successful response.
  1323. schema:
  1324. type: object
  1325. properties: {}
  1326. default:
  1327. description: An unexpected error response.
  1328. schema:
  1329. $ref: '#/definitions/googlerpcStatus'
  1330. parameters:
  1331. - name: name
  1332. description: |-
  1333. The name of the memo.
  1334. Format: memos/{id}. Use "memos/-" to rebuild all memos.
  1335. in: path
  1336. required: true
  1337. type: string
  1338. pattern: memos/[^/]+
  1339. - name: body
  1340. in: body
  1341. required: true
  1342. schema:
  1343. $ref: '#/definitions/MemoServiceRebuildMemoPropertyBody'
  1344. tags:
  1345. - MemoService
  1346. /api/v1/{name}/reactions:
  1347. get:
  1348. summary: ListMemoReactions lists reactions for a memo.
  1349. operationId: MemoService_ListMemoReactions
  1350. responses:
  1351. "200":
  1352. description: A successful response.
  1353. schema:
  1354. $ref: '#/definitions/v1ListMemoReactionsResponse'
  1355. default:
  1356. description: An unexpected error response.
  1357. schema:
  1358. $ref: '#/definitions/googlerpcStatus'
  1359. parameters:
  1360. - name: name
  1361. description: |-
  1362. The name of the memo.
  1363. Format: memos/{id}
  1364. in: path
  1365. required: true
  1366. type: string
  1367. pattern: memos/[^/]+
  1368. tags:
  1369. - MemoService
  1370. post:
  1371. summary: UpsertMemoReaction upserts a reaction for a memo.
  1372. operationId: MemoService_UpsertMemoReaction
  1373. responses:
  1374. "200":
  1375. description: A successful response.
  1376. schema:
  1377. $ref: '#/definitions/v1Reaction'
  1378. default:
  1379. description: An unexpected error response.
  1380. schema:
  1381. $ref: '#/definitions/googlerpcStatus'
  1382. parameters:
  1383. - name: name
  1384. description: |-
  1385. The name of the memo.
  1386. Format: memos/{id}
  1387. in: path
  1388. required: true
  1389. type: string
  1390. pattern: memos/[^/]+
  1391. - name: body
  1392. in: body
  1393. required: true
  1394. schema:
  1395. $ref: '#/definitions/MemoServiceUpsertMemoReactionBody'
  1396. tags:
  1397. - MemoService
  1398. /api/v1/{name}/relations:
  1399. get:
  1400. summary: ListMemoRelations lists relations for a memo.
  1401. operationId: MemoService_ListMemoRelations
  1402. responses:
  1403. "200":
  1404. description: A successful response.
  1405. schema:
  1406. $ref: '#/definitions/v1ListMemoRelationsResponse'
  1407. default:
  1408. description: An unexpected error response.
  1409. schema:
  1410. $ref: '#/definitions/googlerpcStatus'
  1411. parameters:
  1412. - name: name
  1413. description: |-
  1414. The name of the memo.
  1415. Format: memos/{id}
  1416. in: path
  1417. required: true
  1418. type: string
  1419. pattern: memos/[^/]+
  1420. tags:
  1421. - MemoService
  1422. patch:
  1423. summary: SetMemoRelations sets relations for a memo.
  1424. operationId: MemoService_SetMemoRelations
  1425. responses:
  1426. "200":
  1427. description: A successful response.
  1428. schema:
  1429. type: object
  1430. properties: {}
  1431. default:
  1432. description: An unexpected error response.
  1433. schema:
  1434. $ref: '#/definitions/googlerpcStatus'
  1435. parameters:
  1436. - name: name
  1437. description: |-
  1438. The name of the memo.
  1439. Format: memos/{id}
  1440. in: path
  1441. required: true
  1442. type: string
  1443. pattern: memos/[^/]+
  1444. - name: body
  1445. in: body
  1446. required: true
  1447. schema:
  1448. $ref: '#/definitions/MemoServiceSetMemoRelationsBody'
  1449. tags:
  1450. - MemoService
  1451. /api/v1/{name}/resources:
  1452. get:
  1453. summary: ListMemoResources lists resources for a memo.
  1454. operationId: MemoService_ListMemoResources
  1455. responses:
  1456. "200":
  1457. description: A successful response.
  1458. schema:
  1459. $ref: '#/definitions/v1ListMemoResourcesResponse'
  1460. default:
  1461. description: An unexpected error response.
  1462. schema:
  1463. $ref: '#/definitions/googlerpcStatus'
  1464. parameters:
  1465. - name: name
  1466. description: |-
  1467. The name of the memo.
  1468. Format: memos/{id}
  1469. in: path
  1470. required: true
  1471. type: string
  1472. pattern: memos/[^/]+
  1473. tags:
  1474. - MemoService
  1475. patch:
  1476. summary: SetMemoResources sets resources for a memo.
  1477. operationId: MemoService_SetMemoResources
  1478. responses:
  1479. "200":
  1480. description: A successful response.
  1481. schema:
  1482. type: object
  1483. properties: {}
  1484. default:
  1485. description: An unexpected error response.
  1486. schema:
  1487. $ref: '#/definitions/googlerpcStatus'
  1488. parameters:
  1489. - name: name
  1490. description: |-
  1491. The name of the memo.
  1492. Format: memos/{id}
  1493. in: path
  1494. required: true
  1495. type: string
  1496. pattern: memos/[^/]+
  1497. - name: body
  1498. in: body
  1499. required: true
  1500. schema:
  1501. $ref: '#/definitions/MemoServiceSetMemoResourcesBody'
  1502. tags:
  1503. - MemoService
  1504. /api/v1/{name}/setting:
  1505. get:
  1506. summary: GetUserSetting gets the setting of a user.
  1507. operationId: UserService_GetUserSetting
  1508. responses:
  1509. "200":
  1510. description: A successful response.
  1511. schema:
  1512. $ref: '#/definitions/apiv1UserSetting'
  1513. default:
  1514. description: An unexpected error response.
  1515. schema:
  1516. $ref: '#/definitions/googlerpcStatus'
  1517. parameters:
  1518. - name: name
  1519. description: |-
  1520. The name of the user.
  1521. Format: users/{id}
  1522. in: path
  1523. required: true
  1524. type: string
  1525. pattern: users/[^/]+
  1526. tags:
  1527. - UserService
  1528. /api/v1/{parent}/tags:
  1529. get:
  1530. summary: ListMemoTags lists tags for a memo.
  1531. operationId: MemoService_ListMemoTags
  1532. responses:
  1533. "200":
  1534. description: A successful response.
  1535. schema:
  1536. $ref: '#/definitions/v1ListMemoTagsResponse'
  1537. default:
  1538. description: An unexpected error response.
  1539. schema:
  1540. $ref: '#/definitions/googlerpcStatus'
  1541. parameters:
  1542. - name: parent
  1543. description: |-
  1544. The parent, who owns the tags.
  1545. Format: memos/{id}. Use "memos/-" to list all tags.
  1546. in: path
  1547. required: true
  1548. type: string
  1549. pattern: memos/[^/]+
  1550. - name: filter
  1551. description: |-
  1552. Filter is used to filter memos.
  1553. Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
  1554. in: query
  1555. required: false
  1556. type: string
  1557. tags:
  1558. - MemoService
  1559. /api/v1/{parent}/tags/{tag}:
  1560. delete:
  1561. summary: DeleteMemoTag deletes a tag for a memo.
  1562. operationId: MemoService_DeleteMemoTag
  1563. responses:
  1564. "200":
  1565. description: A successful response.
  1566. schema:
  1567. type: object
  1568. properties: {}
  1569. default:
  1570. description: An unexpected error response.
  1571. schema:
  1572. $ref: '#/definitions/googlerpcStatus'
  1573. parameters:
  1574. - name: parent
  1575. description: |-
  1576. The parent, who owns the tags.
  1577. Format: memos/{id}. Use "memos/-" to delete all tags.
  1578. in: path
  1579. required: true
  1580. type: string
  1581. pattern: memos/[^/]+
  1582. - name: tag
  1583. in: path
  1584. required: true
  1585. type: string
  1586. - name: deleteRelatedMemos
  1587. in: query
  1588. required: false
  1589. type: boolean
  1590. tags:
  1591. - MemoService
  1592. /api/v1/{parent}/tags:rename:
  1593. patch:
  1594. summary: RenameMemoTag renames a tag for a memo.
  1595. operationId: MemoService_RenameMemoTag
  1596. responses:
  1597. "200":
  1598. description: A successful response.
  1599. schema:
  1600. type: object
  1601. properties: {}
  1602. default:
  1603. description: An unexpected error response.
  1604. schema:
  1605. $ref: '#/definitions/googlerpcStatus'
  1606. parameters:
  1607. - name: parent
  1608. description: |-
  1609. The parent, who owns the tags.
  1610. Format: memos/{id}. Use "memos/-" to rename all tags.
  1611. in: path
  1612. required: true
  1613. type: string
  1614. pattern: memos/[^/]+
  1615. - name: body
  1616. in: body
  1617. required: true
  1618. schema:
  1619. $ref: '#/definitions/MemoServiceRenameMemoTagBody'
  1620. tags:
  1621. - MemoService
  1622. /api/v1/{resource.name}:
  1623. patch:
  1624. summary: UpdateResource updates a resource.
  1625. operationId: ResourceService_UpdateResource
  1626. responses:
  1627. "200":
  1628. description: A successful response.
  1629. schema:
  1630. $ref: '#/definitions/v1Resource'
  1631. default:
  1632. description: An unexpected error response.
  1633. schema:
  1634. $ref: '#/definitions/googlerpcStatus'
  1635. parameters:
  1636. - name: resource.name
  1637. description: |-
  1638. The name of the resource.
  1639. Format: resources/{id}
  1640. id is the system generated unique identifier.
  1641. in: path
  1642. required: true
  1643. type: string
  1644. pattern: resources/[^/]+
  1645. - name: resource
  1646. in: body
  1647. required: true
  1648. schema:
  1649. type: object
  1650. properties:
  1651. uid:
  1652. type: string
  1653. description: The user defined id of the resource.
  1654. createTime:
  1655. type: string
  1656. format: date-time
  1657. readOnly: true
  1658. filename:
  1659. type: string
  1660. content:
  1661. type: string
  1662. format: byte
  1663. externalLink:
  1664. type: string
  1665. type:
  1666. type: string
  1667. size:
  1668. type: string
  1669. format: int64
  1670. memo:
  1671. type: string
  1672. title: |-
  1673. The related memo.
  1674. Format: memos/{id}
  1675. tags:
  1676. - ResourceService
  1677. /api/v1/{setting.name}:
  1678. patch:
  1679. summary: UpdateUserSetting updates the setting of a user.
  1680. operationId: UserService_UpdateUserSetting
  1681. responses:
  1682. "200":
  1683. description: A successful response.
  1684. schema:
  1685. $ref: '#/definitions/apiv1UserSetting'
  1686. default:
  1687. description: An unexpected error response.
  1688. schema:
  1689. $ref: '#/definitions/googlerpcStatus'
  1690. parameters:
  1691. - name: setting.name
  1692. description: |-
  1693. The name of the user.
  1694. Format: users/{id}
  1695. in: path
  1696. required: true
  1697. type: string
  1698. pattern: users/[^/]+/setting
  1699. - name: setting
  1700. in: body
  1701. required: true
  1702. schema:
  1703. type: object
  1704. properties:
  1705. locale:
  1706. type: string
  1707. description: The preferred locale of the user.
  1708. appearance:
  1709. type: string
  1710. description: The preferred appearance of the user.
  1711. memoVisibility:
  1712. type: string
  1713. description: The default visibility of the memo.
  1714. tags:
  1715. - UserService
  1716. /api/v1/{user.name}:
  1717. patch:
  1718. summary: UpdateUser updates a user.
  1719. operationId: UserService_UpdateUser
  1720. responses:
  1721. "200":
  1722. description: A successful response.
  1723. schema:
  1724. $ref: '#/definitions/v1User'
  1725. default:
  1726. description: An unexpected error response.
  1727. schema:
  1728. $ref: '#/definitions/googlerpcStatus'
  1729. parameters:
  1730. - name: user.name
  1731. description: |-
  1732. The name of the user.
  1733. Format: users/{id}
  1734. in: path
  1735. required: true
  1736. type: string
  1737. pattern: users/[^/]+
  1738. - name: user
  1739. in: body
  1740. required: true
  1741. schema:
  1742. type: object
  1743. properties:
  1744. id:
  1745. type: integer
  1746. format: int32
  1747. description: The system generated uid of the user.
  1748. role:
  1749. $ref: '#/definitions/UserRole'
  1750. username:
  1751. type: string
  1752. email:
  1753. type: string
  1754. nickname:
  1755. type: string
  1756. avatarUrl:
  1757. type: string
  1758. description:
  1759. type: string
  1760. password:
  1761. type: string
  1762. rowStatus:
  1763. $ref: '#/definitions/v1RowStatus'
  1764. createTime:
  1765. type: string
  1766. format: date-time
  1767. updateTime:
  1768. type: string
  1769. format: date-time
  1770. tags:
  1771. - UserService
  1772. /file/{name}/avatar:
  1773. get:
  1774. summary: GetUserAvatarBinary gets the avatar of a user.
  1775. operationId: UserService_GetUserAvatarBinary
  1776. responses:
  1777. "200":
  1778. description: A successful response.
  1779. schema:
  1780. $ref: '#/definitions/apiHttpBody'
  1781. default:
  1782. description: An unexpected error response.
  1783. schema:
  1784. $ref: '#/definitions/googlerpcStatus'
  1785. parameters:
  1786. - name: name
  1787. description: |-
  1788. The name of the user.
  1789. Format: users/{id}
  1790. in: path
  1791. required: true
  1792. type: string
  1793. pattern: users/[^/]+
  1794. - name: httpBody.contentType
  1795. description: The HTTP Content-Type header value specifying the content type of the body.
  1796. in: query
  1797. required: false
  1798. type: string
  1799. - name: httpBody.data
  1800. description: The HTTP request/response body as raw binary.
  1801. in: query
  1802. required: false
  1803. type: string
  1804. format: byte
  1805. tags:
  1806. - UserService
  1807. /file/{name}/{filename}:
  1808. get:
  1809. summary: GetResourceBinary returns a resource binary by name.
  1810. operationId: ResourceService_GetResourceBinary
  1811. responses:
  1812. "200":
  1813. description: A successful response.
  1814. schema:
  1815. $ref: '#/definitions/apiHttpBody'
  1816. default:
  1817. description: An unexpected error response.
  1818. schema:
  1819. $ref: '#/definitions/googlerpcStatus'
  1820. parameters:
  1821. - name: name
  1822. description: |-
  1823. The name of the resource.
  1824. Format: resources/{id}
  1825. id is the system generated unique identifier.
  1826. in: path
  1827. required: true
  1828. type: string
  1829. pattern: resources/[^/]+
  1830. - name: filename
  1831. description: The filename of the resource. Mainly used for downloading.
  1832. in: path
  1833. required: true
  1834. type: string
  1835. tags:
  1836. - ResourceService
  1837. definitions:
  1838. MemoServiceRebuildMemoPropertyBody:
  1839. type: object
  1840. MemoServiceRenameMemoTagBody:
  1841. type: object
  1842. properties:
  1843. oldTag:
  1844. type: string
  1845. newTag:
  1846. type: string
  1847. MemoServiceSetMemoRelationsBody:
  1848. type: object
  1849. properties:
  1850. relations:
  1851. type: array
  1852. items:
  1853. type: object
  1854. $ref: '#/definitions/v1MemoRelation'
  1855. MemoServiceSetMemoResourcesBody:
  1856. type: object
  1857. properties:
  1858. resources:
  1859. type: array
  1860. items:
  1861. type: object
  1862. $ref: '#/definitions/v1Resource'
  1863. MemoServiceUpsertMemoReactionBody:
  1864. type: object
  1865. properties:
  1866. reaction:
  1867. $ref: '#/definitions/v1Reaction'
  1868. TableNodeRow:
  1869. type: object
  1870. properties:
  1871. cells:
  1872. type: array
  1873. items:
  1874. type: string
  1875. UserRole:
  1876. type: string
  1877. enum:
  1878. - ROLE_UNSPECIFIED
  1879. - HOST
  1880. - ADMIN
  1881. - USER
  1882. default: ROLE_UNSPECIFIED
  1883. UserServiceCreateUserAccessTokenBody:
  1884. type: object
  1885. properties:
  1886. description:
  1887. type: string
  1888. expiresAt:
  1889. type: string
  1890. format: date-time
  1891. WorkspaceStorageSettingS3Config:
  1892. type: object
  1893. properties:
  1894. accessKeyId:
  1895. type: string
  1896. accessKeySecret:
  1897. type: string
  1898. endpoint:
  1899. type: string
  1900. region:
  1901. type: string
  1902. bucket:
  1903. type: string
  1904. title: 'Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/'
  1905. apiHttpBody:
  1906. type: object
  1907. properties:
  1908. contentType:
  1909. type: string
  1910. description: The HTTP Content-Type header value specifying the content type of the body.
  1911. data:
  1912. type: string
  1913. format: byte
  1914. description: The HTTP request/response body as raw binary.
  1915. extensions:
  1916. type: array
  1917. items:
  1918. type: object
  1919. $ref: '#/definitions/protobufAny'
  1920. description: |-
  1921. Application specific response metadata. Must be set in the first response
  1922. for streaming APIs.
  1923. description: |-
  1924. Message that represents an arbitrary HTTP body. It should only be used for
  1925. payload formats that can't be represented as JSON, such as raw binary or
  1926. an HTML page.
  1927. This message can be used both in streaming and non-streaming API methods in
  1928. the request as well as the response.
  1929. It can be used as a top-level request field, which is convenient if one
  1930. wants to extract parameters from either the URL or HTTP template into the
  1931. request fields and also want access to the raw HTTP body.
  1932. Example:
  1933. message GetResourceRequest {
  1934. // A unique request id.
  1935. string request_id = 1;
  1936. // The raw HTTP body is bound to this field.
  1937. google.api.HttpBody http_body = 2;
  1938. }
  1939. service ResourceService {
  1940. rpc GetResource(GetResourceRequest)
  1941. returns (google.api.HttpBody);
  1942. rpc UpdateResource(google.api.HttpBody)
  1943. returns (google.protobuf.Empty);
  1944. }
  1945. Example with streaming methods:
  1946. service CaldavService {
  1947. rpc GetCalendar(stream google.api.HttpBody)
  1948. returns (stream google.api.HttpBody);
  1949. rpc UpdateCalendar(stream google.api.HttpBody)
  1950. returns (stream google.api.HttpBody);
  1951. }
  1952. Use of this type only changes how the request and response bodies are
  1953. handled, all other features will continue to work unchanged.
  1954. apiv1ActivityMemoCommentPayload:
  1955. type: object
  1956. properties:
  1957. memoId:
  1958. type: integer
  1959. format: int32
  1960. description: The memo id of comment.
  1961. relatedMemoId:
  1962. type: integer
  1963. format: int32
  1964. description: The memo id of related memo.
  1965. description: ActivityMemoCommentPayload represents the payload of a memo comment activity.
  1966. apiv1ActivityPayload:
  1967. type: object
  1968. properties:
  1969. memoComment:
  1970. $ref: '#/definitions/apiv1ActivityMemoCommentPayload'
  1971. versionUpdate:
  1972. $ref: '#/definitions/apiv1ActivityVersionUpdatePayload'
  1973. apiv1ActivityVersionUpdatePayload:
  1974. type: object
  1975. properties:
  1976. version:
  1977. type: string
  1978. description: The updated version of memos.
  1979. apiv1FieldMapping:
  1980. type: object
  1981. properties:
  1982. identifier:
  1983. type: string
  1984. displayName:
  1985. type: string
  1986. email:
  1987. type: string
  1988. apiv1IdentityProvider:
  1989. type: object
  1990. properties:
  1991. name:
  1992. type: string
  1993. title: |-
  1994. The name of the identityProvider.
  1995. Format: identityProviders/{id}
  1996. type:
  1997. $ref: '#/definitions/apiv1IdentityProviderType'
  1998. title:
  1999. type: string
  2000. identifierFilter:
  2001. type: string
  2002. config:
  2003. $ref: '#/definitions/apiv1IdentityProviderConfig'
  2004. apiv1IdentityProviderConfig:
  2005. type: object
  2006. properties:
  2007. oauth2Config:
  2008. $ref: '#/definitions/apiv1OAuth2Config'
  2009. apiv1IdentityProviderType:
  2010. type: string
  2011. enum:
  2012. - TYPE_UNSPECIFIED
  2013. - OAUTH2
  2014. default: TYPE_UNSPECIFIED
  2015. apiv1OAuth2Config:
  2016. type: object
  2017. properties:
  2018. clientId:
  2019. type: string
  2020. clientSecret:
  2021. type: string
  2022. authUrl:
  2023. type: string
  2024. tokenUrl:
  2025. type: string
  2026. userInfoUrl:
  2027. type: string
  2028. scopes:
  2029. type: array
  2030. items:
  2031. type: string
  2032. fieldMapping:
  2033. $ref: '#/definitions/apiv1FieldMapping'
  2034. apiv1UserSetting:
  2035. type: object
  2036. properties:
  2037. name:
  2038. type: string
  2039. title: |-
  2040. The name of the user.
  2041. Format: users/{id}
  2042. locale:
  2043. type: string
  2044. description: The preferred locale of the user.
  2045. appearance:
  2046. type: string
  2047. description: The preferred appearance of the user.
  2048. memoVisibility:
  2049. type: string
  2050. description: The default visibility of the memo.
  2051. apiv1WorkspaceCustomProfile:
  2052. type: object
  2053. properties:
  2054. title:
  2055. type: string
  2056. description:
  2057. type: string
  2058. logoUrl:
  2059. type: string
  2060. locale:
  2061. type: string
  2062. appearance:
  2063. type: string
  2064. apiv1WorkspaceGeneralSetting:
  2065. type: object
  2066. properties:
  2067. disallowSignup:
  2068. type: boolean
  2069. description: disallow_signup is the flag to disallow signup.
  2070. disallowPasswordLogin:
  2071. type: boolean
  2072. description: disallow_password_login is the flag to disallow password login.
  2073. additionalScript:
  2074. type: string
  2075. description: additional_script is the additional script.
  2076. additionalStyle:
  2077. type: string
  2078. description: additional_style is the additional style.
  2079. customProfile:
  2080. $ref: '#/definitions/apiv1WorkspaceCustomProfile'
  2081. description: custom_profile is the custom profile.
  2082. apiv1WorkspaceMemoRelatedSetting:
  2083. type: object
  2084. properties:
  2085. disallowPublicVisible:
  2086. type: boolean
  2087. description: disallow_public_share disallows set memo as public visible.
  2088. displayWithUpdateTime:
  2089. type: boolean
  2090. description: display_with_update_time orders and displays memo with update time.
  2091. contentLengthLimit:
  2092. type: integer
  2093. format: int32
  2094. description: content_length_limit is the limit of content length. Unit is byte.
  2095. enableAutoCompact:
  2096. type: boolean
  2097. description: enable_auto_compact enables auto compact for large content.
  2098. enableDoubleClickEdit:
  2099. type: boolean
  2100. description: enable_double_click_edit enables editing on double click.
  2101. apiv1WorkspaceSetting:
  2102. type: object
  2103. properties:
  2104. name:
  2105. type: string
  2106. title: |-
  2107. name is the name of the setting.
  2108. Format: settings/{setting}
  2109. generalSetting:
  2110. $ref: '#/definitions/apiv1WorkspaceGeneralSetting'
  2111. storageSetting:
  2112. $ref: '#/definitions/apiv1WorkspaceStorageSetting'
  2113. memoRelatedSetting:
  2114. $ref: '#/definitions/apiv1WorkspaceMemoRelatedSetting'
  2115. apiv1WorkspaceStorageSetting:
  2116. type: object
  2117. properties:
  2118. storageType:
  2119. $ref: '#/definitions/apiv1WorkspaceStorageSettingStorageType'
  2120. description: storage_type is the storage type.
  2121. filepathTemplate:
  2122. type: string
  2123. title: |-
  2124. The template of file path.
  2125. e.g. assets/{timestamp}_{filename}
  2126. uploadSizeLimitMb:
  2127. type: string
  2128. format: int64
  2129. description: The max upload size in megabytes.
  2130. s3Config:
  2131. $ref: '#/definitions/WorkspaceStorageSettingS3Config'
  2132. description: The S3 config.
  2133. apiv1WorkspaceStorageSettingStorageType:
  2134. type: string
  2135. enum:
  2136. - STORAGE_TYPE_UNSPECIFIED
  2137. - DATABASE
  2138. - LOCAL
  2139. - S3
  2140. default: STORAGE_TYPE_UNSPECIFIED
  2141. description: |2-
  2142. - DATABASE: DATABASE is the database storage type.
  2143. - LOCAL: LOCAL is the local storage type.
  2144. - S3: S3 is the S3 storage type.
  2145. googlerpcStatus:
  2146. type: object
  2147. properties:
  2148. code:
  2149. type: integer
  2150. format: int32
  2151. message:
  2152. type: string
  2153. details:
  2154. type: array
  2155. items:
  2156. type: object
  2157. $ref: '#/definitions/protobufAny'
  2158. protobufAny:
  2159. type: object
  2160. properties:
  2161. '@type':
  2162. type: string
  2163. description: |-
  2164. A URL/resource name that uniquely identifies the type of the serialized
  2165. protocol buffer message. This string must contain at least
  2166. one "/" character. The last segment of the URL's path must represent
  2167. the fully qualified name of the type (as in
  2168. `path/google.protobuf.Duration`). The name should be in a canonical form
  2169. (e.g., leading "." is not accepted).
  2170. In practice, teams usually precompile into the binary all types that they
  2171. expect it to use in the context of Any. However, for URLs which use the
  2172. scheme `http`, `https`, or no scheme, one can optionally set up a type
  2173. server that maps type URLs to message definitions as follows:
  2174. * If no scheme is provided, `https` is assumed.
  2175. * An HTTP GET on the URL must yield a [google.protobuf.Type][]
  2176. value in binary format, or produce an error.
  2177. * Applications are allowed to cache lookup results based on the
  2178. URL, or have them precompiled into a binary to avoid any
  2179. lookup. Therefore, binary compatibility needs to be preserved
  2180. on changes to types. (Use versioned type names to manage
  2181. breaking changes.)
  2182. Note: this functionality is not currently available in the official
  2183. protobuf release, and it is not used for type URLs beginning with
  2184. type.googleapis.com.
  2185. Schemes other than `http`, `https` (or the empty scheme) might be
  2186. used with implementation specific semantics.
  2187. additionalProperties: {}
  2188. description: |-
  2189. `Any` contains an arbitrary serialized protocol buffer message along with a
  2190. URL that describes the type of the serialized message.
  2191. Protobuf library provides support to pack/unpack Any values in the form
  2192. of utility functions or additional generated methods of the Any type.
  2193. Example 1: Pack and unpack a message in C++.
  2194. Foo foo = ...;
  2195. Any any;
  2196. any.PackFrom(foo);
  2197. ...
  2198. if (any.UnpackTo(&foo)) {
  2199. ...
  2200. }
  2201. Example 2: Pack and unpack a message in Java.
  2202. Foo foo = ...;
  2203. Any any = Any.pack(foo);
  2204. ...
  2205. if (any.is(Foo.class)) {
  2206. foo = any.unpack(Foo.class);
  2207. }
  2208. // or ...
  2209. if (any.isSameTypeAs(Foo.getDefaultInstance())) {
  2210. foo = any.unpack(Foo.getDefaultInstance());
  2211. }
  2212. Example 3: Pack and unpack a message in Python.
  2213. foo = Foo(...)
  2214. any = Any()
  2215. any.Pack(foo)
  2216. ...
  2217. if any.Is(Foo.DESCRIPTOR):
  2218. any.Unpack(foo)
  2219. ...
  2220. Example 4: Pack and unpack a message in Go
  2221. foo := &pb.Foo{...}
  2222. any, err := anypb.New(foo)
  2223. if err != nil {
  2224. ...
  2225. }
  2226. ...
  2227. foo := &pb.Foo{}
  2228. if err := any.UnmarshalTo(foo); err != nil {
  2229. ...
  2230. }
  2231. The pack methods provided by protobuf library will by default use
  2232. 'type.googleapis.com/full.type.name' as the type URL and the unpack
  2233. methods only use the fully qualified type name after the last '/'
  2234. in the type URL, for example "foo.bar.com/x/y.z" will yield type
  2235. name "y.z".
  2236. JSON
  2237. The JSON representation of an `Any` value uses the regular
  2238. representation of the deserialized, embedded message, with an
  2239. additional field `@type` which contains the type URL. Example:
  2240. package google.profile;
  2241. message Person {
  2242. string first_name = 1;
  2243. string last_name = 2;
  2244. }
  2245. {
  2246. "@type": "type.googleapis.com/google.profile.Person",
  2247. "firstName": <string>,
  2248. "lastName": <string>
  2249. }
  2250. If the embedded message type is well-known and has a custom JSON
  2251. representation, that representation will be embedded adding a field
  2252. `value` which holds the custom JSON in addition to the `@type`
  2253. field. Example (for message [google.protobuf.Duration][]):
  2254. {
  2255. "@type": "type.googleapis.com/google.protobuf.Duration",
  2256. "value": "1.212s"
  2257. }
  2258. v1Activity:
  2259. type: object
  2260. properties:
  2261. id:
  2262. type: integer
  2263. format: int32
  2264. description: The system-generated unique identifier for the activity.
  2265. creatorId:
  2266. type: integer
  2267. format: int32
  2268. description: The system-generated unique identifier for the user who created the activity.
  2269. type:
  2270. type: string
  2271. description: The type of the activity.
  2272. level:
  2273. type: string
  2274. description: The level of the activity.
  2275. createTime:
  2276. type: string
  2277. format: date-time
  2278. description: The create time of the activity.
  2279. readOnly: true
  2280. payload:
  2281. $ref: '#/definitions/apiv1ActivityPayload'
  2282. description: The payload of the activity.
  2283. v1AutoLinkNode:
  2284. type: object
  2285. properties:
  2286. url:
  2287. type: string
  2288. isRawText:
  2289. type: boolean
  2290. v1BlockquoteNode:
  2291. type: object
  2292. properties:
  2293. children:
  2294. type: array
  2295. items:
  2296. type: object
  2297. $ref: '#/definitions/v1Node'
  2298. v1BoldItalicNode:
  2299. type: object
  2300. properties:
  2301. symbol:
  2302. type: string
  2303. content:
  2304. type: string
  2305. v1BoldNode:
  2306. type: object
  2307. properties:
  2308. symbol:
  2309. type: string
  2310. children:
  2311. type: array
  2312. items:
  2313. type: object
  2314. $ref: '#/definitions/v1Node'
  2315. v1CodeBlockNode:
  2316. type: object
  2317. properties:
  2318. language:
  2319. type: string
  2320. content:
  2321. type: string
  2322. v1CodeNode:
  2323. type: object
  2324. properties:
  2325. content:
  2326. type: string
  2327. v1CreateMemoRequest:
  2328. type: object
  2329. properties:
  2330. content:
  2331. type: string
  2332. visibility:
  2333. $ref: '#/definitions/v1Visibility'
  2334. v1CreateWebhookRequest:
  2335. type: object
  2336. properties:
  2337. name:
  2338. type: string
  2339. url:
  2340. type: string
  2341. v1EmbeddedContentNode:
  2342. type: object
  2343. properties:
  2344. resourceName:
  2345. type: string
  2346. params:
  2347. type: string
  2348. v1EscapingCharacterNode:
  2349. type: object
  2350. properties:
  2351. symbol:
  2352. type: string
  2353. v1ExportMemosRequest:
  2354. type: object
  2355. properties:
  2356. filter:
  2357. type: string
  2358. title: Same as ListMemosRequest.filter
  2359. v1ExportMemosResponse:
  2360. type: object
  2361. properties:
  2362. content:
  2363. type: string
  2364. format: byte
  2365. v1GetUserMemosStatsResponse:
  2366. type: object
  2367. properties:
  2368. stats:
  2369. type: object
  2370. additionalProperties:
  2371. type: integer
  2372. format: int32
  2373. description: |-
  2374. stats is the stats of memo creating/updating activities.
  2375. key is the year-month-day string. e.g. "2020-01-01".
  2376. v1HeadingNode:
  2377. type: object
  2378. properties:
  2379. level:
  2380. type: integer
  2381. format: int32
  2382. children:
  2383. type: array
  2384. items:
  2385. type: object
  2386. $ref: '#/definitions/v1Node'
  2387. v1HighlightNode:
  2388. type: object
  2389. properties:
  2390. content:
  2391. type: string
  2392. v1HorizontalRuleNode:
  2393. type: object
  2394. properties:
  2395. symbol:
  2396. type: string
  2397. v1ImageNode:
  2398. type: object
  2399. properties:
  2400. altText:
  2401. type: string
  2402. url:
  2403. type: string
  2404. v1Inbox:
  2405. type: object
  2406. properties:
  2407. name:
  2408. type: string
  2409. title: |-
  2410. The name of the inbox.
  2411. Format: inboxes/{id}
  2412. sender:
  2413. type: string
  2414. title: 'Format: users/{id}'
  2415. receiver:
  2416. type: string
  2417. title: 'Format: users/{id}'
  2418. status:
  2419. $ref: '#/definitions/v1InboxStatus'
  2420. createTime:
  2421. type: string
  2422. format: date-time
  2423. type:
  2424. $ref: '#/definitions/v1InboxType'
  2425. activityId:
  2426. type: integer
  2427. format: int32
  2428. v1InboxStatus:
  2429. type: string
  2430. enum:
  2431. - STATUS_UNSPECIFIED
  2432. - UNREAD
  2433. - ARCHIVED
  2434. default: STATUS_UNSPECIFIED
  2435. v1InboxType:
  2436. type: string
  2437. enum:
  2438. - TYPE_UNSPECIFIED
  2439. - MEMO_COMMENT
  2440. - VERSION_UPDATE
  2441. default: TYPE_UNSPECIFIED
  2442. v1ItalicNode:
  2443. type: object
  2444. properties:
  2445. symbol:
  2446. type: string
  2447. content:
  2448. type: string
  2449. v1LineBreakNode:
  2450. type: object
  2451. v1LinkMetadata:
  2452. type: object
  2453. properties:
  2454. title:
  2455. type: string
  2456. description:
  2457. type: string
  2458. image:
  2459. type: string
  2460. v1LinkNode:
  2461. type: object
  2462. properties:
  2463. text:
  2464. type: string
  2465. url:
  2466. type: string
  2467. v1ListIdentityProvidersResponse:
  2468. type: object
  2469. properties:
  2470. identityProviders:
  2471. type: array
  2472. items:
  2473. type: object
  2474. $ref: '#/definitions/apiv1IdentityProvider'
  2475. v1ListInboxesResponse:
  2476. type: object
  2477. properties:
  2478. inboxes:
  2479. type: array
  2480. items:
  2481. type: object
  2482. $ref: '#/definitions/v1Inbox'
  2483. v1ListMemoCommentsResponse:
  2484. type: object
  2485. properties:
  2486. memos:
  2487. type: array
  2488. items:
  2489. type: object
  2490. $ref: '#/definitions/v1Memo'
  2491. v1ListMemoPropertiesResponse:
  2492. type: object
  2493. properties:
  2494. properties:
  2495. type: array
  2496. items:
  2497. type: object
  2498. $ref: '#/definitions/v1MemoProperty'
  2499. v1ListMemoReactionsResponse:
  2500. type: object
  2501. properties:
  2502. reactions:
  2503. type: array
  2504. items:
  2505. type: object
  2506. $ref: '#/definitions/v1Reaction'
  2507. v1ListMemoRelationsResponse:
  2508. type: object
  2509. properties:
  2510. relations:
  2511. type: array
  2512. items:
  2513. type: object
  2514. $ref: '#/definitions/v1MemoRelation'
  2515. v1ListMemoResourcesResponse:
  2516. type: object
  2517. properties:
  2518. resources:
  2519. type: array
  2520. items:
  2521. type: object
  2522. $ref: '#/definitions/v1Resource'
  2523. v1ListMemoTagsResponse:
  2524. type: object
  2525. properties:
  2526. tagAmounts:
  2527. type: object
  2528. additionalProperties:
  2529. type: integer
  2530. format: int32
  2531. description: |-
  2532. tag_amounts is the amount of tags.
  2533. key is the tag name. e.g. "tag1".
  2534. value is the amount of the tag.
  2535. v1ListMemosResponse:
  2536. type: object
  2537. properties:
  2538. memos:
  2539. type: array
  2540. items:
  2541. type: object
  2542. $ref: '#/definitions/v1Memo'
  2543. nextPageToken:
  2544. type: string
  2545. description: |-
  2546. A token, which can be sent as `page_token` to retrieve the next page.
  2547. If this field is omitted, there are no subsequent pages.
  2548. v1ListResourcesResponse:
  2549. type: object
  2550. properties:
  2551. resources:
  2552. type: array
  2553. items:
  2554. type: object
  2555. $ref: '#/definitions/v1Resource'
  2556. v1ListUserAccessTokensResponse:
  2557. type: object
  2558. properties:
  2559. accessTokens:
  2560. type: array
  2561. items:
  2562. type: object
  2563. $ref: '#/definitions/v1UserAccessToken'
  2564. v1ListUsersResponse:
  2565. type: object
  2566. properties:
  2567. users:
  2568. type: array
  2569. items:
  2570. type: object
  2571. $ref: '#/definitions/v1User'
  2572. v1ListWebhooksResponse:
  2573. type: object
  2574. properties:
  2575. webhooks:
  2576. type: array
  2577. items:
  2578. type: object
  2579. $ref: '#/definitions/v1Webhook'
  2580. v1MathBlockNode:
  2581. type: object
  2582. properties:
  2583. content:
  2584. type: string
  2585. v1MathNode:
  2586. type: object
  2587. properties:
  2588. content:
  2589. type: string
  2590. v1Memo:
  2591. type: object
  2592. properties:
  2593. name:
  2594. type: string
  2595. description: |-
  2596. The name of the memo.
  2597. Format: memos/{id}
  2598. id is the system generated id.
  2599. uid:
  2600. type: string
  2601. description: The user defined id of the memo.
  2602. rowStatus:
  2603. $ref: '#/definitions/v1RowStatus'
  2604. creator:
  2605. type: string
  2606. title: |-
  2607. The name of the creator.
  2608. Format: users/{id}
  2609. createTime:
  2610. type: string
  2611. format: date-time
  2612. updateTime:
  2613. type: string
  2614. format: date-time
  2615. displayTime:
  2616. type: string
  2617. format: date-time
  2618. content:
  2619. type: string
  2620. nodes:
  2621. type: array
  2622. items:
  2623. type: object
  2624. $ref: '#/definitions/v1Node'
  2625. readOnly: true
  2626. visibility:
  2627. $ref: '#/definitions/v1Visibility'
  2628. tags:
  2629. type: array
  2630. items:
  2631. type: string
  2632. pinned:
  2633. type: boolean
  2634. parentId:
  2635. type: integer
  2636. format: int32
  2637. readOnly: true
  2638. resources:
  2639. type: array
  2640. items:
  2641. type: object
  2642. $ref: '#/definitions/v1Resource'
  2643. readOnly: true
  2644. relations:
  2645. type: array
  2646. items:
  2647. type: object
  2648. $ref: '#/definitions/v1MemoRelation'
  2649. readOnly: true
  2650. reactions:
  2651. type: array
  2652. items:
  2653. type: object
  2654. $ref: '#/definitions/v1Reaction'
  2655. readOnly: true
  2656. property:
  2657. $ref: '#/definitions/v1MemoProperty'
  2658. readOnly: true
  2659. parent:
  2660. type: string
  2661. title: |-
  2662. The name of the parent memo.
  2663. Format: memos/{id}
  2664. readOnly: true
  2665. v1MemoProperty:
  2666. type: object
  2667. properties:
  2668. tags:
  2669. type: array
  2670. items:
  2671. type: string
  2672. hasLink:
  2673. type: boolean
  2674. hasTaskList:
  2675. type: boolean
  2676. hasCode:
  2677. type: boolean
  2678. hasIncompleteTasks:
  2679. type: boolean
  2680. v1MemoRelation:
  2681. type: object
  2682. properties:
  2683. memo:
  2684. type: string
  2685. title: |-
  2686. The name of memo.
  2687. Format: "memos/{uid}"
  2688. relatedMemo:
  2689. type: string
  2690. title: |-
  2691. The name of related memo.
  2692. Format: "memos/{uid}"
  2693. type:
  2694. $ref: '#/definitions/v1MemoRelationType'
  2695. v1MemoRelationType:
  2696. type: string
  2697. enum:
  2698. - TYPE_UNSPECIFIED
  2699. - REFERENCE
  2700. - COMMENT
  2701. default: TYPE_UNSPECIFIED
  2702. v1Node:
  2703. type: object
  2704. properties:
  2705. type:
  2706. $ref: '#/definitions/v1NodeType'
  2707. lineBreakNode:
  2708. $ref: '#/definitions/v1LineBreakNode'
  2709. paragraphNode:
  2710. $ref: '#/definitions/v1ParagraphNode'
  2711. codeBlockNode:
  2712. $ref: '#/definitions/v1CodeBlockNode'
  2713. headingNode:
  2714. $ref: '#/definitions/v1HeadingNode'
  2715. horizontalRuleNode:
  2716. $ref: '#/definitions/v1HorizontalRuleNode'
  2717. blockquoteNode:
  2718. $ref: '#/definitions/v1BlockquoteNode'
  2719. orderedListNode:
  2720. $ref: '#/definitions/v1OrderedListNode'
  2721. unorderedListNode:
  2722. $ref: '#/definitions/v1UnorderedListNode'
  2723. taskListNode:
  2724. $ref: '#/definitions/v1TaskListNode'
  2725. mathBlockNode:
  2726. $ref: '#/definitions/v1MathBlockNode'
  2727. tableNode:
  2728. $ref: '#/definitions/v1TableNode'
  2729. embeddedContentNode:
  2730. $ref: '#/definitions/v1EmbeddedContentNode'
  2731. textNode:
  2732. $ref: '#/definitions/v1TextNode'
  2733. boldNode:
  2734. $ref: '#/definitions/v1BoldNode'
  2735. italicNode:
  2736. $ref: '#/definitions/v1ItalicNode'
  2737. boldItalicNode:
  2738. $ref: '#/definitions/v1BoldItalicNode'
  2739. codeNode:
  2740. $ref: '#/definitions/v1CodeNode'
  2741. imageNode:
  2742. $ref: '#/definitions/v1ImageNode'
  2743. linkNode:
  2744. $ref: '#/definitions/v1LinkNode'
  2745. autoLinkNode:
  2746. $ref: '#/definitions/v1AutoLinkNode'
  2747. tagNode:
  2748. $ref: '#/definitions/v1TagNode'
  2749. strikethroughNode:
  2750. $ref: '#/definitions/v1StrikethroughNode'
  2751. escapingCharacterNode:
  2752. $ref: '#/definitions/v1EscapingCharacterNode'
  2753. mathNode:
  2754. $ref: '#/definitions/v1MathNode'
  2755. highlightNode:
  2756. $ref: '#/definitions/v1HighlightNode'
  2757. subscriptNode:
  2758. $ref: '#/definitions/v1SubscriptNode'
  2759. superscriptNode:
  2760. $ref: '#/definitions/v1SuperscriptNode'
  2761. referencedContentNode:
  2762. $ref: '#/definitions/v1ReferencedContentNode'
  2763. spoilerNode:
  2764. $ref: '#/definitions/v1SpoilerNode'
  2765. v1NodeType:
  2766. type: string
  2767. enum:
  2768. - NODE_UNSPECIFIED
  2769. - LINE_BREAK
  2770. - PARAGRAPH
  2771. - CODE_BLOCK
  2772. - HEADING
  2773. - HORIZONTAL_RULE
  2774. - BLOCKQUOTE
  2775. - ORDERED_LIST
  2776. - UNORDERED_LIST
  2777. - TASK_LIST
  2778. - MATH_BLOCK
  2779. - TABLE
  2780. - EMBEDDED_CONTENT
  2781. - TEXT
  2782. - BOLD
  2783. - ITALIC
  2784. - BOLD_ITALIC
  2785. - CODE
  2786. - IMAGE
  2787. - LINK
  2788. - AUTO_LINK
  2789. - TAG
  2790. - STRIKETHROUGH
  2791. - ESCAPING_CHARACTER
  2792. - MATH
  2793. - HIGHLIGHT
  2794. - SUBSCRIPT
  2795. - SUPERSCRIPT
  2796. - REFERENCED_CONTENT
  2797. - SPOILER
  2798. default: NODE_UNSPECIFIED
  2799. v1OrderedListNode:
  2800. type: object
  2801. properties:
  2802. number:
  2803. type: string
  2804. indent:
  2805. type: integer
  2806. format: int32
  2807. children:
  2808. type: array
  2809. items:
  2810. type: object
  2811. $ref: '#/definitions/v1Node'
  2812. v1ParagraphNode:
  2813. type: object
  2814. properties:
  2815. children:
  2816. type: array
  2817. items:
  2818. type: object
  2819. $ref: '#/definitions/v1Node'
  2820. v1ParseMarkdownRequest:
  2821. type: object
  2822. properties:
  2823. markdown:
  2824. type: string
  2825. v1ParseMarkdownResponse:
  2826. type: object
  2827. properties:
  2828. nodes:
  2829. type: array
  2830. items:
  2831. type: object
  2832. $ref: '#/definitions/v1Node'
  2833. v1Reaction:
  2834. type: object
  2835. properties:
  2836. id:
  2837. type: integer
  2838. format: int32
  2839. creator:
  2840. type: string
  2841. title: |-
  2842. The name of the creator.
  2843. Format: users/{id}
  2844. contentId:
  2845. type: string
  2846. reactionType:
  2847. $ref: '#/definitions/v1ReactionType'
  2848. v1ReactionType:
  2849. type: string
  2850. enum:
  2851. - TYPE_UNSPECIFIED
  2852. - THUMBS_UP
  2853. - THUMBS_DOWN
  2854. - HEART
  2855. - FIRE
  2856. - CLAPPING_HANDS
  2857. - LAUGH
  2858. - OK_HAND
  2859. - ROCKET
  2860. - EYES
  2861. - THINKING_FACE
  2862. - CLOWN_FACE
  2863. - QUESTION_MARK
  2864. default: TYPE_UNSPECIFIED
  2865. v1ReferencedContentNode:
  2866. type: object
  2867. properties:
  2868. resourceName:
  2869. type: string
  2870. params:
  2871. type: string
  2872. v1Resource:
  2873. type: object
  2874. properties:
  2875. name:
  2876. type: string
  2877. description: |-
  2878. The name of the resource.
  2879. Format: resources/{id}
  2880. id is the system generated unique identifier.
  2881. uid:
  2882. type: string
  2883. description: The user defined id of the resource.
  2884. createTime:
  2885. type: string
  2886. format: date-time
  2887. readOnly: true
  2888. filename:
  2889. type: string
  2890. content:
  2891. type: string
  2892. format: byte
  2893. externalLink:
  2894. type: string
  2895. type:
  2896. type: string
  2897. size:
  2898. type: string
  2899. format: int64
  2900. memo:
  2901. type: string
  2902. title: |-
  2903. The related memo.
  2904. Format: memos/{id}
  2905. v1RestoreMarkdownRequest:
  2906. type: object
  2907. properties:
  2908. nodes:
  2909. type: array
  2910. items:
  2911. type: object
  2912. $ref: '#/definitions/v1Node'
  2913. v1RestoreMarkdownResponse:
  2914. type: object
  2915. properties:
  2916. markdown:
  2917. type: string
  2918. v1RowStatus:
  2919. type: string
  2920. enum:
  2921. - ROW_STATUS_UNSPECIFIED
  2922. - ACTIVE
  2923. - ARCHIVED
  2924. default: ROW_STATUS_UNSPECIFIED
  2925. v1SearchMemosResponse:
  2926. type: object
  2927. properties:
  2928. memos:
  2929. type: array
  2930. items:
  2931. type: object
  2932. $ref: '#/definitions/v1Memo'
  2933. v1SearchResourcesResponse:
  2934. type: object
  2935. properties:
  2936. resources:
  2937. type: array
  2938. items:
  2939. type: object
  2940. $ref: '#/definitions/v1Resource'
  2941. v1SearchUsersResponse:
  2942. type: object
  2943. properties:
  2944. users:
  2945. type: array
  2946. items:
  2947. type: object
  2948. $ref: '#/definitions/v1User'
  2949. v1SpoilerNode:
  2950. type: object
  2951. properties:
  2952. content:
  2953. type: string
  2954. v1StrikethroughNode:
  2955. type: object
  2956. properties:
  2957. content:
  2958. type: string
  2959. v1SubscriptNode:
  2960. type: object
  2961. properties:
  2962. content:
  2963. type: string
  2964. v1SuperscriptNode:
  2965. type: object
  2966. properties:
  2967. content:
  2968. type: string
  2969. v1TableNode:
  2970. type: object
  2971. properties:
  2972. header:
  2973. type: array
  2974. items:
  2975. type: string
  2976. delimiter:
  2977. type: array
  2978. items:
  2979. type: string
  2980. rows:
  2981. type: array
  2982. items:
  2983. type: object
  2984. $ref: '#/definitions/TableNodeRow'
  2985. v1TagNode:
  2986. type: object
  2987. properties:
  2988. content:
  2989. type: string
  2990. v1TaskListNode:
  2991. type: object
  2992. properties:
  2993. symbol:
  2994. type: string
  2995. indent:
  2996. type: integer
  2997. format: int32
  2998. complete:
  2999. type: boolean
  3000. children:
  3001. type: array
  3002. items:
  3003. type: object
  3004. $ref: '#/definitions/v1Node'
  3005. v1TextNode:
  3006. type: object
  3007. properties:
  3008. content:
  3009. type: string
  3010. v1UnorderedListNode:
  3011. type: object
  3012. properties:
  3013. symbol:
  3014. type: string
  3015. indent:
  3016. type: integer
  3017. format: int32
  3018. children:
  3019. type: array
  3020. items:
  3021. type: object
  3022. $ref: '#/definitions/v1Node'
  3023. v1User:
  3024. type: object
  3025. properties:
  3026. name:
  3027. type: string
  3028. title: |-
  3029. The name of the user.
  3030. Format: users/{id}
  3031. id:
  3032. type: integer
  3033. format: int32
  3034. description: The system generated uid of the user.
  3035. role:
  3036. $ref: '#/definitions/UserRole'
  3037. username:
  3038. type: string
  3039. email:
  3040. type: string
  3041. nickname:
  3042. type: string
  3043. avatarUrl:
  3044. type: string
  3045. description:
  3046. type: string
  3047. password:
  3048. type: string
  3049. rowStatus:
  3050. $ref: '#/definitions/v1RowStatus'
  3051. createTime:
  3052. type: string
  3053. format: date-time
  3054. updateTime:
  3055. type: string
  3056. format: date-time
  3057. v1UserAccessToken:
  3058. type: object
  3059. properties:
  3060. accessToken:
  3061. type: string
  3062. description:
  3063. type: string
  3064. issuedAt:
  3065. type: string
  3066. format: date-time
  3067. expiresAt:
  3068. type: string
  3069. format: date-time
  3070. v1Visibility:
  3071. type: string
  3072. enum:
  3073. - VISIBILITY_UNSPECIFIED
  3074. - PRIVATE
  3075. - PROTECTED
  3076. - PUBLIC
  3077. default: VISIBILITY_UNSPECIFIED
  3078. v1Webhook:
  3079. type: object
  3080. properties:
  3081. id:
  3082. type: integer
  3083. format: int32
  3084. creatorId:
  3085. type: integer
  3086. format: int32
  3087. createTime:
  3088. type: string
  3089. format: date-time
  3090. updateTime:
  3091. type: string
  3092. format: date-time
  3093. rowStatus:
  3094. $ref: '#/definitions/v1RowStatus'
  3095. name:
  3096. type: string
  3097. url:
  3098. type: string
  3099. v1WorkspaceProfile:
  3100. type: object
  3101. properties:
  3102. owner:
  3103. type: string
  3104. title: |-
  3105. The name of instance owner.
  3106. Format: "users/{id}"
  3107. version:
  3108. type: string
  3109. title: version is the current version of instance
  3110. mode:
  3111. type: string
  3112. description: mode is the instance mode (e.g. "prod", "dev" or "demo").