Skip to content

Commit 42ab295

Browse files
committed
add description of new OCS endpoint
for recommendations of files and folders see nextcloud/recommendations#458 Signed-off-by: sualko <klaus@jsxc.org>
1 parent 085c935 commit 42ab295

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

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

0 commit comments

Comments
 (0)