ndex_user_list_groups: Get User's Group Memberships

Description Usage Arguments Value REST query Note Examples

View source: R/ndex_users.R

Description

Query finds groups for which the current user has the specified membership type. If the "type' parameter is omitted, all membership types will be returned. Returns a map which maps a group UUID to the membership type the authenticated user has.

Usage

1
ndex_user_list_groups(ndexcon, userId, type = NULL, start = NULL, size = NULL)

Arguments

ndexcon

object of class NDExConnection linkndex_connect

userId

character; unique ID (UUID) of the user

type

character (optional)("MEMBER"|"GROUPADMIN"); constrains the type of the returned membership. If not set (or NULL), all permission types will be returned.

start

integer (optional); specifies that the result is the nth page of the requested data.

size

integer (optional); specifies the number of data items in each page.

Value

List of permissions of that user or empty object

REST query

GET: ndex_config$api$user$group$list

Note

Requires an authorized user! (ndex_connect with credentials)

Compatible to NDEx server version 2.0

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Establish a server connection with credentials 
# ndexcon = ndex_connect('MyAccountName', 'MyPassword')
## Find user and get its id
# user = ndex_find_user_byName(ndexcon, 'MyAccountName')
# userId = user$externalId
## Find the user's groups and get one group id
# groups = ndex_user_list_groups(ndexcon, userId)
## $`ggggggg-rrrr-oooo-uuuu-pppppp111111`
## [1] "MEMBER"
##
## $`ggggggg-rrrr-oooo-uuuu-pppppp222222`
## [1] "GROUPADMIN"
# groupIds = names(groups)
## [1] "ggggggg-rrrr-oooo-uuuu-pppppp111111" "ggggggg-rrrr-oooo-uuuu-pppppp222222"
NULL

ndexr documentation built on March 13, 2021, 2 a.m.