Use webservice to create ticket with attachment

Moderator: crythias

Locked
wolf97084
Znuny newbie
Posts: 26
Joined: 10 Feb 2015, 22:37
Znuny Version: 4.0.1

Use webservice to create ticket with attachment

Post by wolf97084 »

I am confused about creating ticket with attachment using web service.

According to OTRS doc, I should be able to create ticket and supply attachment with

Code: Select all

 <!--Zero or more repetitions:-->
         <Attachment>
            <Content>cid:61886944659</Content>
            <ContentType>?</ContentType>
            <Filename>?</Filename>
         </Attachment>
Is the content the real content? what is this cid thing in the code above? Do I need to to run the file through some encorder to get the cid?

I am trying to do this in Java. Ticket created successfully if with no attachment so far. I don't know how to add attachment yet.

Thank you very much!
eandrex
Znuny expert
Posts: 213
Joined: 04 Nov 2012, 23:58
Znuny Version: OTRS 4.x
Real Name: Esteban
Company: NORTON DE COLOMBIA

Re: Use webservice to create ticket with attachment

Post by eandrex »

Last time i played with OTRS Webservices, I all i had to do to create a ticket with an attachment was to send the Base64 representation of the file in the Content tag
wolf97084
Znuny newbie
Posts: 26
Joined: 10 Feb 2015, 22:37
Znuny Version: 4.0.1

Re: Use webservice to create ticket with attachment

Post by wolf97084 »

Thank you! It works.
Locked