Ticket Create via web service

Moderator: crythias

Locked
crons
Znuny newbie
Posts: 58
Joined: 17 Aug 2012, 06:11
Znuny Version: 3.3.x
Real Name: Cornelius Jackson

Ticket Create via web service

Post by crons »

I am trying to create a ticket via webservice with attachment i get an error as attachment content type invalid.Below is the call and error.

Code: Select all

$VAR1 = {
  'Article' => {
    'ArticleTypeID' => '5',
    'Body' => 'Test via webservice',
    'ContentType' => 'text/plain; charset=utf8',
    'From' => 'test@gmail.com',
    'SenderType' => '1',
    'SenderTypeID' => '3',
    'Subject' => 'Test via webservice'
  },
  'Attachment' => {
    'Content' => 'cid:1366243570384',
    'ContentType' => 'text/plain',
    'Filename' => 'TestWebservice.txt'
  },
  'Password' => 'test',
  'Ticket' => {
    'CustomerID' => 'test@gmail.com',
    'CustomerUser' => 'testcustomer',
    'PriorityID' => '1',
    'Queue' => 'Junk',
    'QueueID' => '3',
    'StateID' => '1',
    'Title' => 'Test via webservice',
    'TypeID' => '1'
  },
  'UserLogin' => 'test'
};

Below is the error

Code: Select all

$VAR1 = {
  'Error' => {
    'ErrorCode' => 'TicketCreate.InvalidParameter',
    'ErrorMessage' => 'TicketCreate: Attahcment->ContentType is invalid!'
  }
};
OTRS 3.3.x, Ubuntu, MySql 5.5
Locked