site logo

API v1 (deprecated)


Mojo Helpdesk API  

  • Can I import or export help desk data to and from Excel or an SQL database?

    Yes, Mojo Helpdesk API provides to export, import or update helpdesk data. Since you create the scripts, you can make them output a CSV format (for Excel) or any other format you need. See the script examples for a quick start.

  • Can I create custom reports using PHP, Ruby, or Perl?
    Yes, you can with any language that supports SOAP or web services, including Java and C#, Phyton, Perl, PHP, Ruby, etc...
  • Can I create tickets using the API?
    Yes. Mojo Helpdesk API allows you to create and update tickets from the API. You can also add comments to existing tickets.

API Documentation  

This section is for nerds, geeks and other programmers and it is fairly technical. If you like soap, xml, wsdl then you'll feel at home.

HINT: For a quick start, look at the source code examples on this site.

 

 

                        === Mojo Helpdesk API ===

The Mojo Helpdesk Ticket API may be accessed by either SOAP or XML-RPC.

For a helpdesk at URL:

http://example.mojohelpdesk.com/

The API endpoint will be at URL:

http://example.mojohelpdesk.com/backend/api

The SOAP service description file will be at:

http://example.mojohelpdesk.com/backend/service.wsdl

An authorized helpdesk user must be associated with the operation.
This is done by specifying an access key. The access key is displayed
on the user's profile page.

At this time, the API is limited to users with "technician" (and
higher) access.


=== Operations ===

The following operations are supported:

-----
| GetTicketById - Retrieves a single ticket.

Synopsis:

response = GetTicketById(access_key, ticket_id)

Parameters:

access_key (string) - user access key
ticket_id (int) - a ticket id number

Returns:

response (TicketResponse) - information on a ticket

-----
| FindTickets - Perform a search query for tickets.

Synopsis:

response = FindTickets(access_key, search)

Parameters:

access_key (string) - user access key
search (TicketSearchParameters) - search conditions

Returns:

response (TicketListResponse) - information on a collection of tickets

-----
| CreateTicket - Create a new ticket

Synopsis:

response = CreateTicket(access_key, ticket_params)

Parameters:

access_key (string) - user access key
ticket_params (TicketSearchParameters) - ticket information

Returns:

response (TicketResponse) - the newly created ticket

-----
| UpdateTicket - Update an existing ticket

Synopsis:

response = UpdateTicket(access_key, ticket_id, ticket_params)

Parameters:

access_key (string) - user access key
ticket_id (int) - a ticket id number
ticket_params (TicketSearchParameters) - new ticket values

Returns:

response (TicketResponse) - the updated ticket

-----
| DeleteTicket - Update an existing ticket

Synopsis:

        response = DeleteTicket(access_key, ticket_id)

      Parameters:
       access_key (string) - user access key
       ticket_id (int) - a ticket id number       Returns:        response (TicketResponse) - the deleted ticket
-----
| CreateComment - Add a comment to an existing ticket

Synopsis:

response = UpdateTicket(access_key, comment_create_params)

Parameters:

access_key (string) - user access key
comment_create_params (CommentCreateParameters)

Returns:

response (CommentResponse) - the comment

-----
| GetComments - get all comments for an existing ticket

Synopsis:

response = GetComment(access_key, ticket_id)

Parameters:

access_key (string) - user access key
ticket_id (int) - the id of the ticket

Returns:

response (CommentListResponse) - the collection of comments


-----
| GetUserById - Retrieves a single user.

Synopsis:

response = GetUserById(access_key, user_id)

Parameters:

access_key (string) - user access key
user_id (int) - a user id number

Returns:

response (UserNameResponse) - information on a user


-----
| CreateUser - Create a new user

Synopsis:

response = CreateUser(access_key, user_params)

Parameters:

access_key (string) - user access key
user_params (UserParameters) -

Returns:

response (UserNameResponse) - the newly created user

-----
| UpdateUser - Update an existing user

Synopsis:

response = UpdateUser(access_key, user_id, user_params)

Parameters:

access_key (string) - user access key
user_id (int) - a ticket id number
user_params (UserParameters) - user paramaters

Returns:

response (UserNameResponse) - the updated user
-----
| GetAllUsers - get all the users for the current account

Synopsis:

response = GetAllUsers(access_key, user_params)

Parameters:

access_key (string) - user access key
user_params (UserSearchParameters) - user search paramaters

Returns:

response (UserListResponse) - the user list
-----
| GetAgentsAndAbove - get all the users that have technician and above roles for the current account

Synopsis:

response = GetAgentsAndAbove(access_key, user_params)

Parameters:

access_key (string) - user access key
user_params (UserSearchParameters) - user search paramaters

Returns:

response (UserListResponse) - the user list


=========================================================================
=== Data Objects ===

Some of the object parameters have an "id" member. You can determine
the id through the helpdesk by performing the "show" action on the
desired item (a user, company, ticket queue, etc.) and noting the
number at the end of the URL.


-----
| TicketSearchParameters - Parameters for a ticket search query.
Matching tickets must meet all the specified parameters
(AND operation). All parameters are optional; an empty
TicketSearchParameters object matches all tickets.

query_string (string) - A string to match against ticket title and
description.

created_by_id (string) - A user id corresponding to the user that
created the ticket. The token "me" can be used to indicate the
user performing the query.

company_id (string) - A company id that corresponds to the company
of the user that created the ticket.

assigned_to_id (string) - A user id corresponding to the technician
that is assigned to the ticket. The token "me" can be used to
indicate the user performing the query.

status (string) - A status id or name. Valid status names are:
"new", "assigned", "in progress", "hold", "information requested",
"solution proposed", and "closed". Also, the token "open" can be
used to mean any status but "closed".

 status_id (string) - A status id. Valid status ids are:
10 for "new", 
15 for "assigned", 
20 for "in progress", 
30 for "hold", 
40 for "information requested",
50 for "solved", and 
60 for "closed".

priority (string) - name. Valid priority names
are: "low", "normal", "urgent", "emergency".

priority_id (string) - A priority id. Valid priority is are: 40 for "low", 
30 for "normal",  20 for "urgent", and 10 for "emergency"

 queue (string) - A ticket queue id or name.
 queue_id (string) - Empty string (for backward compatibility).

 created_days (string) - A number of days ago.  If this parameter
is set, then "created_days_before_or_after" must be set too.
If set to "before" then tickets created before this time are
matched. If set to "after" then tickets created after this
time are matched.

created_days_before_or_after (string) - The tokens "before"
or "after".

updated_days (string) - A number of days ago. If this parameter
is set, then "updated_days_before_or_after" must be set too.
If set to "before" then tickets last changed before this time
are matched. If set to "after" then tickets last changed after
this time are matched.

updated_days_before_or_after (string) - The tokens "before"
or "after".

results_per_page (string) - Maximum number of tickets the query
should return. Default is "10". Set to "0" for unlimited. CAUTION: Temporary we limited the max number to 100. This will be while
we are working on a solution that will return the ticket lists much faster .


 page (string) - starting page. 1 will return first results_per_page tickets.
2 will return the second results_per_page tickets. 3 - will return the third, etc.
sort_column (string) - Selects ordering of the ticket result list.
Default is "tickets.updated_on" reversed. Possible values are:

tickets.updated_on
tickets.created_on
tickets.id
tickets.title
submitted_by
assigned_to
status
priority
queue

sort_is_reversed (bool) - Set "true" to reverse the sorting
order.


-----
| TicketResponse - Information on a ticket, returned by an API call.

protocol_version (string) - Protocol version in "x.y" form.

successful (bool) - True if operation succeeded.

error_message (string) - Error message set if "successful" false.

ticket (TicketResult) - Information on a ticket.


-----
| TicketListResponse - Information on a collection of tickets, returned
by an API call.

protocol_version (string) - Protocol version in "x.y" form.

successful (bool) - True if operation succeeded.

error_message (string) - Error message set if "successful" false.

number_tickets (int) - Length of "tickets" list.

tickets (array of TicketResult) - Information on a collection of tickets.


-----
| TicketResult - Information on a ticket.

id (int)
title (string)
description (string)
working_comment (string)
created_by (UserNameResult)
assigned_to (UserNameResult)
status (string)
priority (string)
queue (string)
rating (int)
rated_on (datetime)
created_on (datetime)
updated_on (datetime)
status_changed_on (datetime)
solved_on (datetime)
time_spent (float)
url (string) - URL to view this ticket ("show" action)



===========================================================================
-----
| CompanyNameResult - Information on a company.

id (int)
name (string)
===========================================================================
-----
| CommentResult - Information on a comment.

id (int)
body (string)
is_private (int)
time_spent (float)
user_id (int)
ticket_id (int) | CommentResponse - Information on a Comment, returned by an API call.
protocol_version (string) - Protocol version in "x.y" form.
successful (bool) - True if operation succeeded.
error_message (string) - Error message set if "successful" false.
Comment (CommentResult) - Information on a Comment.

 =========================================================================== ----- | CommentCreateParameters - Information on a comment.

user_id (int)
body (string)
is_private (int)
ticket_id (int)
time_spent (float)


 =========================================================================== ----- | UserCreateParameters - Information on a user.
email (string) first_name (string) last_name (string) display_name (string) work_phone (string) cell_phone (string) home_phone (string) user_notes (string) password (string) - plain text password (will be automatically encrypted in the database) company_id(string) - may contain company name or id. If a company name is provided
and if the company does not exist it will be created.


 =========================================================================== ----- | UserResponse - Information on a User, returned by an API call.
protocol_version (string) - Protocol version in "x.y" form.
successful (bool) - True if operation succeeded.
error_message (string) - Error message set if "successful" false.
UserNameResult - Information on a Helpdesk User.   id(int)
  first_name(string)
  middle_name(string)
  last_name(string)
  email(string)
  full_name(string)
  company_id(int)
  role_id(int)
  company_name(string)
  role_name(string)
  is_active(bool)
  can_access_company_tickets(bool)
  work_phone(string)
  cell_phone(string)
  home_phone(string)
  fax_phone(string)
  im_screen_name(string)
  user_notes(string)
  helpdesk_notes(string)
  mojo_number(int)
  last_login_on(datetime)
  created_on(datetime)
  updated_on(datetime)
 =========================================================================== ----- | UserSearchParameters  Parameters for a user search query. (see TicketSearchParameters constraints)
  results_per_page (string)   page (string)

-----
| UserListResponse - Information on a collection of users, returned
by an API call.

protocol_version (string) - Protocol version in "x.y" form.

successful (bool) - True if operation succeeded.

error_message (string) - Error message set if "successful" false.

number_users (int) - Length of "users" list.

users (array of UserNameResult) - Information on a collection of users.