Table of Contents

Interface SheetDiscussionResources

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

This interface provides methods to access discussion resources that are associated to a Sheet object.

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

public interface SheetDiscussionResources

Properties

AttachmentResources

Return the DiscussionAttachmentResources object that provides access to attachment resources associated with discussion resources.

DiscussionAttachmentResources AttachmentResources { get; }

Property Value

DiscussionAttachmentResources

the DiscussionAttachmentResources object

CommentResources

Returns the DiscussionCommentResources object that provides access to comment resources associated with discussion resources.

DiscussionCommentResources CommentResources { get; }

Property Value

DiscussionCommentResources

the DiscussionCommentResources object

Methods

CreateDiscussion(long, Discussion)

Creates a new discussion on a sheet.

Mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions

Discussion CreateDiscussion(long sheetId, Discussion discussion)

Parameters

sheetId long

the Id of the sheet

discussion Discussion

the discussion to add

Returns

Discussion

the created discussion

Exceptions

InvalidOperationException

if any argument is null or an 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

CreateDiscussionWithAttachment(long, Discussion, string, string)

Creates a new discussion with an attachment on a sheet.

Mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions

Discussion CreateDiscussionWithAttachment(long sheetId, Discussion discussion, string file, string fileType)

Parameters

sheetId long

the Id of the sheet

discussion Discussion

the discussion to add

file string

the file path

fileType string

the file type, can be null

Returns

Discussion

the created discussion

Exceptions

InvalidOperationException

if any argument is null or an 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

DeleteDiscussion(long, long)

Deletes a discussion

Mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/discussions/{discussionId}

void DeleteDiscussion(long sheetId, long discussionId)

Parameters

sheetId long

the sheet Id

discussionId long

the discussion Id

Exceptions

InvalidOperationException

if any argument is null or an 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

GetDiscussion(long, long)

Gets the discussion specified in the URL.

Mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions/{discussionId}

Discussion GetDiscussion(long sheetId, long discussionId)

Parameters

sheetId long

the Id of the sheet

discussionId long

the ID of the discussion

Returns

Discussion

the discussion

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

ListDiscussions(long, IEnumerable<DiscussionInclusion>?, PaginationParameters?)

Gets a list of all discussions associated with the specified sheet (both sheet-level discussions and row-level discussions).

Mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions

This operation supports pagination of results. For more information, see Paging.
PaginatedResult<Discussion> ListDiscussions(long sheetId, IEnumerable<DiscussionInclusion>? include = null, PaginationParameters? paging = null)

Parameters

sheetId long

the sheet Id

include IEnumerable<DiscussionInclusion>

elements to include in the response

paging PaginationParameters

the pagination

Returns

PaginatedResult<Discussion>

list of all discussions

Exceptions

InvalidOperationException

if any argument is null or an 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