<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">We are using something like this:<br>
      <br>
      <tt>my $ticket = RT::Client::REST::Ticket->new(</tt><tt><br>
      </tt><tt>        rt  => $rt,</tt><tt><br>
      </tt><tt>        queue   => "General",</tt><tt><br>
      </tt><tt>        subject => "$your_subject",</tt><tt><br>
      </tt><tt>        status => "new",</tt><tt><br>
      </tt><tt>        requestor => [$your_netid],</tt><tt><br>
      </tt><tt>        cf => {</tt><tt><br>
      </tt><tt>                'public' => $your_public,</tt><tt><br>
      </tt><tt>            },</tt><tt><br>
      </tt><tt>    )->store(text => "$your_comments");</tt><br>
      <br>
      Where $your_subject, $your_netid, $your_public, and $your_comments
      are returned by the form once submit is pushed. Note that
      "requestor" is submitted as an array type object.   "cf" is a
      custom field.  You'll also need some sort of "login" section
      placed beforehand, and an identification of the server/interface
      to use.  For instance:<br>
      <br>
      <br>
          <tt>my $rt = RT::Client::REST->new(</tt><tt><br>
      </tt><tt>    server  => ($ENV{RTSERVER} || '<a
          class="moz-txt-link-freetext" href="http://your.rt.domain.com">http://your.rt.domain.com</a>'),</tt><tt><br>
      </tt><tt>    );</tt><tt><br>
      </tt><tt><br>
      </tt><tt>    $rt->login(</tt><tt><br>
      </tt><tt>    username=> "yourAdmin",</tt><tt><br>
      </tt><tt>    password=> "yourPass",</tt><tt><br>
      </tt><tt>    );</tt><br>
      <br>
      So you create the RT object $rt, login to it, and then create your
      ticket.<br>
      <br>
      Hope that helps.<br>
      <br>
      J.<br>
      <br>
      <br>
      <br>
      On 12/4/12 4:17 PM, Vega, Angel L. wrote:<br>
    </div>
    <blockquote
cite="mid:068F06DC4D106941B297C0C5F9F446EA48BDB48B00@aplesstripe.dom1.jhuapl.edu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hello,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I’ve been reviewing the <a
            moz-do-not-send="true"
            href="http://requesttracker.wikia.com/wiki/REST#Interface">section</a>
          on how to create a new ticket through the REST interface.
          Could you give me an example on how the following instruction
          would be implemented in Perl?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><i>To create a new ticket: post on </i><code><i><span
                style="font-size:10.0pt">/REST/1.0/ticket/new</span></i></code><i>
            with a variable named "</i><code><i><span
                style="font-size:10.0pt">content</span></i></code><i>",
            containing "</i><code><i><span style="font-size:10.0pt">key:
                value</span></i></code><i>" line by line<o:p></o:p></i></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks,<o:p></o:p></p>
        <p class="MsoNormal">Angel<o:p></o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--------
We're hiring! <a class="moz-txt-link-freetext" href="http://bestpractical.com/jobs">http://bestpractical.com/jobs</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>