From 083f01ce13c942e42a6207d834e72afb9d39ddc8 Mon Sep 17 00:00:00 2001 From: Aaron Segura Date: Wed, 6 Jul 2022 17:00:24 -0600 Subject: [PATCH] Clarify usage of activity filters Signed-off-by: Aaron Segura --- docs/endpoint-v2.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/endpoint-v2.md b/docs/endpoint-v2.md index 8d72fdca3..b4827fa17 100644 --- a/docs/endpoint-v2.md +++ b/docs/endpoint-v2.md @@ -24,19 +24,28 @@ GET /ocs/v2.php/apps/activity/api/v2/activity With type filter ``` -GET /ocs/v2.php/apps/activity/api/v2/activity/:filter +GET /ocs/v2.php/apps/activity/api/v2/activity/{filter} ``` +Supported type filters can be obtained from: + +``` +GET /ocs/v2.php/apps/activity/api/v2/activity/filters +``` + +Additionally, filtering based on `object_type` and `object_id` (see below) is only valid when supplying `filter` as the type filter. Filtering results based on `object_type` and `object_id` parameters is not supported when using any other type filter. + ## Parameters Name | Type | Description ---- | ---- | ----------- `since` | int (Optional) | The integer ID of the last activity that you’ve seen. `limit` | int (Optional) | How many activities should be returned (Default: `50`) -`object_type` | string (Optional) | Allows to filter the activities to a given object. May only appear together with `object_id` -`object_id` | string (Optional) | Allows to filter the activities to a given object. May only appear together with `object_type` +`object_type` | string (Optional) | Allows to filter the activities to a given object. May only appear together with `object_id` and the `filter` type filter +`object_id` | string (Optional) | Allows to filter the activities to a given object. May only appear together with `object_type` and the `filter` type filter `sort` | string - `asc` or `desc` | Should activities be given ascending or descending (from the `since`) (Default: `desc`) + ## HTTP Status Status Code | Description