I want to use curl and json to send a new row to a SmartSheet. I practiced simpler commands so know my token and sheet id are ok. I cant make the following code run. It would help to see similar code populated with all the variables. The code was pasted from the Smartsheet api help for AddRow. Code:
curl https://api.smartsheet.com/2.0/sheets/1451528792893316/rows -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -X POST -d '[{"toTop":true, "cells": [ {"columnId": 6554165443880836, "value": "VICTOR"}, {"columnId": 4302365630195588, "value": "NP8888"} ] }, {"toTop":true, "cells": [ {"columnId": 6554165443880836, "value": "VICTOR"}, {"columnId": 4302365630195588, "value": "NP0009"} ] }]' -o error.txt pause
I am running this from a windows batch file.
The error is:
{ "errorCode" : 1008, "message" : "Unable to parse request. The following error occurred: Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: REST input; line: 1, column: 2]", "refId" : "oixvszudmnjc" }
I can't see a mismatched quote or brackets. Whats wrong ?
Chris B