I am trying to use the Smartsheet API 2.0 in java to copy an existing sheet to a new sheet in an existing folder. I would like to include the data, attachments and discussions. I have tried setting the include parameter to SheetCopyInclusion.ALL as well as SheetCopyInclusion.DATA, SheetCopyInclusion.ATTACHMENTS and SheetCopyInclusion.DISCUSSIONS. The sheet copies, but never the data.
Here is my code:
Token token = new Token();
token.setAccessToken( accessToken );
Smartsheet smartsheet = new SmartsheetBuilder().setAccessToken( token.getAccessToken() ).build();
ContainerDestination myCopiedSheet = new ContainerDestination.AddContainerDestinationBuilder()
.setDestinationType( DestinationType.FOLDER )
.setDestinationId( backupFolderId )
.setNewName( "My Copied Sheet" )
.build();
smartsheet.sheetResources().copySheet( sourceSheetId, myCopiedSheet, EnumSet.of( SheetCopyInclusion.ALL ));
Any assistance on why the data is not being copied would be appreciated. Thank you.