Interface SightResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
Interface used to encapsulate sight/dashboard resources.
public interface SightResources
Methods
CopySight(long, ContainerDestination)
Creates a copy of the specified Sight.
It mirrors to the following Smartsheet REST API method:
POST /sights/{sightId}/copy
Sight CopySight(long sightId, ContainerDestination destination)
Parameters
sightIdlongthe sightId
destinationContainerDestinationthe destination to copy to
Returns
- Sight
Result object containing a Sight for the newly created Sight, limited to the following attributes: id, name, accessLevel, permalink.
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
DeleteSight(long)
Delete a sight.
It mirrors to the following Smartsheet REST API method: DELETE /sights/{sightId}
void DeleteSight(long sightId)
Parameters
sightIdlongthe sightId
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
GetPublishStatus(long)
Get the publish status of a sight.
It mirrors to the following Smartsheet REST API method: GET /sights/{id}/publish
SightPublish GetPublishStatus(long sightId)
Parameters
sightIdlongthe sightId
Returns
- SightPublish
The sight publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
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
GetSight(long)
Get a specified Sight.
It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}
Sight GetSight(long sightId)
Parameters
sightIdlongthe Id of the sight
Returns
- Sight
the sight resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
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
GetSight(long, IEnumerable<SightInclusion>?, int?)
Get a specified Sight.
It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}
Sight GetSight(long sightId, IEnumerable<SightInclusion>? includes = null, int? level = null)
Parameters
sightIdlongthe Id of the sight
includesIEnumerable<SightInclusion>used to specify the optional objects to include.
levelint?compatibility level
Returns
- Sight
the sight resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
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
ListSights(TokenPaginationParameters?)
Gets the list of all Sights that the User has access to.
It mirrors to the following Smartsheet REST API method: GET /sights
TokenPaginatedResult<Sight> ListSights(TokenPaginationParameters? tokenPaging = null)
Parameters
tokenPagingTokenPaginationParameters
Returns
- TokenPaginatedResult<Sight>
TokenPaginatedResult object containing an array of Sight objects limited to the following attributes: id, name, accessLevel, permalink, createdAt, modifiedAt
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
MoveSight(long, ContainerDestination)
Moves the specified Sight to a new location.
It mirrors to the following Smartsheet REST API method:
POST /sights/{sightId}/move
Sight MoveSight(long sightId, ContainerDestination destination)
Parameters
sightIdlongthe sightId
destinationContainerDestinationthe destination to copy to
Returns
- Sight
the moved sight
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
SetPublishStatus(long, SightPublish)
Sets the publish status of a sight and returns the new status, including the URLs of any enabled publishing.
It mirrors to the following Smartsheet REST API method: PUT /sights/{id}/publish
SightPublish SetPublishStatus(long sightId, SightPublish sightPublish)
Parameters
sightIdlongthe sightId
sightPublishSightPublishthe SightPublish object
Returns
- SightPublish
The sight publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
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
UpdateSight(Sight)
Updates (renames) the specified Sight.
The request body is limited to the name attribute.
It mirrors to the following Smartsheet REST API method: PUT /sights/{sightId}
Sight UpdateSight(Sight sight)
Parameters
sightSightthe sight to update
Returns
- Sight
the updated sight
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