-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcontent-management.yaml
More file actions
1134 lines (1117 loc) · 38.1 KB
/
content-management.yaml
File metadata and controls
1134 lines (1117 loc) · 38.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
version: 1.0.0
title: Content Management
servers:
- url: 'https://apiexplorer.support.rocket.chat'
paths:
/api/v1/emoji-custom.all:
get:
tags:
- Custom Emoji
summary: List All Custom Emojis
description: |-
List all custom emojis.
### Changelog
| Version | Description |
| ---------------- | ------------|
|7.11.0 | Added the `name` query parameter |
|0.63.0 | Added |
operationId: get-api-v1-emoji-custom.all
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
- schema:
type: string
example: emoji-one
in: query
name: name
description: Enter the emoji name you want to find. This parameter is optional.
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/count'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
emojis:
type: array
items:
type: object
properties:
_id:
type: string
name:
type: string
aliases:
type: array
items:
type: string
extension:
type: string
_updatedAt:
type: string
count:
type: integer
offset:
type: integer
total:
type: integer
success:
type: boolean
examples:
Example:
value:
emojis:
- _id: 6542e83aa2f73c7460e18efb
name: happy
aliases:
- happy-gang
extension: png
_updatedAt: '2023-11-02T00:07:22.433Z'
count: 1
offset: 0
total: 1
success: true
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/emoji-custom.create:
post:
tags:
- Custom Emoji
summary: Create an Emoji
description: |
Upload a custom emoji to the workspace. Make sure that you have configured the storage system. For details, refer to the [Manage Custom Sounds and Emojis](https://docs.rocket.chat/docs/manage-custom-sounds-and-emojis) document.
Permission required: `manage-emoji`
### Changelog
| Version | Description |
| ---------------- | ------------|
|0.74.0 | Added |
operationId: post-api-v1-emoji-custom.create
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
multipart/form-data:
schema:
type: object
required:
- emoji
- name
properties:
emoji:
type: string
description: The image file to use as the new custom emoji.
format: binary
name:
type: string
description: The name of the new custom emoji.
aliases:
type: string
description: The alias of the new custom emoji. You can enter more than one alias as comma-separated values.
responses:
'200':
$ref: '#/components/responses/trueSuccess'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
examples:
Example 1:
value:
success: false
error: Missing Content-Type
Example 2:
value:
success: false
error: '[No file uploaded]'
errorType: No file uploaded
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/emoji-custom.delete:
post:
tags:
- Custom Emoji
summary: Delete a Custom Emoji
description: |-
Delete a custom emoji. Permission required: `manage-emoji`
### Changelog
| Version | Description |
| ---------------- | ------------|
|0.74.0 | Added |
operationId: post-api-v1-emoji-custom.delete
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
required:
- emojiId
properties:
emojiId:
type: string
description: Enter the emoji ID to delete.
examples:
Example:
value:
emojiId: 6542e83aa2f73c7460e18efb
responses:
'200':
$ref: '#/components/responses/trueSuccess'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
examples:
Example 1:
value:
success: false
error: The "emojiId" params is required!
Example 2:
value:
success: false
error: 'Invalid emoji [Custom_Emoji_Error_Invalid_Emoji]'
errorType: Custom_Emoji_Error_Invalid_Emoji
details:
method: deleteEmojiCustom
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/emoji-custom.list:
get:
tags:
- Custom Emoji
summary: Get Updated List of Custom Emojis
description: |-
Get a list of updated and removed emojis.
### Changelog
| Version | Description |
| ---------------- | ------------|
|7.0.0 | Added `_id` and `_updatedAt` query parameter |
|0.75.0 | Added |
operationId: get-api-v1-emoji-custom.list
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
- name: updatedSince
in: query
description: 'Date since the emojis were updated. Format: ISO string. When you provide the `updatedSince` query parameter in the URL then the `update` and `remove` in the response will contain only those updated and removed since this date and time.'
schema:
type: string
example: '2017-11-25T15:08:17.248Z'
- name: _updatedAt
in: query
description: ''
schema:
type: string
example: '2024-11-02T06:40:43.751Z'
- name: _id
in: query
description: Filter list by custom emoji id.
schema:
type: string
example: 6725ca0a101755229a8cb3bf
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
emojis:
type: object
properties:
update:
type: array
items:
type: object
properties:
_id:
type: string
name:
type: string
aliases:
type: array
items:
type: object
extension:
type: string
_updatedAt:
type: string
remove:
type: array
items:
type: object
properties:
_id:
type: string
name:
type: string
aliases:
type: array
items:
type: object
extension:
type: string
_updatedAt:
type: string
success:
type: boolean
examples:
Success Example:
value:
emojis:
update:
- _id: S5XvYppoLrLd9JvQm
name: teste
aliases: []
extension: jpg
_updatedAt: '2019-02-18T16:48:35.119Z'
remove:
- _id: 2dbVBG434dnsdh23
name: teste3
aliases: []
extension: jpg
_updatedAt: '2019-02-18T16:48:35.119Z'
success: true
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/emoji-custom.update:
post:
tags:
- Custom Emoji
summary: Update a Custom Emoji
description: |-
Update a custom emoji. Permission required: `manage-emoji`
### Changelog
| Version | Description |
| ---------------- | ------------|
|0.74.0 | Added |
operationId: post-api-v1-emoji-custom.update
parameters:
- $ref: '#/components/parameters/UserId'
- $ref: '#/components/parameters/Auth-Token'
requestBody:
description: ''
content:
multipart/form-data:
schema:
type: object
required:
- name
- _id
properties:
emoji:
type: string
description: Upload the emoji file that you want to update as form-data.
name:
type: string
description: Enter the name of the emoji that you want to update.
example: my-custom-emoji
_id:
type: string
description: Enter the emoji ID to be updated.
example: AG7DSB2H32YHS
aliases:
type: string
description: The alias of the custom emoji. You can enter more than one alias as comma-separated values.
example: emoji-alias
responses:
'200':
$ref: '#/components/responses/trueSuccess'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
errorType:
type: string
examples:
Example 1:
value:
success: false
error: '[The required "_id" query param is missing.]'
errorType: The required "_id" query param is missing.
Example 2:
value:
success: false
error: '[Emoji not found.]'
errorType: Emoji not found.
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/custom-sounds.list:
get:
tags:
- Custom Sounds
summary: List Custom Sounds
description: |-
List all custom sounds.
### Changelog
| Version | Description |
| ---------------- | ------------|
|2.4.0 | Added `name` query parameter for filtering. |
|2.4.0 | Added |
operationId: get-api-v1-custom-sounds.list
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/query'
- name: name
in: query
description: Filter list by the name of the custom sound.
schema:
type: string
example: drill
- schema: {}
in: query
name: sort
description: |-
Sort the results in ascending (`1`) or descending (`-1`) order. The options are:
* `name`: Sort the results by name. For example, `sort={"name": 1}` (default) or `sort={"name": -1}`.
* `_id`: Sort by ID. For example, `sort={"_id": 1}` or `sort={"_id": -1}`.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
sounds:
type: array
items:
type: object
properties:
_id:
type: string
name:
type: string
extension:
type: string
_updatedAt:
type: string
count:
type: integer
offset:
type: integer
total:
type: integer
success:
type: boolean
examples:
Success:
value:
sounds:
- _id: 65462caea2f73c7460e18f83
name: doremi
extension: mp3
_updatedAt: '2023-11-04T11:36:14.171Z'
count: 1
offset: 0
total: 1
success: true
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/custom-user-status.list:
get:
tags:
- Custom User Status
summary: List Custom User Status
description: |-
Lists all available custom user's status.
### Changelog
| Version | Description |
| ---------------- | ------------|
|7.0.0 | Added `name` and `_id` query parameters for filtering. |
|2.4.0 | Added |
operationId: get-api-v1-custom-user-status.list
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
- name: name
in: query
description: Filter list by the name of the custom status.
schema:
type: string
example: lunch
- name: _id
in: query
description: Filter list by the _id of the custom status.
schema:
type: string
example: 6731e2ce3b74d3c57d334d0f
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/offset'
- schema: {}
in: query
name: sort
description: |-
Sort the order of custom user status in ascending (`1`) or descending (`-1`) order. The options are:
* `name`: Sort by name. For example, `sort={"name": 1}` (default) or `sort={"name": -1}`.
* `statusType`: Sort by status type. For example, `sort={"statusType": 1}` or sort=`{"statusType": -1}`.
* You can also sort using both parameters. For example, `sort={"name": 1, "statusType": -1}`.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
statuses:
type: array
items:
type: object
properties:
_id:
type: string
name:
type: string
statusType:
type: string
_updatedAt:
type: string
count:
type: integer
offset:
type: integer
total:
type: integer
success:
type: boolean
examples:
Success Example:
value:
statuses:
- _id: 63f61be0b000b6b6d86704c8
name: brb
statusType: away
_updatedAt: '2023-02-22T13:42:56.811Z'
count: 1
offset: 0
total: 1
success: true
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/custom-user-status.create:
post:
tags:
- Custom User Status
summary: Create Custom Status
description: |
Create a custom user status. Permission required: `manage-user-status`
### Changelog
| Version | Description |
| ---------------- | ------------|
|2.4.0 | Added |
operationId: post-api-v1-custom-user-status.create
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The name of the custom status.
statusType:
type: string
description: 'The `statusType` of the custom status. Valid status type includes: `Online`, `Busy`, `Away`, `Offline`.'
required:
- name
- statusType
examples:
Example:
value:
name: caught up
statusType: busy
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
customUserStatus:
type: object
properties:
_id:
type: string
name:
type: string
statusType:
type: string
_updatedAt:
type: string
success:
type: boolean
examples:
Success Example:
value:
customUserStatus:
_id: 65462e97a2f73c7460e18f84
name: caught up
statusType: busy
_updatedAt: '2023-11-04T11:44:23.366Z'
success: true
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
errorType:
type: string
details:
type: object
properties:
method:
type: string
examples:
Missing Name Param:
value:
success: false
error: 'The field Name is required [error-the-field-is-required]'
errorType: error-the-field-is-required
details:
method: insertOrUpdateUserStatus
field: Name
Status name already in use:
value:
success: false
error: 'The custom user status name is already in use [Custom_User_Status_Error_Name_Already_In_Use]'
errorType: Custom_User_Status_Error_Name_Already_In_Use
details:
method: insertOrUpdateUserStatus
Invalid Status Type:
value:
success: false
error: 'Offline is not a valid status type [error-input-is-not-a-valid-field]'
errorType: error-input-is-not-a-valid-field
details:
method: insertOrUpdateUserStatus
input: Offline
field: StatusType
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/custom-user-status.update:
post:
tags:
- Custom User Status
summary: Update Custom Status
description: |-
Update a custom status. Permission required: `manage-user-status`
### Changelog
| Version | Description |
| ---------------- | ------------|
|2.4.0 | Added |
operationId: post-api-v1-custom-user-status.update
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
properties:
_id:
type: string
description: The `_id` of the custom status.
name:
type: string
description: The updated name of the custom status.
statusType:
type: string
description: The updated `statusType` of the custom status
required:
- _id
- name
- statusType
examples:
Example:
value:
_id: 65462e97a2f73c7460e18f84
name: caught up again
statusType: busy
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
customUserStatus:
type: object
properties:
_id:
type: string
name:
type: string
statusType:
type: string
_updatedAt:
type: string
success:
type: boolean
examples:
Success Example:
value:
customUserStatus:
_id: 65462e97a2f73c7460e18f84
name: caught up again
statusType: busy
_updatedAt: '2023-11-04T11:51:28.353Z'
success: true
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
examples:
User status not found:
value:
success: false
error: No custom user status found with the id of "SeZHHb77QXWRbnDh".
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/custom-user-status.delete:
post:
tags:
- Custom User Status
summary: Delete Custom User Status
description: |-
Delete a custom user status. Permission required: `manage-user-status`
### Changelog
| Version | Description |
| ---------------- | ------------|
|2.4.0 | Added |
operationId: post-api-v1-custom-user-status.delete
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
properties:
customUserStatusId:
type: string
description: The `_id` of the custom status
required:
- customUserStatusId
examples:
Example:
value:
customUserStatusId: 65462e97a2f73c7460e18f84
responses:
'200':
$ref: '#/components/responses/trueSuccess'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
examples:
'User status Id is required:':
value:
success: false
error: The "customUserStatusId" params is required!
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/assets.setAsset:
post:
tags:
- Assets
summary: Set Asset
description: |-
Upload an <a href="https://docs.rocket.chat/docs/assets" target="_blank"> asset</a> by name. Permissions required: `manage-assets`. Make sure that the workspace's <a href='https://docs.rocket.chat/docs/file-upload' target='_blank'>file upload settings</a> are configured as required. The allowed file size and type depend on the file upload settings.
### Changelog
| Version | Description |
| ---------------- | ------------|
|0.69.0 | Added |
operationId: post-api-v1-assets.setAsset
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
description: ''
content:
multipart/form-data:
schema:
type: object
required:
- asset
- assetName
properties:
asset:
type: string
description: Upload the file as form-data.
assetName:
type: string
description: |-
Type of asset to upload. The value can be one of the following:
* `logo`
* `background`
* `favicon_ico`
* `favicon`
* `favicon_16`
* `favicon_32`
* `favicon_192`
* `favicon_512`
* `touchicon_180`
* `touchicon_180_pre`
* `tile_70`
* `tile_144`
* `tile_150`
* `tile_310_square`
* `tile_310_wide`
* `safari_pinned`
refreshAllClients:
type: boolean
description: Set to true if all clients must be refreshed to immediately apply the changes.
responses:
'200':
$ref: '#/components/responses/trueSuccess'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
examples:
No asset name:
value:
success: false
error: Invalid asset
Example 1:
value:
success: false
error: '[No file uploaded]'
errorType: No file uploaded
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/assets.unsetAsset:
post:
tags:
- Assets
summary: Unset Asset
description: |-
Remove an asset by name. Permissions required: `manage-assets` .
### Changelog
| Version | Description |
| ---------------- | ------------|
|0.69.0 | Added |
operationId: post-api-v1-assets.unsetAsset
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
properties:
assetName:
type: string
description: |-
Type of asset to remove. The value can be one of the following:
* `logo`
* `background`
* `favicon_ico`
* `favicon`
* `favicon_16`
* `favicon_32`
* `favicon_192`
* `favicon_512`
* `touchicon_180`
* `touchicon_180_pre`
* `tile_70`
* `tile_144`
* `tile_150`
* `tile_310_square`
* `tile_310_wide`
* `safari_pinned`
refreshAllClients:
type: boolean
description: Set to true if all clients must be refreshed to immediately apply the changes.
required:
- assetName
examples:
Example:
value:
assetName: logo
refreshAllClients: true
responses:
'200':
$ref: '#/components/responses/trueSuccess'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
errorType:
type: string
examples:
Example 1:
value:
success: false
error: 'must have required property ''assetName'' [invalid-params]'
errorType: invalid-params
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/custom-sounds.getOne:
get:
summary: Get Custom Sound
tags:
- Custom Sounds
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
sound:
type: object
properties:
_id:
type: string
name:
type: string
extension:
type: string
_updatedAt:
type: string
examples:
Request succeeded; returns the sound metadata.:
value:
success: true
sound:
_id: 65462caea2f73c7460e18f83
name: doremi
extension: mp3
_updatedAt: '2023-11-04T11:36:14.171Z'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
errorType:
type: string
examples:
Invalid or missing _id:
value:
success: false
error: '[The required "_id" query param is missing.]'
errorType: The required "_id" query param is missing.
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties: