Advertisement
Guest User

RT REST 2.0 Ticket History

a guest
Feb 19th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 13.63 KB | None | 0 0
  1. $VAR1 = 'ticket/47';
  2. $VAR2 = {
  3.           'Cc' => [],
  4.           'Creator' => {
  5.                          'id' => 'carl',
  6.                          '_url' => 'http://localhost/rt/REST/2.0/user/carl',
  7.                          'type' => 'user'
  8.                        },
  9.           'LastUpdated' => '2018-02-19T17:58:50Z',
  10.           'AdminCc' => [],
  11.           'Queue' => {
  12.                        'id' => '3',
  13.                        '_url' => 'http://localhost/rt/REST/2.0/queue/3',
  14.                        'type' => 'queue'
  15.                      },
  16.           'Started' => '1970-01-01T00:00:00Z',
  17.           'CustomFields' => {
  18.                               '7' => [],
  19.                               '10' => [
  20.                                         'test'
  21.                                       ],
  22.                               '8' => [],
  23.                               '2' => [],
  24.                               '9' => [],
  25.                               '6' => []
  26.                             },
  27.           'Subject' => 'Test',
  28.           'Type' => 'ticket',
  29.           'EffectiveId' => {
  30.                              'id' => '47',
  31.                              '_url' => 'http://localhost/rt/REST/2.0/ticket/47',
  32.                              'type' => 'ticket'
  33.                            },
  34.           'Priority' => '0',
  35.           'TimeWorked' => '0',
  36.           'TimeEstimated' => '0',
  37.           'Requestor' => [
  38.                            {
  39.                              'type' => 'user',
  40.                              '_url' => 'http://localhost/rt/REST/2.0/user/carl',
  41.                              'id' => 'carl'
  42.                            }
  43.                          ],
  44.           'Starts' => '1970-01-01T00:00:00Z',
  45.           '_hyperlinks' => [
  46.                              {
  47.                                'type' => 'ticket',
  48.                                'ref' => 'self',
  49.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47',
  50.                                'id' => '47'
  51.                              },
  52.                              {
  53.                                '_url' => 'http://localhost/rt/REST/2.0/customfield/2',
  54.                                'ref' => 'customfield',
  55.                                'id' => '2',
  56.                                'type' => 'customfield'
  57.                              },
  58.                              {
  59.                                'type' => 'customfield',
  60.                                'ref' => 'customfield',
  61.                                '_url' => 'http://localhost/rt/REST/2.0/customfield/6',
  62.                                'id' => '6'
  63.                              },
  64.                              {
  65.                                'type' => 'customfield',
  66.                                'ref' => 'customfield',
  67.                                '_url' => 'http://localhost/rt/REST/2.0/customfield/7',
  68.                                'id' => '7'
  69.                              },
  70.                              {
  71.                                'id' => '10',
  72.                                'ref' => 'customfield',
  73.                                '_url' => 'http://localhost/rt/REST/2.0/customfield/10',
  74.                                'type' => 'customfield'
  75.                              },
  76.                              {
  77.                                'id' => '8',
  78.                                '_url' => 'http://localhost/rt/REST/2.0/customfield/8',
  79.                                'ref' => 'customfield',
  80.                                'type' => 'customfield'
  81.                              },
  82.                              {
  83.                                'id' => '9',
  84.                                '_url' => 'http://localhost/rt/REST/2.0/customfield/9',
  85.                                'ref' => 'customfield',
  86.                                'type' => 'customfield'
  87.                              },
  88.                              {
  89.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47/history',
  90.                                'ref' => 'history'
  91.                              },
  92.                              {
  93.                                'ref' => 'correspond',
  94.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47/correspond'
  95.                              },
  96.                              {
  97.                                'ref' => 'comment',
  98.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47/comment'
  99.                              },
  100.                              {
  101.                                'update' => 'Respond',
  102.                                'from' => 'new',
  103.                                'to' => 'open',
  104.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47/correspond',
  105.                                'ref' => 'lifecycle',
  106.                                'label' => 'Open It'
  107.                              },
  108.                              {
  109.                                'update' => 'Comment',
  110.                                'from' => 'new',
  111.                                'to' => 'resolved',
  112.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47/comment',
  113.                                'label' => 'Resolve',
  114.                                'ref' => 'lifecycle'
  115.                              },
  116.                              {
  117.                                'from' => 'new',
  118.                                'update' => 'Respond',
  119.                                'to' => 'rejected',
  120.                                'label' => 'Reject',
  121.                                'ref' => 'lifecycle',
  122.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47/correspond'
  123.                              },
  124.                              {
  125.                                'ref' => 'lifecycle',
  126.                                'label' => 'Delete',
  127.                                '_url' => 'http://localhost/rt/REST/2.0/ticket/47',
  128.                                'from' => 'new',
  129.                                'to' => 'deleted'
  130.                              }
  131.                            ],
  132.           'TimeLeft' => '0',
  133.           'Created' => '2018-02-19T17:31:41Z',
  134.           'InitialPriority' => '0',
  135.           'Due' => '1970-01-01T00:00:00Z',
  136.           'FinalPriority' => '0',
  137.           'LastUpdatedBy' => {
  138.                                'type' => 'user',
  139.                                'id' => 'carl',
  140.                                '_url' => 'http://localhost/rt/REST/2.0/user/carl'
  141.                              },
  142.           'Resolved' => '1970-01-01T00:00:00Z',
  143.           'Owner' => {
  144.                        'id' => 'Nobody',
  145.                        '_url' => 'http://localhost/rt/REST/2.0/user/Nobody',
  146.                        'type' => 'user'
  147.                      },
  148.           'id' => '47',
  149.           'Status' => 'new'
  150.         };
  151. #################################################################################################################
  152. $VAR1 = 'ticket/47/history';
  153. $VAR2 = {
  154.           'count' => 2,
  155.           'total' => 3,
  156.           'page' => 1,
  157.           'per_page' => 20,
  158.           'items' => [
  159.                        {
  160.                          'type' => 'transaction',
  161.                          '_url' => 'http://localhost/rt/REST/2.0/transaction/572',
  162.                          'id' => '572'
  163.                        },
  164.                        {
  165.                          '_url' => 'http://localhost/rt/REST/2.0/transaction/574',
  166.                          'id' => '574',
  167.                          'type' => 'transaction'
  168.                        }
  169.                      ]
  170.         };
  171. #################################################################################################################
  172. $VAR1 = 'transaction/572';
  173. $VAR2 = {
  174.           'Created' => '2018-02-19T17:31:41Z',
  175.           'TimeTaken' => '0',
  176.           'Creator' => {
  177.                          'id' => 'carl',
  178.                          '_url' => 'http://localhost/rt/REST/2.0/user/carl',
  179.                          'type' => 'user'
  180.                        },
  181.           'Type' => 'Create',
  182.           'Object' => {
  183.                         '_url' => 'http://localhost/rt/REST/2.0/ticket/47',
  184.                         'id' => '47',
  185.                         'type' => 'ticket'
  186.                       },
  187.           'id' => '572',
  188.           '_hyperlinks' => [
  189.                              {
  190.                                'type' => 'transaction',
  191.                                'id' => '572',
  192.                                '_url' => 'http://localhost/rt/REST/2.0/transaction/572',
  193.                                'ref' => 'self'
  194.                              },
  195.                              {
  196.                                '_url' => 'http://localhost/rt/REST/2.0/attachment/331',
  197.                                'ref' => 'attachment'
  198.                              }
  199.                            ]
  200.         };
  201. #################################################################################################################
  202. $VAR1 = 'attachment/331';
  203. $VAR2 = {
  204.           'ContentType' => 'text/html',
  205.           'Parent' => '0',
  206.           'Subject' => 'Test',
  207.           'id' => '331',
  208.           'MessageId' => 'rt-4.4.2-775-1519061501-42.0-0-0@leathersfuels.net',
  209.           'Created' => '2018-02-19T17:31:41Z',
  210.           'Headers' => 'Content-Type: text/html; charset="utf-8"
  211. X-RT-Interface: Web
  212. Date: Mon, 19 Feb 2018 09:31:41 -0800
  213. X-Mailer: MIME-tools 5.508 (Entity 5.508)
  214. Subject: Test
  215. Message-ID: <rt-4.4.2-775-1519061501-42.0-0-0@leathersfuels.net>
  216. MIME-Version: 1.0
  217. From: carl@leathersfuels.net
  218. Content-Disposition: inline
  219. Content-Transfer-Encoding: binary
  220. X-RT-Original-Encoding: utf-8
  221. Content-Length: 31',
  222.           'Content' => 'This is a test initial content.',
  223.           '_hyperlinks' => [
  224.                              {
  225.                                'id' => '331',
  226.                                '_url' => 'http://localhost/rt/REST/2.0/attachment/331',
  227.                                'ref' => 'self',
  228.                                'type' => 'attachment'
  229.                              }
  230.                            ],
  231.           'TransactionId' => {
  232.                                'type' => 'transaction',
  233.                                '_url' => 'http://localhost/rt/REST/2.0/transaction/572',
  234.                                'id' => '572'
  235.                              },
  236.           'Creator' => {
  237.                          'type' => 'user',
  238.                          '_url' => 'http://localhost/rt/REST/2.0/user/carl',
  239.                          'id' => 'carl'
  240.                        }
  241.         };
  242. #################################################################################################################
  243. $VAR1 = 'transaction/574';
  244. $VAR2 = {
  245.           'id' => '574',
  246.           'Type' => 'Comment',
  247.           'Created' => '2018-02-19T17:58:50Z',
  248.           'TimeTaken' => '0',
  249.           'Data' => 'No Subject',
  250.           'Object' => {
  251.                         '_url' => 'http://localhost/rt/REST/2.0/ticket/47',
  252.                         'id' => '47',
  253.                         'type' => 'ticket'
  254.                       },
  255.           '_hyperlinks' => [
  256.                              {
  257.                                'type' => 'transaction',
  258.                                'id' => '574',
  259.                                'ref' => 'self',
  260.                                '_url' => 'http://localhost/rt/REST/2.0/transaction/574'
  261.                              },
  262.                              {
  263.                                '_url' => 'http://localhost/rt/REST/2.0/attachment/335',
  264.                                'ref' => 'attachment'
  265.                              }
  266.                            ],
  267.           'Creator' => {
  268.                          'type' => 'user',
  269.                          '_url' => 'http://localhost/rt/REST/2.0/user/carl',
  270.                          'id' => 'carl'
  271.                        }
  272.         };
  273. #################################################################################################################
  274. $VAR1 = 'attachment/335';
  275. $VAR2 = {
  276.           'TransactionId' => {
  277.                                'type' => 'transaction',
  278.                                'id' => '574',
  279.                                '_url' => 'http://localhost/rt/REST/2.0/transaction/574'
  280.                              },
  281.           'Creator' => {
  282.                          'type' => 'user',
  283.                          'id' => 'carl',
  284.                          '_url' => 'http://localhost/rt/REST/2.0/user/carl'
  285.                        },
  286.           '_hyperlinks' => [
  287.                              {
  288.                                'id' => '335',
  289.                                'ref' => 'self',
  290.                                '_url' => 'http://localhost/rt/REST/2.0/attachment/335',
  291.                                'type' => 'attachment'
  292.                              }
  293.                            ],
  294.           'Content' => 'This is a comment added after the ticket was created.',
  295.           'Headers' => 'In-Reply-To: <rt-4.4.2-775-1519061501-42.0-0-0@leathersfuels.net>
  296. Content-Type: text/html; charset="utf-8"
  297. X-RT-Interface: Web
  298. X-Mailer: MIME-tools 5.508 (Entity 5.508)
  299. Message-ID: <rt-4.4.2-804-1519063130-182.47-0-0@leathersfuels.net>
  300. MIME-Version: 1.0
  301. References: <rt-4.4.2-775-1519061501-42.0-0-0@leathersfuels.net>
  302. <RT-Ticket-47@leathersfuels.net>
  303. X-RT-Original-Encoding: utf-8
  304. Content-Disposition: inline
  305. Content-Transfer-Encoding: binary
  306. Content-Length: 53',
  307.           'Created' => '2018-02-19T17:58:50Z',
  308.           'Subject' => '',
  309.           'Parent' => '0',
  310.           'MessageId' => 'rt-4.4.2-804-1519063130-182.47-0-0@leathersfuels.net',
  311.           'id' => '335',
  312.           'ContentType' => 'text/html'
  313.         };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement