Skip to content

Commit c6d6732

Browse files
committed
add description of new OCS endpoint
for recommendations of files and folders see nextcloud/recommendations#458 Signed-off-by: sualko <[email protected]>
1 parent 085c935 commit c6d6732

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

developer_manual/client_apis/OCS/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ OCS API
1010
ocs-share-api
1111
ocs-sharee-api
1212
ocs-status-api
13+
ocs-recommendations-api
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
=======================
2+
OCS Recommendations API
3+
=======================
4+
5+
The OCS Recommendations API allows you to get a list of recommended files and folders with recent activity.
6+
7+
.. note:: This API requires the Recommendations app to be enabled.
8+
9+
The base URL for all calls to the share API is: *<nextcloud_base_url>/ocs/v2.php/apps/recommendations/api/v1/*
10+
11+
All calls to OCS endpoints require the ``OCS-APIRequest`` header to be set to ``true``.
12+
13+
.. warning:: This API is **experimental** and can change in the future without further notice!
14+
15+
16+
Recommendations - Retrieval
17+
---------------------------
18+
19+
Fetch user-controlled recommendations
20+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21+
22+
* Method: ``GET``
23+
* Endpoint: ``/recommendations``
24+
* Response:
25+
- Status code:
26+
+ ``200 OK``
27+
* Result:
28+
- `enabled` (boolean) True if recommendations are enabled for user. False otherwise.
29+
- `recommendations` (list, optional) List of recommended files and folders, if the user enabled recommendations.
30+
31+
Fetch user setting and recommendations
32+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
34+
* Method: ``GET``
35+
* Endpoint: ``/recommendations/always``
36+
* Response:
37+
- Status code:
38+
+ ``200 OK``
39+
* Result:
40+
- `enabled` (boolean) True if recommendations are enabled for user. False otherwise.
41+
- `recommendations` (list) List of recommended files and folders, independent of the users decision.

0 commit comments

Comments
 (0)