GlpiaddTicketDocument » History » Version 4

remi, 09/09/2009 10:13 AM

1 1 remi
h1. [[En_devguide#Provided-Methods|Methods]] > glpi.addTicketDocument
2 1 remi
3 1 remi
Add a document to a existing ticket if the authenticated user can edit it.
4 1 remi
5 1 remi
*input* a hastable
6 1 remi
7 1 remi
* *help* option to get usage information
8 1 remi
9 4 remi
* *ticket* : ID of the ticket
10 2 remi
* *uri* : of the document to be uploaded
11 2 remi
* *name* : of the document 
12 2 remi
* *comment* : of the document
13 1 remi
14 1 remi
*return* a  hastable if succed (as for [[glpi.getTicket]])
15 1 remi
* fields of *glpi_tracking* 
16 1 remi
* *followups* an array of hasble : fields of *glpi_followups*
17 1 remi
18 1 remi
Call example
19 1 remi
<pre>
20 3 remi
$ php testxmlrpc.php --session=j4mp77bmqu428ff38gufl3fvi3 --method=glpi.addTicketDocument \
21 3 remi
   --ticket=16 --uri=http://download.foo.com/screenshoot.jpg 
22 2 remi
+ Calling 'glpi.addTicketDocument' on http://localhost//glpi072/plugins/webservices/xmlrpc.php?session=j4mp77bmqu428ff38gufl3fvi3
23 1 remi
+ Response: Array
24 1 remi
(
25 1 remi
    [id] => 16
26 1 remi
    [entities_id] => 1
27 1 remi
    [name] => Need help
28 1 remi
    [date] => 2009-08-25 10:30:50
29 1 remi
    [closedate] => 
30 1 remi
    [date_mod] => 2009-08-25 10:35:21
31 1 remi
    [status] => new
32 1 remi
    [users_id] => 6
33 1 remi
    [users_id_recipient] => 6
34 1 remi
    [groups_id] => 0
35 1 remi
    [users_id_assign] => 0
36 1 remi
    [suppliers_id_assign] => 0
37 1 remi
    [groups_id_assign] => 0
38 1 remi
    [itemtype] => 0
39 1 remi
    [items_id] => 0
40 1 remi
    [content] => I can't send a mail
41 1 remi
    [urgence] => 3
42 1 remi
    [impact] => 3
43 1 remi
    [priority] => 3
44 1 remi
    [user_email] => 
45 1 remi
    [use_email_notification] => 0
46 1 remi
    [realtime] => 16
47 1 remi
    [ticketscategories_id] => 1
48 1 remi
    [cost_time] => 0.0000
49 1 remi
    [cost_fixed] => 0.0000
50 1 remi
    [cost_material] => 0.0000
51 1 remi
    [followups] => Array
52 1 remi
        (
53 1 remi
            [0] => Array
54 2 remi
                (
55 2 remi
                    [id] => 37
56 2 remi
                    [date] => 2009-08-25 14:15:05
57 2 remi
                    [users_id] => 6
58 2 remi
                    [content] => New document : Document ticket 16
59 2 remi
                )
60 2 remi
61 2 remi
62 2 remi
            [1] => Array
63 1 remi
                (
64 1 remi
                    [id] => 31
65 1 remi
                    [date] => 2009-08-25 10:35:21
66 1 remi
                    [users_id] => 6
67 1 remi
                    [content] => a new message
68 1 remi
                )
69 1 remi
        )
70 1 remi
)
71 1 remi
</pre>