View source: R/ndex_networks_ndex_properties.r
ndex_network_get_permission | R Documentation |
This function retrieves the user or group permissions for a network
ndex_network_get_permission(ndexcon, networkId, type, permission, start, size)
ndexcon |
object of class NDExConnection linkndex_connect |
networkId |
unique ID of the network |
type |
character ("user"|"group"); specifies whether user or group permissions should be returned |
permission |
character (optional)("READ"|"WRITE"|"ADMIN"); 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. |
data.frame containing user or group UUIDs and the highest permission assigned to that user or group
GET: ndex_config$api$network$permission$get
Compatible to NDEx server version 1.3 and 2.0
In version 1.3 the function only returns user permissions and differs in the returned data (more columns)!
Requires an authorized user! (ndex_connect with credentials)
## Establish a server connection with credentials
# ndexcon = ndex_connect('MyAccountName', 'MyPassword')
## Find one of your networks and get its UUID
# networks = ndex_find_networks(ndexcon, accountName='MyAccountName')
# networkId = networks[1,"externalId"]
## Get the permissions
# permissions = ndex_network_get_permission(ndexcon, networkId, 'user')
## Version 2.0:
## names(permission)
## [1] "memberUUID" "permission"
## Version 1.3:
## names(permission)
## [1] "membershipType" "memberUUID" "resourceUUID"
## [4] "memberAccountName" "permissions" "resourceName"
# permissions = ndex_network_get_permission(ndexcon, networkId, 'user', NULL) # same as previous
# permissions = ndex_network_get_permission(ndexcon, networkId, 'user', 'READ', 0, 10)
# permissions = ndex_network_get_permission(ndexcon, networkId, 'group')
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.