Interface SightResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
Interface used to encapsulate sight/dashboard resources.
public interface SightResources
Properties
ShareResources
Returns the ShareResources object that provides access to Share resources associated with Sight resources.
ShareResources ShareResources { get; }
Property Value
- ShareResources
the share resources object
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
sightId
longthe sightId
destination
ContainerDestinationthe 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
sightId
longthe 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
sightId
longthe 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
sightId
longthe 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
sightId
longthe Id of the sight
includes
IEnumerable<SightInclusion>used to specify the optional objects to include.
level
int?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(PaginationParameters?, DateTime?)
Gets the list of all Sights that the User has access to.
It mirrors to the following Smartsheet REST API method: GET /sights
PaginatedResult<Sight> ListSights(PaginationParameters? paging = null, DateTime? modifiedSince = null)
Parameters
paging
PaginationParametersmodifiedSince
DateTime?
Returns
- PaginatedResult<Sight>
IndexResult 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
sightId
longthe sightId
destination
ContainerDestinationthe 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
sightId
longthe sightId
sightPublish
SightPublishthe 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
sight
Sightthe 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