From 79122896318ae50c835418888f7f781fa2e463f4 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Thu, 17 Nov 2016 12:41:48 +0000 Subject: Allow sorting groups in API Allow `order_by` and `sort` parameters to `/api/v3/groups.json`. At present, only ordering by name and path is supported, and the default sort is name ascending (alphabetical order). --- doc/api/groups.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/groups.md b/doc/api/groups.md index 45a3118f27a..5e6f498c365 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -6,8 +6,13 @@ Get a list of groups. (As user: my groups or all available, as admin: all groups Parameters: -- `all_available` (optional) - if passed, show all groups you have access to -- `skip_groups` (optional)(array of group IDs) - if passed, skip groups +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `skip_groups` | array of integers | no | Skip the group IDs passes | +| `all_available` | boolean | no | Show all the groups you have access to | +| `search` | string | no | Return list of authorized groups matching the search criteria | +| `order_by` | string | no | Order groups by `name` or `path`. Default is `name` | +| `sort` | string | no | Order groups in `asc` or `desc` order. Default is `asc` | ``` GET /groups -- cgit v1.2.3