Reference

Endpoint Download Table Attachment (Single - Using Id)


Name

download_attachment

Description

No description available

Parameters

Parameter Required Options
Name: SysId

Label: SysId (i.e. Attachment Id)

Attachment Id (i.e. 'sys_id') you like to download
YES

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
http_status DT_I4 int
sys_id DT_STR varchar(32) 32
size_bytes DT_I4 int
file_name DT_WSTR nvarchar(4000) 4000
table_sys_id DT_STR varchar(32) 32
content_type DT_WSTR nvarchar(4000) 4000
If the column you are looking for is missing, consider customizing ServiceNow Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use ServiceNow Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - ServiceNow
Read and write ServiceNow data effortlessly. Integrate, manage, and automate incidents, tasks, attachments, and records — almost no coding required.
ServiceNow
Download Table Attachment (Single - Using Id)
Required Parameters
SysId (i.e. Attachment Id) Fill-in the parameter...
FileOverwriteMode Fill-in the parameter...
Target File Path (e.g. c:\somefolder\file.xlsx) Fill-in the parameter...
Optional Parameters
SaveContentAsBinary True
TreatResponseAsMultiPart True
ContinueOn404Error True
EnableRawOutputModeSingleRow True
RawOutputDataRowTemplate {"Status":"Done"}
SSIS API Source - Read from table or endpoint

API Destination

API Destination - ServiceNow
Read and write ServiceNow data effortlessly. Integrate, manage, and automate incidents, tasks, attachments, and records — almost no coding required.
ServiceNow
Download Table Attachment (Single - Using Id)
Required Parameters
SysId (i.e. Attachment Id) Fill-in the parameter...
FileOverwriteMode Fill-in the parameter...
Target File Path (e.g. c:\somefolder\file.xlsx) Fill-in the parameter...
Optional Parameters
SaveContentAsBinary True
TreatResponseAsMultiPart True
ContinueOn404Error True
EnableRawOutputModeSingleRow True
RawOutputDataRowTemplate {"Status":"Done"}
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Download table attachment

SELECT * FROM download_attachment
WHERE SysId = 'abcd-1234-sysid'
WITH
(
    "FileOverwriteMode" = 'AlwaysOverwrite',
    "TargetFilePath" = 'abcd-1234-targetfilepath'
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Download table attachment

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM download_attachment
WHERE SysId = ''abcd-1234-sysid''
WITH
(
    "FileOverwriteMode" = ''AlwaysOverwrite'',
    "TargetFilePath" = ''abcd-1234-targetfilepath''
)';

EXEC (@MyQuery) AT [LS_TO_SERVICENOW_IN_GATEWAY];