diff --git a/extensions/graph/groups.md b/extensions/graph/groups.md index 145ff82b554..c32e1c93569 100644 --- a/extensions/graph/groups.md +++ b/extensions/graph/groups.md @@ -59,6 +59,57 @@ Response: } ``` + +#### `GET /groups?$expand=members` + +Returns a list of all groups including its members + +Example: + +``` +curl -k 'https://localhost:9200/graph/v1.0/groups?$expand=members' -u user:password + +``` + +Response: + +``` +{ + "value": [ + { + "displayName": "group", + "id": "38580a2e-7018-42ed-aff6-b2af0b4e9790", + "members": [ + { + "displayName": "user1", + "id": "2e7b7e23-6c42-4d34-81b0-2bed34e51983", + "mail": "user1@example.org", + "onPremisesSamAccountName": "user1" + }, + { + "displayName": "user2", + "id": "b45c9e35-0d95-4165-96bc-68bff4a316ed", + "mail": "user2@example.org", + "onPremisesSamAccountName": "user2" + } + ] + }, + { + "displayName": "Example Users", + "id": "7a20f238-8a22-4458-902d-47674c317e5f", + "members": [ + { + "displayName": "user3", + "id": "026fbfef-79ef-4f5d-887b-9eaf42777239", + "mail": "user3@example.org", + "onPremisesSamAccountName": "user3" + } + ] + } + ] +} +``` + #### `GET /groups/{groupid}` Example: @@ -75,6 +126,31 @@ Response: "id": "7a20f238-8a22-4458-902d-47674c317e5f" } ``` + +#### `GET /groups/{groupid}?$expand=members` + +Example: + +``` +curl -k 'https://localhost:9200/graph/v1.0/groups/7a20f238-8a22-4458-902d-47674c317e5f?$expand=members' -u user:password +``` + +Response: + +``` +{ + "displayName": "Example Users", + "id": "7a20f238-8a22-4458-902d-47674c317e5f", + "members": [ + { + "displayName": "user3", + "id": "026fbfef-79ef-4f5d-887b-9eaf42777239", + "mail": "user3@example.org", + "onPremisesSamAccountName": "user3" + } + ] +} +``` ### Getting Group Members #### `GET /groups/{groupid}/members` diff --git a/extensions/graph/users.md b/extensions/graph/users.md index d8715d7b792..fe4dadfeffd 100644 --- a/extensions/graph/users.md +++ b/extensions/graph/users.md @@ -87,6 +87,62 @@ Response: } ``` +#### `GET /users?$expand=memberOf` + +Returns a list of all users + +Example: + +``` +curl -k 'https://localhost:9200/graph/v1.0/users?$expand=memberOf' -u user:password + +``` + +Response: + +``` +{ + "value": [ + { + "displayName": "Albert Einstein", + "id": "4c510ada-c86b-4815-8820-42cdf82c3d51", + "mail": "einstein@example.org", + "onPremisesSamAccountName": "einstein", + "memberOf": [ + { + "displayName": "users", + "id": "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa" + }, + { + "displayName": "sailing-lovers", + "id": "6040aa17-9c64-4fef-9bd0-77234d71bad0" + }, + { + "displayName": "violin-haters", + "id": "dd58e5ec-842e-498b-8800-61f2ec6f911f" + }, + { + "displayName": "physics-lovers", + "id": "262982c1-2362-4afa-bfdf-8cbfef64a06e" + } + ], + }, + { + "displayName": "Maurice Moss", + "id": "058bff95-6708-4fe5-91e4-9ea3d377588b", + "mail": "moss@example.org", + "onPremisesSamAccountName": "moss", + "memberOf": [ + { + "displayName": "users", + "id": "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa" + } + ], + } + ] +} +``` + #### `GET /users/{userid or accountname}` Example: @@ -106,6 +162,31 @@ Response: } ``` +#### `GET /users/{userid or accountname}?$expand=memberOf` + +Example: + +``` +curl -k 'https://localhost:9200/graph/v1.0/users/058bff95-6708-4fe5-91e4-9ea3d377588b?$expand=memberOf' -u user:password +``` + +Response: + +``` +{ + "displayName": "Maurice Moss", + "id": "058bff95-6708-4fe5-91e4-9ea3d377588b", + "mail": "moss@example.org", + "onPremisesSamAccountName": "moss", + "memberOf": [ + { + "displayName": "users", + "id": "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa" + } + ], +} +``` + ### Creating / Updating Users #### `POST /users` diff --git a/grpc_apis/ocis/messages/search/v0/grpc.md b/grpc_apis/ocis/messages/search/v0/grpc.md index ea9609f993f..07b43ed2b7a 100644 --- a/grpc_apis/ocis/messages/search/v0/grpc.md +++ b/grpc_apis/ocis/messages/search/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.search.v0" url: /grpc_apis/ocis_messages_search_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/settings/v0/grpc.md b/grpc_apis/ocis/messages/settings/v0/grpc.md index b211377ee9c..874b2d09372 100644 --- a/grpc_apis/ocis/messages/settings/v0/grpc.md +++ b/grpc_apis/ocis/messages/settings/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.settings.v0" url: /grpc_apis/ocis_messages_settings_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/store/v0/grpc.md b/grpc_apis/ocis/messages/store/v0/grpc.md index 2d804726d06..dca38df8361 100644 --- a/grpc_apis/ocis/messages/store/v0/grpc.md +++ b/grpc_apis/ocis/messages/store/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.store.v0" url: /grpc_apis/ocis_messages_store_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/messages/thumbnails/v0/grpc.md b/grpc_apis/ocis/messages/thumbnails/v0/grpc.md index bc79131c826..3480305f4fb 100644 --- a/grpc_apis/ocis/messages/thumbnails/v0/grpc.md +++ b/grpc_apis/ocis/messages/thumbnails/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.messages.thumbnails.v0" url: /grpc_apis/ocis_messages_thumbnails_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/search/v0/grpc.md b/grpc_apis/ocis/services/search/v0/grpc.md index 7c02ebfa538..6d795461d10 100644 --- a/grpc_apis/ocis/services/search/v0/grpc.md +++ b/grpc_apis/ocis/services/search/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.search.v0" url: /grpc_apis/ocis_services_search_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/settings/v0/grpc.md b/grpc_apis/ocis/services/settings/v0/grpc.md index 9c2cff12009..23110742e15 100644 --- a/grpc_apis/ocis/services/settings/v0/grpc.md +++ b/grpc_apis/ocis/services/settings/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.settings.v0" url: /grpc_apis/ocis_services_settings_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/store/v0/grpc.md b/grpc_apis/ocis/services/store/v0/grpc.md index 0ec1a3a6a2d..201f7eecc0d 100644 --- a/grpc_apis/ocis/services/store/v0/grpc.md +++ b/grpc_apis/ocis/services/store/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.store.v0" url: /grpc_apis/ocis_services_store_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis --- diff --git a/grpc_apis/ocis/services/thumbnails/v0/grpc.md b/grpc_apis/ocis/services/thumbnails/v0/grpc.md index f8c7d8a8506..24e3b95517a 100644 --- a/grpc_apis/ocis/services/thumbnails/v0/grpc.md +++ b/grpc_apis/ocis/services/thumbnails/v0/grpc.md @@ -1,7 +1,7 @@ --- title: "ocis.services.thumbnails.v0" url: /grpc_apis/ocis_services_thumbnails_v0 -date: 2022-06-09T12:38:34Z +date: 2022-06-09T13:22:54Z weight: 50 geekdocRepo: https://github.com/owncloud/ocis ---