Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Upload Attachment to Incident by Using HTTP

 

Use this API to upload binary or text attachments to cases by using HTTP.

URI

http://[host]/api/juniper/servicenow/incident-management/incidents/{id}/uploadAttachment (HTTP method = POST)

URI Parameters

Parameter

Type

Required

Description

id

Integer

Yes

ID of the incident to which attachments are to be uploaded

Consumes

Multipart data

You need to pass the attachment files in the HTTP POST method as multipart data. In the HTTP post method, MultipartRequestEntity should be set as RequestEntity. The MultipartRequestEntity parameter should be instantiated using FilePart. FilePart (org.apache.commons.httpclient.methods.multipart.FilePart) should contain the details (such as the file name) of the attachment file.

Produces

None

Input

Sample Input File