Skip to content

Commit ae73989

Browse files
Merge pull request #10042 from nextcloud/feat/noid/user-status-restore
feat(status): Document user status restore
2 parents fad66ae + b2a2faa commit ae73989

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

developer_manual/client_apis/OCS/ocs-status-api.rst

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,24 @@ Fetch a specific user's status
151151
+ ``200 OK``
152152
+ ``404 Not Found`` If the user does not have a status set
153153

154-
Files Sharing
154+
Fetch a user's backup status
155+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156+
157+
In some scenarios the user's status can be overwritten automatically, e.g. by joining a call in Nextcloud Talk,
158+
or when the availability automation is enabled. In this case the userId can be prefixed with an `_` underscore,
159+
to get the original user status. When a user status is returned and the ``user_status`` > ``restore`` capability
160+
is available, the backup status should be added as an item in the predefined status list. Clicking that should then
161+
do an API call to `User status - Restore backup`_ should be done.
162+
163+
* Required capability: ``user_status``
164+
* Method: ``GET``
165+
* Endpoint: ``/_{userId}``
166+
* Response:
167+
- Status code:
168+
+ ``200 OK``
169+
+ ``404 Not Found`` If the user does not have a backup status set
170+
171+
Files Sharing
155172
^^^^^^^^^^^^^
156173

157174
The user-status is also exposed via the following Files Sharing APIs:
@@ -163,3 +180,13 @@ The user-status is also exposed via the following Files Sharing APIs:
163180
* ``GET /ocs/v2.php/apps/files_sharing/api/v1/shares/{id}``
164181
* ``POST /ocs/v2.php/apps/files_sharing//api/v1/shares``
165182
* ``PUT /ocs/v2.php/apps/files_sharing/api/v1/shares/{id}``
183+
184+
User status - Restore backup
185+
----------------------------
186+
187+
* Required capability: ``user_status`` > ``restore``
188+
* Method: ``DELETE``
189+
* Endpoint: ``/revert/{messageId}``
190+
* Response:
191+
- Status code:
192+
+ ``200 OK``

0 commit comments

Comments
 (0)