JDBC Driver for Xero

Build 23.0.8839

DownloadFile

Downloads a file from the Xero Files service

Procedure-Specific Information

There are two different ways to download a file. If you provide a DownloadPath, then the file is downloaded and its contents are stored at that location:
EXECUTE DownloadFile @FileID = '...', @DownloadPath = 'c:/my/xero/files/form.docx'

If you do not provide a DownloadPath, then the contents of the file are base64 encoded and returned in the FileData output:

EXECUTE DownloadFile @FileID = '...'

Input

Name Type Required Accepts Output Streams Description
FileId String True False The ID of the file to download
DownloadPath String False False Where to write the downloaded file.
FileStream String False True An instance of an output stream where file data is written to. Only used if DownloadPath is not provided.
TenantId String False False The ID of the tenant to query instead of the connection tenant

Result Set Columns

Name Type Description
FileData String If the DownloadPath and FileStream are not provided, this contains the base64 encoded content of the file.
Success String This parameter sets whether the operation was successful or not.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839