Smartsheet.Api.Internal.RowColumnResourcesImpl.GetCellHistory C# (CSharp) Method

GetCellHistory() public method

Gets the cell modification history.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/history

This operation supports pagination of results. For more information, see Paging.

This is a resource-intensive operation and incurs 10 additional requests against the rate limit.

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetCellHistory ( long sheetId, long rowId, long columnId, IEnumerable include, PaginationParameters paging ) : PaginatedResult
sheetId long the sheet Id
rowId long the row Id
columnId long the column id
include IEnumerable the elements to include in the response
paging Smartsheet.Api.Models.PaginationParameters the pagination
return PaginatedResult
        public virtual PaginatedResult<CellHistory> GetCellHistory(long sheetId, long rowId, long columnId, IEnumerable<CellInclusion> include, PaginationParameters paging)
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            if (paging != null)
            {
                parameters = paging.toDictionary();
            }
            if (include != null)
            {
                parameters.Add("include", Util.QueryUtil.GenerateCommaSeparatedList(include));
            }
            return this.ListResourcesWithWrapper<CellHistory>(QueryUtil.GenerateUrl("sheets/" + sheetId + "/rows/" + rowId + "/columns/" + columnId + "/history", parameters));
        }

Usage Example

        public virtual void TestGetCellHistory()
        {
            server.setResponseBody("../../../TestSDK/resources/getCellHistory.json");

            PaginatedResult <CellHistory> histories = cellResources.GetCellHistory(1231654654, 313213132, 4555465465, null, null);

            Assert.IsTrue(histories.TotalCount == 3);
            Assert.IsTrue(histories.Data[0].ColumnId == 642523719853956);
            Assert.IsTrue(histories.Data[1].DisplayValue == "Revision 2");
            Assert.IsTrue(histories.Data[1].ColumnType == ColumnType.TEXT_NUMBER);
            Assert.IsTrue(histories.Data[0].ModifiedBy.Email == "*****@*****.**");
        }