Table of Contents

Interface GroupResources

Namespace
Smartsheet.Api
Assembly
smartsheet-csharp-sdk.dll

This interface provides methods to access Group resources.

Thread Safety: Implementation of this interface must be thread safe.

public interface GroupResources

Methods

AddGroupMembers(long, IEnumerable<GroupMember>)

Adds one or more members to a Group.

If called with a single GroupMember object, and that group member already exists, error code 1129 will be returned. If called with an array of GroupMember objects any users specified in the array that are already group members will be ignored and omitted from the response.

This operation is only available to group administrators and system administrators.

This operation is asynchronous, meaning the users may not yet have sharing access to sheets for a period of time after this operation returns. For small groups with limited sharing, the operation should complete quickly (within a few seconds). For large groups with many shares, this operation could possibly take more than a minute to complete.

It mirrors to the following Smartsheet REST API method: POST /groups/{groupId}/members

IList<GroupMember> AddGroupMembers(long groupId, IEnumerable<GroupMember> groupMembers)

Parameters

groupId long

the Id of the group

groupMembers IEnumerable<GroupMember>

array of Group Member objects

Returns

IList<GroupMember>

the members added to the group

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

CreateGroup(Group)

Creates a new Group.

It mirrors to the following Smartsheet REST API method: POST /groups

This operation is only available to group administrators and system administrators.
Group CreateGroup(Group group)

Parameters

group Group

the group object

Returns

Group

the created group

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

DeleteGroup(long)

Deletes the Group specified in the URL.

This operation is only available to system administrators.

It mirrors to the following Smartsheet REST API method: DELETE /groups/{groupId}

void DeleteGroup(long groupId)

Parameters

groupId long

the Id of the group

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

GetGroup(long)

Gets the Group specified in the URL.

It mirrors to the following Smartsheet REST API method: GET /groups/{groupId}

Group GetGroup(long groupId)

Parameters

groupId long

Returns

Group

Group object that includes the list of GroupMembers

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

ListGroups(PaginationParameters?)

List all Users.

It mirrors to the following Smartsheet REST API method: GET /groups

This operation supports pagination of results. For more information, see Paging.
PaginatedResult<Group> ListGroups(PaginationParameters? paging = null)

Parameters

paging PaginationParameters

the pagination

Returns

PaginatedResult<Group>

the list of all Users

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

RemoveGroupMember(long, long)

Removes a member from a Group.

This operation is only available to group administrators and system administrators.

This operation is asynchronous, meaning group members may retain their sharing access for a brief period of time after the call returns. For small groups with limited sharing, the operation should complete quickly (within a few seconds). For large groups with many shares, this operation could possibly take more than a minute to complete.

It mirrors to the following Smartsheet REST API method: DELETE /groups/{groupId}/members/{userId}

void RemoveGroupMember(long groupId, long userId)

Parameters

groupId long

the Id of the group

userId long

the Id of the user

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

UpdateGroup(Group)

Updates the Group specified in the URL.

It mirrors to the following Smartsheet REST API method: PUT /groups/{groupId}

This operation is only available to group administrators and system administrators.
Group UpdateGroup(Group group)

Parameters

group Group

the group to update

Returns

Group

the updated user

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation