Issue with API Call to Update Rows in Smartsheet Using Custom Integration Tool

Options

Hello Smartsheet Community,

I am encountering a persistent issue when attempting to update rows using a custom integration tool that interacts with the Smartsheet API. Despite several attempts and adjustments, the API calls are not being processed successfully, and I'm consistently receiving parsing errors.

Details of the Issue:

  • API Method Used: POST
  • Endpoint: /sheets/{sheetId}/rows
  • HTTP Method: POST
  • Headers:
    • Content-Type: application/json
    • Authorization: Bearer {my_access_token}

Request Body Example:

{
  "sheetId": "1044502991032xxx",
  "rows": [
    {
      "id": 3154531136671xxx,
      "cells": [
        {
          "columnId": 2781702769299xxx,
          "value": "first row, last cell",
          "strict": true
        }
      ]
    }
  ]
}

Error Received:

Unable to parse request. The following error occurred: Unknown attribute "rows" found at line 1, column 11

This error suggests there might be a syntax or structural problem with the request format, although the 'rows' attribute is standard according my understanding of the Smartsheet API documentation for updating rows.

Attempts to Resolve:

  • Ensured that the 'sheetId' is provided as a string.
  • Checked the structure of the JSON body to align with the API's expected schema (I may be off here).
  • Tried different combinations of attributes and values to identify if specific fields were causing the issue.

Despite these efforts, the problem persists. At this point I'm back to basics and working in postman to figure this out.

I would appreciate any insights or suggestions on how to resolve this error or any experiences you may have had with similar issues. Thank you for your


Answers

  • Etienne Mermillod
    Etienne Mermillod ✭✭✭✭✭
    edited 04/30/24
    Options

    In the body of your request, just put the rows, such as :

    [
        {
          "id": 3154531136671xxx,
          "cells": [
            {
              "columnId": 2781702769299xxx,
              "value": "first row, last cell",
              "strict": true
            }
          ]
        }
      ]