Search
Global search across tickets, clients, assets, software, networks, services and linked records
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| qrequired | query | string |
Example request
curl "https://YOUR-HOST/api/v1/search?q=1" \
-H "Authorization: Bearer $TOKEN"
import requests
response = requests.get(
"https://YOUR-HOST/api/v1/search",
headers={"Authorization": f"Bearer {TOKEN}"},
params={"q":1},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/search?q=1", {
method: "GET",
headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/search?q=1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);
Responses
200Grouped search results
| Field | Type | Description |
|---|---|---|
| tickets | array of object | |
| tickets[].id | integer | |
| tickets[].number | integer | |
| tickets[].subject | string | |
| tickets[].priority | string | |
| tickets[].status | string | |
| tickets[].status_color | string | |
| tickets[].client | string | |
| tickets[].assigned_to | string | |
| tickets[].created_at | string | |
| tickets[].due_at | string | |
| tickets[].resolved_at | string | |
| tickets[].updated_at | string | |
| clients | array of object | |
| clients[].id | integer | |
| clients[].name | string | |
| clients[].phone | string | |
| clients[].city | string | |
| clients[].state | string | |
| clients[].website | string | |
| assets | array of object | |
| assets[].id | integer | |
| assets[].name | string | |
| assets[].type | string | |
| assets[].make | string | |
| assets[].model | string | |
| assets[].serial | string | |
| assets[].os | string | |
| assets[].status | string | |
| assets[].client | string | |
| software | array of object | |
| software[].id | integer | |
| software[].name | string | |
| software[].detail | string | |
| software[].client_id | integer | |
| software[].client | string | |
| networks | array of object | |
| networks[].id | integer | |
| networks[].name | string | |
| networks[].detail | string | |
| networks[].client_id | integer | |
| networks[].client | string | |
| services | array of object | |
| services[].id | integer | |
| services[].name | string | |
| services[].detail | string | |
| services[].client_id | integer | |
| services[].client | string | |
| linked | array of object | Records linked to a record whose name matches (links and the older link tables), each with what it is linked to. |
| linked[].type | string | |
| linked[].id | integer | |
| linked[].name | string | |
| linked[].client_id | integer | |
| linked[].linked_to | string | e.g. "Asset srv-core" |
| linked[].relation | string | e.g. "documents" |
Example response
json
{
"tickets": [
{
"id": 1,
"number": 1,
"subject": "string",
"priority": "string",
"status": "string",
"status_color": "string",
"client": "string",
"assigned_to": "string",
"created_at": "string",
"due_at": "string",
"resolved_at": "string",
"updated_at": "string"
}
],
"clients": [
{
"id": 1,
"name": "string",
"phone": "string",
"city": "string",
"state": "string",
"website": "string"
}
],
"assets": [
{
"id": 1,
"name": "string",
"type": "string",
"make": "string",
"model": "string",
"serial": "string",
"os": "string",
"status": "string",
"client": "string"
}
],
"software": [
{
"id": 1,
"name": "string",
"detail": "string",
"client_id": 1,
"client": "string"
}
],
"networks": [
{
"id": 1,
"name": "string",
"detail": "string",
"client_id": 1,
"client": "string"
}
],
"services": [
{
"id": 1,
"name": "string",
"detail": "string",
"client_id": 1,
"client": "string"
}
],
"linked": [
{
"type": "string",
"id": 1,
"name": "string",
"client_id": 1,
"linked_to": "string",
"relation": "string"
}
]
}
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string |