Welcome to the unofficial OSTicket API!
The purpose of this API is to help the community and leverage the use of OSTicket.
For more info, please go to their official website: https://osticket.com/
Tested Versions
This api was tested in the following OST versions:
Version |
---|
v1.15.3.1 Latest Release |
v1.14.3 |
How to Use
To use OSTicket Unofficial API you have to place the ost_wbs
directory in the root of OSTicket server.
Then, go to ost_wbs > config.php
and change the DB credentials
and the table prefix
.
Use the following URL:
{YOUR-DOMAIN}/ost_wbs/?
NOTE: If you dont know the credentials, go to /include/ost-config.php
. That is the main config file for OSTicket system.
Authentication
In all requests, the API key that was created in the OSTicket system must be sent to authenticate the user.
Option | Type | Mandatory | Description |
---|---|---|---|
apikey |
string | |
Official API-Key generated in OSTicket System |
Example:
{YOUR-DOMAIN}/ost_wbs/?apikey={API-KEY}
π©
Ticket Info
π·
Specific Ticket
You can fetch all info from a specific ticket using the ID or ID Number, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=ticket&condition=specific¶meters={TICKET-ID/TICKET-NUMBER}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
ticket |
|
Indicates the content of the request |
condition |
string |
specific |
|
Indicates the condition of the request |
parameters |
int or string |
ID or Number |
|
Indicates specific ID or Number |
π·
By Status
You can fetch all tickets based on the current status, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=ticket&condition=all&sort=status¶meters={TICKET-STATUS-ID}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
ticket |
|
Indicates the content of the request |
condition |
string |
all |
|
Indicates the condition of the request |
sort |
string |
status |
|
Indicates the type of search |
parameters |
int or string |
Ticket Status ID |
|
Ticket status ID you want to search for |
Available ticket status:
Option | Name |
---|---|
0 |
All not necessarily a "state" but returns all tickets in the DB regardless of state |
1 |
Open |
2 |
Resolved |
3 |
Closed |
4 |
Archived |
5 |
Deleted |
6 |
On Going |
7 |
Pending |
π·
Between Dates
You can fetch all tickets by creation between two given dates, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=ticket&condition=all&sort=creationDate¶meters={START-DATEtoEND-DATE}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
ticket |
|
Indicates the content of the request |
condition |
string |
all |
|
Indicates the condition of the request |
sort |
string |
creationDate |
|
Indicates the type of search |
parameters |
string |
1990-01-01to2000-01-01 |
|
Date interval that all tickets will be fetched |
π·
Between Dates by Status
You can fetch all tickets by creation between two given dates and by status, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=ticket&condition=all&sort=statusByDate¶meters={START-DATEtoEND-DATE},{TICKET-STATUS-ID}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
ticket |
|
Indicates the content of the request |
condition |
string |
all |
|
Indicates the condition of the request |
sort |
string |
statusByDate |
|
Indicates the type of search |
parameters |
string |
1990-01-01to2000-01-01 ,2 |
|
Date interval and status by wich all tickets will be fetched |
π©
User Info
??
Specific User
You can fetch all info from a specific user using the ID, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=user&condition=specific¶meters={USER-ID}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
user |
|
Indicates the content of the request |
condition |
string |
specific |
|
Indicates the condition of the request |
parameters |
int |
User ID |
|
Indicates specific ID |
π·
Between Dates
You can fetch all user by creation between two given dates, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=user&condition=all&sort=creationDate¶meters={START-DATEtoEND-DATE}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
user |
|
Indicates the content of the request |
condition |
string |
all |
|
Indicates the condition of the request |
sort |
string |
creationDate |
|
Indicates the type of search |
parameters |
string |
1990-01-01to2000-01-01 |
|
Date interval that all users will be fetched |
π©
Department Info
π·
Specific Department
You can fetch all info from a specific deparment using the ID, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=department&condition=specific¶meters={DEPARTMENT-ID}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
department |
|
Indicates the content of the request |
condition |
string |
specific |
|
Indicates the condition of the request |
parameters |
int |
Department ID |
|
Indicates specific ID |
π·
Between Dates
You can fetch all departments by creation between two given dates, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=department&condition=all&sort=creationDate¶meters={START-DATEtoEND-DATE}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
department |
|
Indicates the content of the request |
condition |
string |
all |
|
Indicates the condition of the request |
sort |
string |
creationDate |
|
Indicates the type of search |
parameters |
string |
1990-01-01to2000-01-01 |
|
Date interval that all departments will be fetched |
π©
SLA Info
π·
Specific SLA
You can fetch all info from a specific sla using the ID, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=sla&condition=specific¶meters={SLA-ID}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
sla |
|
Indicates the content of the request |
condition |
string |
specific |
|
Indicates the condition of the request |
parameters |
int |
SLA ID |
|
Indicates specific ID |
π·
Between Dates
You can fetch all departments by creation between two given dates, for example:
{YOUR DOMAIN}/ost_wbs/?apikey={API-KEY}&query=sla&condition=all&sort=creationDate¶meters={START-DATEtoEND-DATE}
Option | Type | value | Mandatory | Description |
---|---|---|---|---|
apikey |
string |
API-Key | |
Official API-Key generated in OSTicket System |
query |
string |
sla |
|
Indicates the content of the request |
condition |
string |
all |
|
Indicates the condition of the request |
sort |
string |
creationDate |
|
Indicates the type of search |
parameters |
string |
1990-01-01to2000-01-01 |
|
Date interval that all SLAs will be fetched |