Endpoint Delete Attachment
Name
delete_attachment
Description
Delete an attachment by its sys_id. [API reference]
Parameters
| Parameter | Required | Options |
|---|---|---|
|
Name:
Label: Attachment Id (i.e. sys_id) Sys ID of the attachment to delete |
YES |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| status |
DT_WSTR
|
nvarchar(10)
|
10 | |
| sys_id |
DT_WSTR
|
nvarchar(32)
|
32 | |
| http_status |
DT_I4
|
int
|
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
Delete Attachment
| Required Parameters | |
|---|---|
| Attachment Id (i.e. sys_id) | Fill-in the parameter... |
| Optional Parameters | |
| RawOutputDataRowTemplate | {} |
| EnableRawOutputModeSingleRow | True |
| ContinueOn404Error | |
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
Delete Attachment
| Required Parameters | |
|---|---|
| Attachment Id (i.e. sys_id) | Fill-in the parameter... |
| Optional Parameters | |
| RawOutputDataRowTemplate | {} |
| EnableRawOutputModeSingleRow | True |
| ContinueOn404Error | |
ODBC application
Use these SQL queries in your ODBC application data source:
Delete Attachment by Attachment Id
-- Delete a single attachment by attachment sys_id
SELECT * FROM delete_attachment
WITH(
TableName='problem', -- optional, used for context
SysId='d871411783d6321032ddb9f6feaad339'
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Delete Attachment by Attachment Id
DECLARE @MyQuery NVARCHAR(MAX) = '-- Delete a single attachment by attachment sys_id
SELECT * FROM delete_attachment
WITH(
TableName=''problem'', -- optional, used for context
SysId=''d871411783d6321032ddb9f6feaad339''
)';
EXEC (@MyQuery) AT [LS_TO_SERVICENOW_IN_GATEWAY];