parent
38483b015c
commit
0a629440ad
@ -0,0 +1,33 @@ |
||||
# /api/v3/notifications/{id}/read_ian |
||||
--- |
||||
post: |
||||
summary: Read notification |
||||
operationId: Read_Notification |
||||
tags: |
||||
- Notifications |
||||
description: |- |
||||
Marks the given notification as read. |
||||
parameters: |
||||
- name: id |
||||
in: path |
||||
description: notification id |
||||
example: '1' |
||||
required: true |
||||
schema: |
||||
type: integer |
||||
responses: |
||||
'204': |
||||
description: OK |
||||
'404': |
||||
content: |
||||
application/hal+json: |
||||
schema: |
||||
$ref: '../components/schemas/error_response.yml' |
||||
example: |
||||
_type: Error |
||||
errorIdentifier: urn:openproject-org:api:v3:errors:NotFound |
||||
message: The requested resource could not be found. |
||||
description: |- |
||||
Returned if the notification does not exist or if the user does not have permission to view it. |
||||
|
||||
**Required permission** being recipient of the notification |
@ -0,0 +1,33 @@ |
||||
# /api/v3/notifications/{id}/unread_ian |
||||
--- |
||||
post: |
||||
summary: Unread notification |
||||
operationId: Unread_Notification |
||||
tags: |
||||
- Notifications |
||||
description: |- |
||||
Marks the given notification as unread. |
||||
parameters: |
||||
- name: id |
||||
in: path |
||||
description: notification id |
||||
example: '1' |
||||
required: true |
||||
schema: |
||||
type: integer |
||||
responses: |
||||
'204': |
||||
description: OK |
||||
'404': |
||||
content: |
||||
application/hal+json: |
||||
schema: |
||||
$ref: '../components/schemas/error_response.yml' |
||||
example: |
||||
_type: Error |
||||
errorIdentifier: urn:openproject-org:api:v3:errors:NotFound |
||||
message: The requested resource could not be found. |
||||
description: |- |
||||
Returned if the notification does not exist or if the user does not have permission to view it. |
||||
|
||||
**Required permission** being recipient of the notification |
@ -0,0 +1,47 @@ |
||||
# /api/v3/notifications/read_ian |
||||
--- |
||||
post: |
||||
summary: Read all notifications |
||||
operationId: Read_Notification_Collection |
||||
tags: |
||||
- Notifications |
||||
description: |- |
||||
Marks the whole notification collection as read. The collection contains only elements the authenticated user can |
||||
see, and can be further reduced with filters. |
||||
parameters: |
||||
- name: filters |
||||
in: query |
||||
description: |- |
||||
JSON specifying filter conditions. |
||||
Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) |
||||
endpoint. Currently supported filters are: |
||||
|
||||
+ id: Filter by primary key |
||||
|
||||
+ project: Filter by the project the notification was created in |
||||
|
||||
+ reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of |
||||
|
||||
+ resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the |
||||
`resourceType` filter. |
||||
|
||||
+ resourceType: Filter by the type of the resource the notification was created for. Ideally used together with |
||||
the `resourceId` filter. |
||||
example: '[{ "reason": { "operator": "=", "values": ["mentioned"] } }]' |
||||
required: false |
||||
schema: |
||||
type: string |
||||
responses: |
||||
'204': |
||||
description: OK |
||||
'400': |
||||
description: Returned if the request is not properly formatted. |
||||
content: |
||||
application/hal+json: |
||||
schema: |
||||
$ref: '../components/schemas/error_response.yml' |
||||
example: |
||||
_type: Error |
||||
errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery |
||||
message: |
||||
- Filters Invalid filter does not exist. |
@ -0,0 +1,47 @@ |
||||
# /api/v3/notifications/unread_ian |
||||
--- |
||||
post: |
||||
summary: Unread all notifications |
||||
operationId: Unread_Notification_Collection |
||||
tags: |
||||
- Notifications |
||||
description: |- |
||||
Marks the whole notification collection as unread. The collection contains only elements the authenticated user can |
||||
see, and can be further reduced with filters. |
||||
parameters: |
||||
- name: filters |
||||
in: query |
||||
description: |- |
||||
JSON specifying filter conditions. |
||||
Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) |
||||
endpoint. Currently supported filters are: |
||||
|
||||
+ id: Filter by primary key |
||||
|
||||
+ project: Filter by the project the notification was created in |
||||
|
||||
+ reason: Filter by the reason, e.g. 'mentioned' or 'assigned' the notification was created because of |
||||
|
||||
+ resourceId: Filter by the id of the resource the notification was created for. Ideally used together with the |
||||
`resourceType` filter. |
||||
|
||||
+ resourceType: Filter by the type of the resource the notification was created for. Ideally used together with |
||||
the `resourceId` filter. |
||||
example: '[{ "reason": { "operator": "=", "values": ["mentioned"] } }]' |
||||
required: false |
||||
schema: |
||||
type: string |
||||
responses: |
||||
'204': |
||||
description: OK |
||||
'400': |
||||
description: Returned if the request is not properly formatted. |
||||
content: |
||||
application/hal+json: |
||||
schema: |
||||
$ref: '../components/schemas/error_response.yml' |
||||
example: |
||||
_type: Error |
||||
errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery |
||||
message: |
||||
- Filters Invalid filter does not exist. |
Loading…
Reference in new issue