Last active
October 23, 2017 22:14
-
-
Save timhall/c88e52a71acc45243bbb to your computer and use it in GitHub Desktop.
Excel-REST - Smartsheet API: Update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' curl https://api.smartsheet.com/1.1/row/{rowId}/cells \ | |
Dim Request As New RestRequest | |
Request.Resource = "row/{rowId}/cells" | |
Request.AddUrlSegment "rowId", "RowId..." | |
' -H "Authorization: Bearer ACCESS_TOKEN" \ | |
Request.AddHeader "Authorization", "Bearer ACCESS_TOKEN is set in authenticator" | |
' -H "Content-Type: application/json" \ | |
Request.RequestFormat = json | |
' -X PUT \ | |
Request.Method = httpPUT | |
' -d '[ {"columnId": 3738748463671172, "value": "Revision 2"}, {"columnId": 5427598323935108, "value": "On Time", "strict": false} ]' | |
Dim Data As New Collection | |
Data.Add New Dictionary | |
Data(1).Add "columnId", 3738748463671172 | |
Data(1).Add "value", "Revision 2" | |
Data.Add New Dictionary | |
Data(2).Add "columnId", 5427598323935108 | |
Data(2).Add "value", "On Time" | |
Data(2).Add "strict", False | |
' Automatically converted to json based on RequestFormat | |
Request.AddBody Data | |
' Alternative (you have to be careful with the quotes for json) | |
Request.AddBodyString "[{""columnId"": 3738748463671172, ""value"": ""Revision 2""}, {""columnId"": 5427598323935108, ""value"": ""On Time"", ""strict"": false}]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment