Hi Smartsheet Community,
I'm encountering a 404 Not Found
error while attempting to delete rows using the Smartsheet API, and I would appreciate some guidance to resolve this issue.
Context:
I am trying to delete specific rows from a Smartsheet using the Python SDK as well as testing with a direct curl
command. Here are the relevant details:
- Sheet ID:
V3cVwC6xQvmfVPrgWhxrGQ929vrhgJ23vjPJq621
- Row IDs:
["2520121729585028", "6974708607307652"]
Here is the curl
command I'm using:
bashCopy codecurl -X DELETE "https://api.smartsheet.com/2.0/sheets/V3cVwC6xQvmfVPrgWhxrGQ929vrhgJ23vjPJq621/rows?ids=2520121729585028,6974708607307652" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"
Issue:
{ "response": { "statusCode": 404, "reason": "Not Found", "content": { "errorCode": 1006, "message": "Not Found", "refId": "037f8039-eb04-47a0-8e3c-539b9984f90d" } }}
- Similar behavior occurs when using the Python SDK (
smartsheet_client.Sheets.delete_rows(sheet_id, row_ids)
).
Troubleshooting Steps Taken:
- Verified Sheet ID and Row IDs: The IDs used are correct to the best of my knowledge.
- Fetched Sheet Before Deletion: I re-fetched the sheet to confirm that the rows are still present before issuing the delete request.
- Checked Permissions: I'm the OWNER of the Sheet.
Questions:
- Is there a specific reason why the rows might not be found? Is it possible that rows can become inaccessible for deletion even though they are visible in the sheet?
- Is there a different method or endpoint I should use for deleting multiple rows that could help avoid this error?
- Is there any caching behavior or synchronization delay that might be causing the sheet to report these rows as "not found"?
Any help or suggestions on what could be causing this error or further troubleshooting steps would be greatly appreciated.
Thanks in advance for your assistance!