mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
feat(coderd): add format option to inbox notifications watch endpoint (#17034)
This PR aims to allow clients to use different format for the title and content of inbox notifications - on the watch endpoint. This solution will help to have it working and formatted differently on VSCode, WebUI ... [Related to this issue](https://github.com/coder/internal/issues/523)
This commit is contained in:
19
docs/reference/api/notifications.md
generated
19
docs/reference/api/notifications.md
generated
@ -61,11 +61,12 @@ curl -X GET http://coder-server:8080/api/v2/notifications/inbox \
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
|---------------|-------|--------|----------|-------------------------------------------------------------------------|
|
||||
| `targets` | query | string | false | Comma-separated list of target IDs to filter notifications |
|
||||
| `templates` | query | string | false | Comma-separated list of template IDs to filter notifications |
|
||||
| `read_status` | query | string | false | Filter notifications by read status. Possible values: read, unread, all |
|
||||
| Name | In | Type | Required | Description |
|
||||
|-------------------|-------|--------------|----------|-----------------------------------------------------------------------------------------------------------------|
|
||||
| `targets` | query | string | false | Comma-separated list of target IDs to filter notifications |
|
||||
| `templates` | query | string | false | Comma-separated list of template IDs to filter notifications |
|
||||
| `read_status` | query | string | false | Filter notifications by read status. Possible values: read, unread, all |
|
||||
| `starting_before` | query | string(uuid) | false | ID of the last notification from the current page. Notifications returned will be older than the associated one |
|
||||
|
||||
### Example responses
|
||||
|
||||
@ -146,6 +147,14 @@ curl -X GET http://coder-server:8080/api/v2/notifications/inbox/watch \
|
||||
| `targets` | query | string | false | Comma-separated list of target IDs to filter notifications |
|
||||
| `templates` | query | string | false | Comma-separated list of template IDs to filter notifications |
|
||||
| `read_status` | query | string | false | Filter notifications by read status. Possible values: read, unread, all |
|
||||
| `format` | query | string | false | Define the output format for notifications title and body. |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Parameter | Value |
|
||||
|-----------|-------------|
|
||||
| `format` | `plaintext` |
|
||||
| `format` | `markdown` |
|
||||
|
||||
### Example responses
|
||||
|
||||
|
Reference in New Issue
Block a user