[rt-users] Creating ticket through REST API with AJAX

Jim Brandt jbrandt at bestpractical.com
Fri May 30 08:20:49 EDT 2014



On 5/29/14 4:40 PM, Brian C. Duggan wrote:
> On Thu, May 29, 2014 at 01:58:48PM -0400, Jim Brandt wrote:
>>       >      jQuery(document).ready( function() {
>>>          var formData = new FormData();
>>>          formData.append( 'content', fields );
>>>
>>>          $.ajax({
>>>      	type: 'POST',
>>>      	url: 'https://rt.myrtsrv.com/REST/1.0/edit',
>>
>> Maybe call new instead of edit?
>>
>> https://rt.myrtsrv.com/REST/1.0/ticket/new
>>
>
> Thanks, Jim. I should have checked the wiki. Progress, but now the server replies
>
>      RT/4.2.3 200 Ok
>
>      # Could not create ticket.
>      # Could not create ticket. Queue not set
>
> The user has all 'Modify' rights on the queue directly, not through a group. I can tell that RT is consuming all the headers because RT logs the 'Starts' and 'Due' fields.
>
> Any suggestions appreciated.

Confirm the queue name in the call is exactly the same as the queue name 
in RT. Also try running it with SuperUser rights. If it works you know 
it's a rights issue and can focus there (confirm SeeQueue, CreateTicket, 
etc.).

-- 




More information about the rt-users mailing list