GlpiaddTicketDocument » History » Version 3

« Previous - Version 3/11 (diff) - Next » - Current version
remi, 08/25/2009 02:27 PM


Methods > glpi.addTicketDocument

Add a document to a existing ticket if the authenticated user can edit it.

input a hastable

  • help option to get usage information
  • tracking : ID of the ticket
  • uri : of the document to be uploaded
  • name : of the document
  • comment : of the document
return a hastable if succed (as for glpi.getTicket)
  • fields of glpi_tracking
  • followups an array of hasble : fields of glpi_followups

Call example

$ php testxmlrpc.php --session=j4mp77bmqu428ff38gufl3fvi3 --method=glpi.addTicketDocument \
   --ticket=16 --uri=http://download.foo.com/screenshoot.jpg 
+ Calling 'glpi.addTicketDocument' on http://localhost//glpi072/plugins/webservices/xmlrpc.php?session=j4mp77bmqu428ff38gufl3fvi3
+ Response: Array
(
    [id] => 16
    [entities_id] => 1
    [name] => Need help
    [date] => 2009-08-25 10:30:50
    [closedate] => 
    [date_mod] => 2009-08-25 10:35:21
    [status] => new
    [users_id] => 6
    [users_id_recipient] => 6
    [groups_id] => 0
    [users_id_assign] => 0
    [suppliers_id_assign] => 0
    [groups_id_assign] => 0
    [itemtype] => 0
    [items_id] => 0
    [content] => I can't send a mail
    [urgence] => 3
    [impact] => 3
    [priority] => 3
    [user_email] => 
    [use_email_notification] => 0
    [realtime] => 16
    [ticketscategories_id] => 1
    [cost_time] => 0.0000
    [cost_fixed] => 0.0000
    [cost_material] => 0.0000
    [followups] => Array
        (
            [0] => Array
                (
                    [id] => 37
                    [date] => 2009-08-25 14:15:05
                    [users_id] => 6
                    [content] => New document : Document ticket 16
                )

            [1] => Array
                (
                    [id] => 31
                    [date] => 2009-08-25 10:35:21
                    [users_id] => 6
                    [content] => a new message
                )
        )
)