From e78fe852148f149301190eacbe2a10f1473bae73 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 23 Nov 2023 11:46:41 +0100 Subject: [PATCH] Design: small update to add a PATCH endpoint Endpoint to update a notification. This will be used by the front-end to mark a notification as read, for example. Ref: https://github.com/readthedocs/readthedocs.org/pull/10890#discussion_r1403203545 --- docs/dev/design/new-notifications-system.rst | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/dev/design/new-notifications-system.rst b/docs/dev/design/new-notifications-system.rst index d62f190016c..87d62432f81 100644 --- a/docs/dev/design/new-notifications-system.rst +++ b/docs/dev/design/new-notifications-system.rst @@ -425,6 +425,30 @@ Notification create we want to attach a ``Notification`` (e.g. ``User``, ``Organization``, etc) +Notification update +~~~~~~~~~~~~~~~~~~~ + + +.. http:patch:: /api/v3/projects/(str:project_slug)/builds/(int:build_id)/notifications/(int:notification_id)/ + + Update an existing notification. + Mainly used to change the state from the front-end. + + **Example request**: + + .. sourcecode:: json + + { + "state": "read", + } + + +.. note:: + + Similar API endpoints will be created for each of the resources + we want to attach a ``Notification`` (e.g. ``User``, ``Organization``, etc) + + Backward compatibility ----------------------