Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions content-management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,106 @@ paths:
success: false
error: 'User does not have the permissions required for this action [error-unauthorized]'
errorType: error-unauthorized
/api/v1/custom-sounds.delete:
post:
tags:
- Custom Sounds
summary: Delete Custom Sound
description: |-
Delete a custom sound from the workspace by its `_id`. This also removes the associated audio file from storage.

This endpoint replaces the deprecated DDP method `deleteCustomSound`, which now logs a deprecation warning and is scheduled for removal in `9.0.0`.

Permission required: `manage-sounds`

### Changelog
| Version | Description |
| ------- | ----------- |
| 8.6.0 | Added |
operationId: post-api-v1-custom-sounds.delete
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 sound to delete. Must be at least one character long.
example: 65462caea2f73c7460e18f83
required:
- _id
examples:
Example:
value:
_id: 65462caea2f73c7460e18f83
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:
Invalid sound:
value:
success: false
error: Custom_Sound_Error_Invalid_Sound
Missing required field:
value:
success: false
error: 'must have required property ''_id'' [invalid-params]'
errorType: invalid-params
'401':
$ref: '#/components/responses/authorizationError'
'403':
description: Forbidden
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
errorType:
type: string
examples:
Permission Error:
value:
success: false
error: 'User does not have the permissions required for this action [error-unauthorized]'
errorType: error-unauthorized
# <!-- TODO: Verify the exact status code returned when `_id` does not match an existing sound. The endpoint's response validators declare both 404 (validateNotFoundErrorResponse) and 500 (validateInternalErrorResponse), but the handler in apps/meteor/app/api/server/v1/custom-sounds.ts maps the `Custom_Sound_Error_Invalid_Sound` error to API.v1.failure (400) and falls back to API.v1.internalError (500) for other errors. Confirm whether a 404 is ever returned in practice before documenting it. -->
'500':
description: Internal Server Error
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
examples:
Internal Error:
value:
success: false
error: Internal server error
/api/v1/custom-user-status.list:
get:
tags:
Expand Down
88 changes: 81 additions & 7 deletions messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ paths:
* The `delete-own-message` permission is required to delete users' own messages.
* The `delete-message` permission is required for users to delete messages from other users.

You can delete a message by its `roomId` and `msgId`, or delete a message by its `fileId` to remove the message that holds an uploaded file.

### Changelog
| Version | Description |
| Version | Description |
| ---------------- | ------------|
| 8.6.0 | Added `fileId` to delete a message by the file it contains. |
| 0.48.0 | Added |
operationId: post-api-v1-chat.delete
parameters:
Expand All @@ -35,25 +38,30 @@ paths:
application/json:
schema:
type: object
description: |-
Provide either `roomId` and `msgId` together, or `fileId` on its own.
properties:
roomId:
type: string
description: The room ID
description: The room ID. Required when deleting by `msgId`.
msgId:
type: string
description: The ID of the message to delete.
description: The ID of the message to delete. Required together with `roomId`.
fileId:
type: string
description: The ID of the uploaded file whose message you want to delete. Use this instead of `roomId` and `msgId` to delete the message that contains the file.
asUser:
type: boolean
description: Should the message be deleted as the user who sent it? It is `false` by default.
required:
- roomId
- msgId
examples:
Example:
Delete by message:
value:
roomId: ByehQjC44FwMeiLbX
msgId: 7aDSXtjMA3KPLxLjt
asUser: false
Delete by file:
value:
fileId: 9aFcj4XmgQ7eYpLbT
responses:
'200':
description: OK
Expand Down Expand Up @@ -3705,6 +3713,72 @@ paths:
name: url
description: Enter the URL that you want to preview.
required: true
/api/v1/im.blockUser:
post:
tags:
- DM
summary: Block User in DM
description: |-
Blocks or unblocks the other user in a direct message room. Set `block` to `true` to block the user, or `false` to unblock them. The endpoint blocks or unblocks the room member who is not the authenticated user.

This endpoint replaces the deprecated `blockUser` and `unblockUser` DDP methods. The DDP methods log a deprecation warning and remain available until 9.0.0.

### Changelog
| Version | Description |
| ------------ | ------------|
| 8.6.0 | Added |
operationId: post-api-v1-im.blockUser
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
properties:
roomId:
type: string
description: The direct message room ID.
block:
type: boolean
description: Set to `true` to block the other user, or `false` to unblock them.
required:
- roomId
- block
examples:
Block:
value:
roomId: ByehQjC44FwMeiLbX
block: true
Unblock:
value:
roomId: ByehQjC44FwMeiLbX
block: false
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:
Invalid room:
value:
success: false
error: 'Invalid room [error-invalid-room]'
errorType: error-invalid-room
'401':
$ref: '#/components/responses/authorizationError'
/api/v1/dm.close:
post:
tags:
Expand Down
103 changes: 101 additions & 2 deletions miscellaneous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,15 @@ paths:
/api/v1/spotlight:
get:
summary: Spotlight
description: |-
description: |-
Searches for users or rooms that are visible to the user. It will only return rooms that user didn't join yet.


If the `Accounts_AllowAnonymousRead` setting is enabled, anonymous callers can use this endpoint to resolve public channels through the navbar search.

### Changelog
| Version | Description |
| ---------------- | ------------|
| 8.6.0 | Added `usernames`, `type`, and `rid` query parameters, and allowed anonymous read when `Accounts_AllowAnonymousRead` is enabled. |
|0.64.0 | Added support to '#' and '@' searches, for channels and users respectively. |
|0.61.0 | Added |
operationId: get-api-v1-spotlight
Expand All @@ -712,6 +715,27 @@ paths:
schema:
type: string
example: john
- name: usernames
in: query
description: Comma-separated list of usernames to exclude from the user results.
required: false
schema:
type: string
example: 'rocket.cat,john.doe'
- name: type
in: query
description: Restricts the search to a single result type. Accepts `users` or `rooms`.
required: false
schema:
type: string
example: users
- name: rid
in: query
description: The room ID to scope the user search to a specific room.
required: false
schema:
type: string
example: GENERAL
responses:
'200':
description: OK
Expand Down Expand Up @@ -781,6 +805,81 @@ paths:
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
/api/v1/fingerprint:
post:
summary: Update Fingerprint
description: |-
Confirms how the workspace deployment fingerprint should be interpreted after a change to its configuration. Use `new-workspace` to register the deployment as a new workspace and clear the existing <a href='https://docs.rocket.chat/docs/cloud-services' target='_blank'>Rocket.Chat Cloud</a> credentials, or `updated-configuration` to keep the current registration.

Permission required: `manage-cloud`

### Changelog
| Version | Description |
| ----------- | ----------- |
| 8.6.0 | Added an authorization check. Callers without the `manage-cloud` permission now receive a `403` error instead of a successful response. |
operationId: post-api-v1-fingerprint
parameters:
- $ref: '#/components/parameters/Auth-Token'
- $ref: '#/components/parameters/UserId'
requestBody:
content:
application/json:
schema:
type: object
properties:
setDeploymentAs:
type: string
description: How to interpret the deployment after the configuration change. Either `new-workspace` or `updated-configuration`.
example: new-workspace
required:
- setDeploymentAs
examples:
Example 1:
value:
setDeploymentAs: new-workspace
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: 'Invalid body params'
errorType: error-invalid-body-params
'401':
$ref: '#/components/responses/authorizationError'
'403':
description: Forbidden
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
error:
type: string
errorType:
type: string
examples:
Permission Error:
value:
success: false
error: 'User does not have the permissions required for this action [error-unauthorized]'
errorType: error-unauthorized
/api/v1/licenses.info:
get:
tags:
Expand Down
Loading