Skip to content

GroupsApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateGroup POST /api/v1/scim/Groups Add a new user group
DeleteGroup DELETE /api/v1/scim/Groups/{id} Delete a group
FindGroups GET /api/v1/scim/Groups Retrieve a list of available groups
GetGroup GET /api/v1/scim/Groups/{id} Retrieve a group by id
PatchGroup PATCH /api/v1/scim/Groups/{id} Update a group

CreateGroup

CreateGroup201Response CreateGroup(body)

Add a new user group

The endpoint creates a new user group in ODM. The endpoint does not update an existing group. A user who calls the endpoint is added to the group automatically with the \"Group admin\" role. The \"members\" attribute in the request body must be empty, otherwise the endpoint returns an error. The endpoint does not require any user permission. The endpoint does not check the uniqueness of the group name. The user can create any number of groups with the same name. If there are attributes in the request body that ODM does not support, then ODM ignores them.

Example

library(odmApi)

# Add a new user group
#
# prepare function argument(s)
var_body <- createGroup_request$new("displayName_example", "externalId_example", "id_example", c("urn:ietf:params:scim:schemas:core:2.0:Group"), c(createGroup_request_members_inner$new("value_example", "$ref_example", "display_example"))) # CreateGroupRequest | 

api_instance <- GroupsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$CreateGroup(var_bodydata_file = "result.txt")
result <- api_instance$CreateGroup(var_body)
dput(result)

Parameters

Name Type Description Notes
body CreateGroupRequest

Return type

CreateGroup201Response

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/scim+json

HTTP response details

Status code Description Response headers
201 The operation is successful. The response body contains the representation of the newly created group. -
400 The object cannot be created, the supplied data or metadata are incorrect. See the error message for details. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
409 The object cannot be created, data conflict. See the error message for details. -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

DeleteGroup

DeleteGroup(id)

Delete a group

The endpoint deletes a group in ODM. The group can be deleted, even if it has members: admins and not admins. Users of this group are not deactivated. Permissions to call the endpoint:   - If the user does not have the \"Manage groups\" permission:      the user has \"Group admin\" role - the user can delete the group;      the user has \"Group member\" role - the group can not be deleted, an error is returned;     * the user is not a member of the specified group - the group can not be deleted, an error is returned.   - If the user has the \"Manage groups\" permission - the user can delete the group regardless of user’s membership in this group.

Example

library(odmApi)

# Delete a group
#
# prepare function argument(s)
var_id <- "id_example" # character | String, unique identifier of the group in ODM.

api_instance <- GroupsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
api_instance$DeleteGroup(var_id)

Parameters

Name Type Description Notes
id character String, unique identifier of the group in ODM.

Return type

void (empty response body)

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/scim+json

HTTP response details

Status code Description Response headers
204 The group has been successfully removed. No data is returned. -
400 The supplied group ID is invalid. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
403 Operation is not permitted. The \"Group admin\" role in the group or the \"Manage groups\" permission is required. -
404 There are no groups with the specified id. -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

FindGroups

FilterGroupsResponse FindGroups(filter = var.filter, excluded_attributes = var.excluded_attributes, start_index = var.start_index, count = var.count)

Retrieve a list of available groups

The endpoint returns a list of groups that the user has access to: where the user is a member of the group or if the user has the \"Manage Groups\" permission, then a list of all groups. The list can be filtered by group attributes using the filter parameter. If no filtering parameters are passed, then all available groups are returned. If there are no groups in the response body, the endpoint returns 200 OK.

Example

library(odmApi)

# Retrieve a list of available groups
#
# prepare function argument(s)
var_filter <- "filter_example" # character | Filter by group attributes. The parameter name is case-sensitive, therefore parameters FILTER, fiLter, and other options are ignored.  Supported operators:  &nbsp;&nbsp;eq - equal, the attribute and operator values must be identical for a match;  &nbsp;&nbsp;Using other operators returns an error.  Groups can be filtered by displayName only.  Attribute names and attribute operators used in filters are case insensitive.  Examples of the request:  &nbsp;&nbsp;filter=displayName eq \"Curator\". (Optional)
var_excluded_attributes <- "excluded_attributes_example" # character | If excludedAttributes=members is specified in the request, groups are returned without the members attribute. Other attributes are not supported in excludedAttributes parameter and ignored in the request → all attributes are returned in the response body. (Optional)
var_start_index <- 56 # integer | The 1-based index of the first result in the current set of list results. (Optional)
var_count <- 56 # integer | The number of resources returned in a list response page. The value by default is 100. (Optional)

api_instance <- GroupsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$FindGroups(filter = var_filter, excluded_attributes = var_excluded_attributes, start_index = var_start_index, count = var_countdata_file = "result.txt")
result <- api_instance$FindGroups(filter = var_filter, excluded_attributes = var_excluded_attributes, start_index = var_start_index, count = var_count)
dput(result)

Parameters

Name Type Description Notes
filter character Filter by group attributes. The parameter name is case-sensitive, therefore parameters FILTER, fiLter, and other options are ignored. Supported operators: &nbsp;&nbsp;eq - equal, the attribute and operator values must be identical for a match; &nbsp;&nbsp;Using other operators returns an error. Groups can be filtered by displayName only. Attribute names and attribute operators used in filters are case insensitive. Examples of the request: &nbsp;&nbsp;filter=displayName eq \"Curator\". [optional]
excluded_attributes character If excludedAttributes=members is specified in the request, groups are returned without the members attribute. Other attributes are not supported in excludedAttributes parameter and ignored in the request → all attributes are returned in the response body. [optional]
start_index integer The 1-based index of the first result in the current set of list results. [optional]
count integer The number of resources returned in a list response page. The value by default is 100. [optional]

Return type

FilterGroupsResponse

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/scim+json

HTTP response details

Status code Description Response headers
200 The request was successful. -
400 Incorrect syntax in the request. See the error message for details. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

GetGroup

CreateGroup201Response GetGroup(id, excluded_attributes = var.excluded_attributes)

Retrieve a group by id

The endpoint returns a not deleted group by id, where id is an internal group id in ODM. Access to the group is required:   - If the user has the \"Manage groups\" permission, the endpoint returns not deleted group on the instance regardless of user’s membership in this group;   - If the user does not have the \"Manage groups\" permission, the endpoint returns only groups in which the user is a member. Otherwise, 404 Not Found is returned.

Example

library(odmApi)

# Retrieve a group by id
#
# prepare function argument(s)
var_id <- "id_example" # character | String, unique identifier of the group in ODM.
var_excluded_attributes <- "excluded_attributes_example" # character | If excludedAttributes=members is specified in the request, Groups are returned without the members attribute. Other attributes are not supported in excludedAttributes parameter and ignored in the request → all attributes are returned in the response body. (Optional)

api_instance <- GroupsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetGroup(var_id, excluded_attributes = var_excluded_attributesdata_file = "result.txt")
result <- api_instance$GetGroup(var_id, excluded_attributes = var_excluded_attributes)
dput(result)

Parameters

Name Type Description Notes
id character String, unique identifier of the group in ODM.
excluded_attributes character If excludedAttributes=members is specified in the request, Groups are returned without the members attribute. Other attributes are not supported in excludedAttributes parameter and ignored in the request → all attributes are returned in the response body. [optional]

Return type

CreateGroup201Response

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/scim+json

HTTP response details

Status code Description Response headers
200 The request was successful. -
400 The supplied group ID is invalid. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
404 There are no available groups with the specified id. -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

PatchGroup

PatchGroup(id, body)

Update a group

The endpoint updates one or several attributes of a specific group, where id is internal group id in ODM. Also the endpoints adds a new user to the group and removes users from the group. Supported operators in the request body: replace, add, remove. For details of the syntax of using these operators, we recommend that you refer to the SCIM 2.0 specification. The list of group attributes that can be edited: displayName, externalId, members. If the user tries to edit other attributes, e.g. id, an error is returned. If the user tries to edit attributes that are not supported in the ODM group scheme, this attribute is ignored. If the request body includes only attributes that are not supported by ODM, the endpoint returns 200 OK. A PATCH request, regardless of the number of operations, is treated as atomic. If a single operation encounters an error condition, the original user attributes are restored, and a failure status is returned. The endpoint requires access to the group as admin of the group: the user has the \"Admin group\" role in the group or the user has the \"Manage groups\" permission.

Example

library(odmApi)

# Update a group
#
# prepare function argument(s)
var_id <- "id_example" # character | String, unique identifier of the group in ODM.
var_body <- GroupPatch$new(c(GroupPatch_Operations_inner$new("add", "path_example", 123)), c("urn:ietf:params:scim:api:messages:2.0:PatchOp")) # GroupPatch | 

api_instance <- GroupsApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
api_instance$PatchGroup(var_id, var_body)

Parameters

Name Type Description Notes
id character String, unique identifier of the group in ODM.
body GroupPatch

Return type

void (empty response body)

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/scim+json

HTTP response details

Status code Description Response headers
204 Group is successfully updated. No data is returned -
400 The object cannot be updated, the supplied data or metadata are incorrect. See the error message for details. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
403 Operation is not permitted. The \"Group admin\" role in the group or the \"Manage groups\" permission is required. -
404 There are no groups with the specified id. -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -