diff --git a/templates/helpdesk/api_help.html b/templates/helpdesk/api_help.html index 99ec82f1..784c4172 100644 --- a/templates/helpdesk/api_help.html +++ b/templates/helpdesk/api_help.html @@ -44,7 +44,7 @@ -

Introduction

+

Introduction

Jutda Helpdesk provides a powerful API to allow you to interact with your helpdesk tickets by a means not otherwise provided by the helpdesk.

@@ -52,7 +52,7 @@

Your use of this system is open-ended: most business cases should be addressible with a little bit of coding to allow you to interact nicely with your helpdesk.

-

Request Basics & Authentication

+

Request Basics & Authentication

All requests to the API must be made using HTTP POST requests. Any request that is not made using POST will raise an error.

@@ -93,11 +93,11 @@ curl_setopt($api, CURLOPT_POSTFIELDS, "user=susan&password=fido&ticket=3 $result = curl_exec($api); curl_close($api); echo $result; -?< +?>

Note that cURL expects all data to be urlencoded, this is left as an exercise for the reader.

-

Responses

+

Responses

The API system makes proper use of the following HTTP response codes:

@@ -128,7 +128,7 @@ echo $result;
Any complex responses, such as a list of data.
-

Method Documentation

+

Method Documentation

The following public methods are available for use via the API. Each of them requires a valid request and authentication, and each has it's own parameters as described below.

@@ -143,7 +143,7 @@ echo $result;
  • find_user
  • -

    create_ticket

    +

    create_ticket

    This method creates a new helpdesk ticket.

    @@ -172,7 +172,7 @@ echo $result;

    If you receive a 200 OK response, then the content of the response will be the ticket ID.

    -

    delete_ticket

    +

    delete_ticket

    When given a ticket ID and confirmation, this method will delete a ticket entirely. This also deletes any followups, attachments, and other details.

    @@ -190,7 +190,7 @@ echo $result;

    A standard 200 OK response is given on success, or an error message on failure.

    -

    hold_ticket

    +

    hold_ticket

    If a ticket needs to be placed on hold, preventing it from being escalated, use this method.

    @@ -205,7 +205,7 @@ echo $result;

    A standard 200 OK response is given on success, or an error message on failure.

    -

    unhold_ticket

    +

    unhold_ticket

    If a ticket is currently on hold and you wish to remove that hold, use this method.

    @@ -220,7 +220,7 @@ echo $result;

    A standard 200 OK response is given on success, or an error message on failure.

    -

    add_followup

    +

    add_followup

    This method adds a comment / followup to a ticket. The followup can be public, in which case it is e-mailed to the submitter, or private. The followup will also be sent to others involved in the ticket: The owner and the queue notification / CC address.

    @@ -242,7 +242,7 @@ echo $result;

    A standard 200 OK response is given on success, or an error message on failure.

    -

    resolve

    +

    resolve

    This method adds a resolution to a ticket and marks it as resolved. The resolution will be e-mailed to everybody involved with the ticket, including the submitter.

    @@ -261,7 +261,7 @@ echo $result;

    A standard 200 OK response is given on success, or an error message on failure.

    -

    list_queues

    +

    list_queues

    This method provides a JSON-parsable list of queues, letting you access the individual queue ID in order to create tickets.

    @@ -272,7 +272,7 @@ echo $result;

    It provides a list of queues in JSON format. The fields provided are ID and Title.

    -

    find_user

    +

    find_user

    When given a username, this method provides the related numeric user ID - commonly used when creating or reassigning tickets.

    diff --git a/urls.py b/urls.py index 099e48a2..5f862c16 100644 --- a/urls.py +++ b/urls.py @@ -80,6 +80,11 @@ urlpatterns += patterns('', url(r'^api/(?P[a-z_-]+)/$', 'helpdesk.api.api', name='helpdesk_api'), + + url(r'^api/$', + 'django.views.generic.simple.direct_to_template', + {'template': 'helpdesk/api_help.html',}, + name='helpdesk_api_help'), url(r'^login/$', 'django.contrib.auth.views.login',