Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Upload Attachment to Incident by Using SCP

    Use this API to upload binary or text attachments to an incident by using Secure Copy Protocol (SCP).

    URI

    http://[host]/api/juniper/servicenow/ incident-management/incidents/{id}/uploadAttachmentViaSCP?queue= http://[host]/api/hornet-q/queues/jms.queue.queuename

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the incident for which attachments are to be uploaded

    queuename

    String

    Yes

    Name of the upload attachment job queue

    Consumes

    • application/vnd.juniper.servicenow.incident-management.scpattachmentUpload +json;version=1;charset=UTF-8
    • application/vnd.juniper.servicenow.incident-management.scpattachmentUpload +xml;version=1;charset=UTF-8

    Request Elements

    Elements

    Type

    Description

    user

    String

    Username of the system where the file is located

    password

    String

    Password of the system where the file is located

    machineIP

    String

    IP address of the system where the file is located

    files

    String

    Absolute path of the files to be uploaded

    Produces

    • application/vnd.juniper.servicenow.incident-management.incident+xml;version=1
    • application/vnd.juniper.servicenow.incident-management.incident+json;version=1

    Response Elements

    Element

    Type

    Description

    href

    String

    Link to the upload attachment job

    id

    Integer

    ID of the upload attachment job.

    Sample Input

    Sample XML Inupt

    <scpfileupload>
    <user>user@example.com</user>
    <password>newpassword</password>
    <machineIP>192.0.2.117</machineIP>
    <files>home/admin/testAttachment.txt,/home/admin/sampleAttachment.txt</files>
    </scpfileupload>
    

    Sample JSON Input

     
    {
    "scpfileupload: { "user": "user@example.com",
    ”password”: “newpassword”,
    ”machineIP”: “192.0.2.117”,
    ”files”: “home/admin/testAttachment.txt,/home/admin/sampleAttachment.txt”
        }
     }

    Sampel Output

    Sample XML Output

    <task href= "/api/space/job-management/jobs/1310761" >
    <id>1310761</id>
    </task>
    

    Sample JSON Output

    {
      "task": { "href": "/api/space/job-management/jobs/1310761"
    ”id”: “1310761” }
    }
    

    Modified: 2016-08-10