Newer
Older
<?php
/*********************************************************************
Peter Rotich
committed
http.php
Peter Rotich
committed
HTTP controller for the osTicket API
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
Peter Rotich
committed
require 'api.inc.php';
# Include the main api urls
require_once INCLUDE_DIR."class.dispatcher.php";
$dispatcher = patterns('',
url_post("^/tickets\.(?P<format>xml|json|email)$", array('api.tickets.php:TicketApiController','create')),
url('^/task/', patterns('',
url_post("^cron$", array('api.cron.php:CronApiController', 'execute'))
# Call the respective function
print $dispatcher->resolve($_SERVER['PATH_INFO']);