When I try to get the id array from the get.folder() call (by using folder = folder.sheets.id), I get the answer: "AttributeError: 'TypedList' object has no attribute 'id'" I'm not sure what function to call in python to get the array of sheet ids in the folder.
I am trying to do this with the python smartsheet sdk, but I am not sure exactly how to format it.
inc_list = ['all'] # you can add other parameters here, separated by a comma
response = ss_client.Folders.copy_folder(
folderID, # folder_id
ss_client.models.ContainerDestination({
'destination_id': destinationID,
'destination_type': 'folder',
'new_name': cellValue
}),
include=inc_list
)
copiedFolderID = response.result.id
folder = ss_client.Folders.get_folder(
copiedFolderID) # folder_id
newFolder = folder.sheets.id
print (newFolder)
Also thanks for helping answer my questions, I really appreciate it.
folder.sheets
is an array. The reason you're getting an error is because there is noid
attribute at the array level - you need to look at the individual elements inside the array.Take a look at the API docs to get an example of what you'd receive.
To get a list of the sheetIds for sheets in a folder, your Python would look something like this.