0

Get an Update Request

by
Published Oct 17, 2025

Gets the specified update request for the sheet that has a future schedule. The rowIds and columnIds in the returned UpdateRequest object represent the list at the time the update request was created or last modified. The lists may contain Ids of rows or columns that are no longer valid (for example, they have been removed from the sheet).

Script smartsheet Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Smartsheet = {
3
  token: string;
4
  baseUrl: string;
5
};
6
/**
7
 * Get an Update Request
8
 * Gets the specified update request for the sheet that has a future schedule.
9

10
The rowIds and columnIds in the returned UpdateRequest object represent the list at the time
11
the update request was created or last modified. The lists may contain Ids of rows or columns
12
that are no longer valid (for example, they have been removed from the sheet).
13

14
 */
15
export async function main(
16
  auth: Smartsheet,
17
  sheetId: string,
18
  updateRequestId: string,
19
) {
20
  const url = new URL(
21
    `${auth.baseUrl}/sheets/${sheetId}/updaterequests/${updateRequestId}`,
22
  );
23

24
  const response = await fetch(url, {
25
    method: "GET",
26
    headers: {
27
      Authorization: "Bearer " + auth.token,
28
    },
29
    body: undefined,
30
  });
31
  if (!response.ok) {
32
    const text = await response.text();
33
    throw new Error(`${response.status} ${text}`);
34
  }
35
  return await response.json();
36
}
37