Увод
Zammad нуди моћан REST-API[1] који омогућава све операције доступне и путем корисничког интерфејса.
Ова страница пружа први утисак о стварима које важе за све крајње тачке и начин прилагођавања.
Клијенти за API
Доступни су клијенти за API. Имајте у виду да ови клијенти можда неће омогућити приступ свим наведеним крајњим тачкама овде.
- Ruby клијент (званични)
- PHP клијент (званични)
- Python клијент (треће лице)
- .NET клијент (треће лице)
- Android API клијент (треће лице)
- Go клијент (треће лице; само API клијент, без апликације „готове за употребу”)
Аутентификација
Zammad подржава три различите методе аутентификације за свој API.
HTTP основна аутентификација (корисничко име/лозинка)
Корисничко име / лозинка морају бити прослеђени као HTTP заглавље у HTTP захтеву. Ова метода аутентификације може бити онемогућена и можда није доступна у вашем систему.
sh
curl -u {username}:{password} https://{fqdn}/{endpoint}WARNING
Одстојимо од коришћења основне аутентификације. Користите токене за приступ где год је то могуће!
HTTP токенска аутентификација (токен за приступ)
Токен за приступ мора бити прослеђен као HTTP заглавље у HTTP захтеву. Сваки корисник може креирати више токена за приступ у својим корисничким подешавањима. Ова метода аутентификације може бити онемогућена и можда није доступна у вашем систему.
sh
curl -H "Authorization: Token token={your_token}" https://{fqdn}/{endpoint}OAuth2 (приступ путем токена)
Токен мора бити прослеђен као HTTP заглавље у вашим захтевима. Ово омогућава апликацијама трећих страна да се аутентификују код Zammad-а.
sh
curl -H "Authorization: Bearer {your_token}" https://{fqdn}/{endpoint}Крајње тачке и примери података
Због једноставности на наредним страницама нећемо наводити специфичне команде, већ ћемо навести могућу методу позива (нпр. GET) и крајњу тачку за коришћење (нпр. /api/v1/users). У случају да Zammad очекује информације унутар URL-ова ових крајњих тачака, ставићемо их у витичасте заграде на следећи начин: /api/v1/users/{user id}
Формат одговора биће комплетна JSON порука од подразумеваног инстанцу Zammad-а. Имајте на уму да можете видети више поља или опште информације уколико сте додали објекте или друге податке.
Врста садржаја
Zammad враћа JSON payload-e сваки пут када преузимате податке. Ако ћете прослеђивати податке, без обзира на врсту захтева, не заборавите да наведете и тип садржаја application/json.
Одговори payload-a (Прошири)
Zammad увек враћа информације укључујући упуте за све релације. Ако вам је потребно више информација од тога (јер ID-јеви можда нису довољни), можете проширити позиве на крајњу тачку са ?expand=true.
Овај прекидач ће пружити још више информација - најмање именске релације поред ID-ја. Испод се могу наћи два примера, један за тикет и један за корисника:
Payload корисника:
Details
json
// HTTP-Code 200 OK
{
"id": 2,
"organization_id": 1,
"login": "nicole.braun@zammad.org",
"firstname": "Nicole",
"lastname": "Braun",
"email": "nicole.braun@zammad.org",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"tickets_closed": 0,
"tickets_open": 2
},
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-06-27T08:35:34.872Z",
"updated_at": "2025-07-02T11:46:41.840Z",
"role_ids": [
3
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {},
"roles": [
"Customer"
],
"two_factor_preferences": [],
"organizations": [],
"authorizations": [],
"overview_sortings": [],
"organization": "Zammad Foundation",
"groups": {},
"created_by": "-",
"updated_by": "admin@example.com"
}Payload тикета:
Details
json
// HTTP-Code 200 OK
{
"id": 1,
"group_id": 1,
"priority_id": 2,
"state_id": 1,
"organization_id": 1,
"number": "97001",
"title": "Welcome to Zammad!",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-06-27T08:35:35.210Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-06-27T08:35:35.210Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 2,
"created_by_id": 2,
"created_at": "2025-06-27T08:35:35.005Z",
"updated_at": "2025-06-27T08:35:35.306Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
1
],
"ticket_time_accounting_ids": [],
"ai_stored_result_ids": [
1,
4
],
"referencing_checklists": [],
"group": "Users",
"organization": "Zammad Foundation",
"ticket_time_accounting": [],
"state": "new",
"priority": "2 normal",
"owner": "-",
"customer": "nicole.braun@zammad.org",
"created_by": "nicole.braun@zammad.org",
"updated_by": "nicole.braun@zammad.org",
"create_article_type": "phone",
"create_article_sender": "Customer"
}TIP
Имајте на уму да Core Workflows могу ограничити приступ атрибутима или вредностима.
Превод
Пошто Zammad ограничава број враћених објеката из перформанси, можда ћете морати да користите пагинацију у одређеним тренутцима.
INFO
Број враћених објеката: Zammad има строга ограничења за максималан број враћених објеката. Не можете повећати ова ограничења.
Укупан број објеката за повратак: Zammad не пружа укупан број објеката доступних за ваше упите, осим ако их експлицитно не затражите. Да бисте укључили број резултата претраге, користите параметар with_total_count или only_total_count.
Да бисте користили пагинацију, потребне су вам две ГЕТ опције: per_page и page. Комбинујте их да бисте добили 5 резултата са прве странице: ?page=1&per_page=5 - повећајте број странице да бисте добили више резултата.
Претрага
Претрага ендпоинта
Неки ендпоинти подржавају упит за претрагу. То су:
Grupe <group>- Организације
Uloge <role>- Стање тикета
Korisnici <user>
Следећи ендпоинти такође подржавају упит за претрагу, али нису експлицитно покривени у овој документацији:
- Rails команде
- База знања
- Макрои
- Преглед
- Шаблони
- Текстуални исечак
Пример претраге
GET-захтев послат: /api/v1/tickets/search?query=welcome
Details
json
// HTTP-Code 200 OK
[
{
"id": 1,
"group_id": 1,
"priority_id": 2,
"state_id": 1,
"organization_id": 1,
"number": "20001",
"title": "Welcome to Zammad!",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-01-14T07:45:08.726Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-01-14T07:45:08.726Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 2,
"created_by_id": 2,
"created_at": "2025-01-14T07:45:08.681Z",
"updated_at": "2025-01-14T07:45:08.790Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
1
],
"ticket_time_accounting_ids": []
}
]Параметар expand
Ако желите да имате додатне повезане информације, можете користити параметар expand. Његовом употребом се разрешавају ID-јеви и излазе вредности/имена додатно.
GET-захтев послат: /api/v1/tickets/search?query=welcome&expand=true
Details
json
// HTTP-Code 200 OK
[
{
"id": 1,
"group_id": 1,
"priority_id": 2,
"state_id": 1,
"organization_id": 1,
"number": "20001",
"title": "Welcome to Zammad!",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-01-14T07:45:08.726Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-01-14T07:45:08.726Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 2,
"created_by_id": 2,
"created_at": "2025-01-14T07:45:08.681Z",
"updated_at": "2025-01-14T07:45:08.790Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
1
],
"ticket_time_accounting_ids": [],
"referencing_checklists": [],
"group": "Users",
"organization": "Zammad Foundation",
"ticket_time_accounting": [],
"state": "new",
"priority": "2 normal",
"owner": "-",
"customer": "nicole.braun@zammad.org",
"created_by": "nicole.braun@zammad.org",
"updated_by": "nicole.braun@zammad.org",
"create_article_type": "phone",
"create_article_sender": "Customer"
}
]Параметар фулл
Можете чак проширити одговор коришћењем параметра full. Имајте на уму да овај одговор може бити огроман. Враћа све ресурсе укључујући повезане атрибуте и total_count резултата претраге такође.
GET-захтев послат: /api/v1/tickets/search?query=welcome&full=true
Details
json
// HTTP-Code 200 OK
{
"record_ids": [
1
],
"assets": {
"Ticket": {
"1": {
"id": 1,
"group_id": 1,
"priority_id": 2,
"state_id": 1,
"organization_id": 1,
"number": "20001",
"title": "Welcome to Zammad!",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-01-14T07:45:08.726Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-01-14T07:45:08.726Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 2,
"created_by_id": 2,
"created_at": "2025-01-14T07:45:08.681Z",
"updated_at": "2025-01-14T07:45:08.790Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
1
],
"ticket_time_accounting_ids": []
}
},
"Group": {
"1": {
"id": 1,
"signature_id": 1,
"email_address_id": 1,
"name": "Users",
"name_last": "Users",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": "Standard Group/Pool for Tickets.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:08.274Z",
"updated_at": "2025-01-14T07:46:20.513Z",
"user_ids": [
3
]
},
"2": {
"id": 2,
"signature_id": null,
"email_address_id": null,
"name": "Support",
"name_last": "Support",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:20.548Z",
"updated_at": "2025-01-14T07:46:20.636Z",
"user_ids": [
4,
10,
3
]
},
"3": {
"id": 3,
"signature_id": null,
"email_address_id": null,
"name": "Support::1st Level",
"name_last": "1st Level",
"parent_id": 2,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:20.696Z",
"updated_at": "2025-01-14T07:46:20.895Z",
"user_ids": [
7,
6,
8,
4,
9,
5,
10,
3
]
},
"4": {
"id": 4,
"signature_id": null,
"email_address_id": null,
"name": "Support::2nd Level",
"name_last": "2nd Level",
"parent_id": 2,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:20.946Z",
"updated_at": "2025-01-14T07:46:21.085Z",
"user_ids": [
7,
6,
4,
5,
10,
3
]
},
"5": {
"id": 5,
"signature_id": null,
"email_address_id": null,
"name": "Sales",
"name_last": "Sales",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.149Z",
"updated_at": "2025-01-14T07:46:21.249Z",
"user_ids": [
14,
13,
10,
3
]
},
"6": {
"id": 6,
"signature_id": null,
"email_address_id": null,
"name": "Logistics Department",
"name_last": "Logistics Department",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.307Z",
"updated_at": "2025-01-14T07:46:21.389Z",
"user_ids": [
13,
10,
3
]
},
"7": {
"id": 7,
"signature_id": null,
"email_address_id": null,
"name": "Logistics Department::Shipping",
"name_last": "Shipping",
"parent_id": 6,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.447Z",
"updated_at": "2025-01-14T07:46:21.531Z",
"user_ids": [
13,
10,
3
]
},
"8": {
"id": 8,
"signature_id": null,
"email_address_id": null,
"name": "Logistics Department::Returns Processing",
"name_last": "Returns Processing",
"parent_id": 6,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.570Z",
"updated_at": "2025-01-14T07:46:21.633Z",
"user_ids": [
13,
10,
3
]
},
"9": {
"id": 9,
"signature_id": null,
"email_address_id": null,
"name": "IT Internal",
"name_last": "IT Internal",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.673Z",
"updated_at": "2025-01-14T07:46:21.761Z",
"user_ids": [
11,
10,
3
]
},
"10": {
"id": 10,
"signature_id": null,
"email_address_id": null,
"name": "IT Internal::Infrastructure",
"name_last": "Infrastructure",
"parent_id": 9,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.813Z",
"updated_at": "2025-01-14T07:46:21.881Z",
"user_ids": [
11,
10,
3
]
},
"11": {
"id": 11,
"signature_id": null,
"email_address_id": null,
"name": "IT Internal::IT Support",
"name_last": "IT Support",
"parent_id": 9,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.932Z",
"updated_at": "2025-01-14T07:46:21.995Z",
"user_ids": [
12,
10,
3
]
}
},
"User": {
"1": {
"id": 1,
"organization_id": null,
"login": "-",
"firstname": "-",
"lastname": "",
"email": "",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": false,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {},
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.542Z",
"updated_at": "2025-01-14T07:45:07.542Z",
"role_ids": [],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {}
},
"3": {
"id": 3,
"organization_id": 2,
"login": "lauren@fastlane.inc",
"firstname": "Lauren",
"lastname": "Brooks",
"email": "lauren@fastlane.inc",
"image": "775c807d577dbd6bd95569ec1872f338",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": "2025-01-14T07:46:54.082Z",
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
},
"locale": "en-us"
},
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:46:17.855Z",
"updated_at": "2025-01-14T07:46:58.108Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"1": [
"full"
],
"2": [
"full"
],
"3": [
"full"
],
"4": [
"full"
],
"5": [
"full"
],
"6": [
"full"
],
"7": [
"full"
],
"8": [
"full"
],
"9": [
"full"
],
"10": [
"full"
],
"11": [
"full"
]
}
},
"4": {
"id": 4,
"organization_id": 2,
"login": "ethan@fastlane.inc",
"firstname": "Ethan",
"lastname": "Kwan",
"email": "ethan@fastlane.inc",
"image": "3c3a37e93647e40c595937e336953de8",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:18.901Z",
"updated_at": "2025-01-14T07:46:26.067Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"2": [
"full"
],
"3": [
"full"
],
"4": [
"full"
]
}
},
"5": {
"id": 5,
"organization_id": 2,
"login": "julian@fastlane.inc",
"firstname": "Julian",
"lastname": "Reyes",
"email": "julian@fastlane.inc",
"image": "5ead44f8048cd52d94198bbb7aa1c0cc",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.051Z",
"updated_at": "2025-01-14T07:46:26.113Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
],
"4": [
"full"
]
}
},
"6": {
"id": 6,
"organization_id": 2,
"login": "thomas@fastlane.inc",
"firstname": "Thomas",
"lastname": "Lee",
"email": "thomas@fastlane.inc",
"image": "32340889dbe9bc093f9304d1f708ca6f",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.161Z",
"updated_at": "2025-01-14T07:46:26.156Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
],
"4": [
"full"
]
}
},
"7": {
"id": 7,
"organization_id": 2,
"login": "liam@fastlane.inc",
"firstname": "Liam",
"lastname": "Chen",
"email": "liam@fastlane.inc",
"image": "548f5e2072493a829319359384ba3c49",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.288Z",
"updated_at": "2025-01-14T07:46:26.202Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
],
"4": [
"full"
]
}
},
"8": {
"id": 8,
"organization_id": 2,
"login": "alex@fastlane.inc",
"firstname": "Alexander",
"lastname": "Jensen",
"email": "alex@fastlane.inc",
"image": "8e837e5b08ef314f920f13e6b8e44b3f",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.401Z",
"updated_at": "2025-01-14T07:46:26.245Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
]
}
},
"9": {
"id": 9,
"organization_id": 2,
"login": "emily@fastlane.inc",
"firstname": "Emily",
"lastname": "Wilson",
"email": "emily@fastlane.inc",
"image": "f527a90b9dc0c731005f5756bbd5a432",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.514Z",
"updated_at": "2025-01-14T07:46:26.301Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
]
}
},
"10": {
"id": 10,
"organization_id": 2,
"login": "hannah@fastlane.inc",
"firstname": "Hannah",
"lastname": "Taylor",
"email": "hannah@fastlane.inc",
"image": "7b590e70915e7c33fff328f7e8fa0bb9",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.638Z",
"updated_at": "2025-01-14T07:46:26.406Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"2": [
"full"
],
"3": [
"full"
],
"4": [
"full"
],
"5": [
"full"
],
"6": [
"full"
],
"7": [
"full"
],
"8": [
"full"
],
"9": [
"full"
],
"10": [
"full"
],
"11": [
"full"
]
}
},
"11": {
"id": 11,
"organization_id": 2,
"login": "jackson@fastlane.inc",
"firstname": "Jackson",
"lastname": "Lee",
"email": "jackson@fastlane.inc",
"image": "f60bee881cf1856275d4f770ab9f6063",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.779Z",
"updated_at": "2025-01-14T07:46:26.451Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"9": [
"full"
],
"10": [
"full"
]
}
},
"12": {
"id": 12,
"organization_id": 2,
"login": "emily.t@fastlane.inc",
"firstname": "Emily",
"lastname": "Tran",
"email": "emily.t@fastlane.inc",
"image": "c9a8e23fe76079f0d249c87bcd145f95",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.893Z",
"updated_at": "2025-01-14T07:46:26.493Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"11": [
"full"
]
}
},
"2": {
"id": 2,
"organization_id": 1,
"login": "nicole.braun@zammad.org",
"firstname": "Nicole",
"lastname": "Braun",
"email": "nicole.braun@zammad.org",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"tickets_closed": 0,
"tickets_open": 1
},
"updated_by_id": 2,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:08.641Z",
"updated_at": "2025-01-14T07:45:20.373Z",
"role_ids": [
3
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {}
}
},
"Role": {
"2": {
"id": 2,
"name": "Agent",
"preferences": {},
"default_at_signup": false,
"active": true,
"note": "To work on Tickets.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.649Z",
"updated_at": "2025-01-14T07:46:18.906Z",
"permission_ids": [
53,
55,
58,
61,
63
],
"knowledge_base_permission_ids": [],
"group_ids": {}
},
"1": {
"id": 1,
"name": "Admin",
"preferences": {},
"default_at_signup": false,
"active": true,
"note": "To configure your system.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.630Z",
"updated_at": "2025-01-14T07:46:19.646Z",
"permission_ids": [
1,
57,
59,
63
],
"knowledge_base_permission_ids": [],
"group_ids": {}
},
"3": {
"id": 3,
"name": "Customer",
"preferences": {},
"default_at_signup": true,
"active": true,
"note": "People who create Tickets ask for help.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.659Z",
"updated_at": "2025-01-14T07:46:20.165Z",
"permission_ids": [
62,
64,
65,
66,
68,
69,
72
],
"knowledge_base_permission_ids": [],
"group_ids": {}
}
},
"Organization": {
"2": {
"id": 2,
"name": "Fast Lane Hardware",
"shared": true,
"domain": "",
"domain_assignment": false,
"active": true,
"vip": false,
"note": "IT hardware and custom PC builds",
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-01-14T07:46:17.574Z",
"updated_at": "2025-01-14T07:46:17.574Z",
"member_ids": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14
],
"secondary_member_ids": []
},
"1": {
"id": 1,
"name": "Zammad Foundation",
"shared": true,
"domain": "",
"domain_assignment": false,
"active": true,
"vip": false,
"note": "",
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:08.597Z",
"updated_at": "2025-01-14T07:45:08.699Z",
"member_ids": [
2
],
"secondary_member_ids": []
}
}
},
"total_count": 1
}Параметар са укупним бројем
Коришћење овог параметра додатно приказује број резултата претраге. Може се комбиновати са full и expand.
GET-захтев послат: /api/v1/tickets/search?query=welcome&full=true&with_total_count=true
Details
json
// HTTP-Code 200 OK
{
"record_ids": [
2,
1
],
"assets": {
"Ticket": {
"1": {
"id": 1,
"group_id": 1,
"priority_id": 2,
"state_id": 1,
"organization_id": 1,
"number": "97001",
"title": "Welcome to Zammad!",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-06-27T08:35:35.210Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-06-27T08:35:35.210Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 2,
"created_by_id": 2,
"created_at": "2025-06-27T08:35:35.005Z",
"updated_at": "2025-06-27T08:35:35.306Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
1
],
"ticket_time_accounting_ids": [],
"ai_stored_result_ids": [
1,
4
]
},
"2": {
"id": 2,
"group_id": 1,
"priority_id": 2,
"state_id": 2,
"organization_id": 1,
"number": "97002",
"title": "Welcome again",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-07-02T11:46:41.117Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-07-02T11:46:41.117Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-07-02T11:46:41.040Z",
"updated_at": "2025-07-02T11:46:41.210Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
2
],
"ticket_time_accounting_ids": [],
"ai_stored_result_ids": [
2,
3
]
}
},
"Organization": {
"1": {
"id": 1,
"name": "Zammad Foundation",
"shared": true,
"domain": "",
"domain_assignment": false,
"active": true,
"vip": false,
"note": "",
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-06-27T08:35:34.797Z",
"updated_at": "2025-07-02T11:46:41.105Z",
"member_ids": [
2
],
"secondary_member_ids": []
}
},
"User": {
"1": {
"id": 1,
"organization_id": null,
"login": "-",
"firstname": "-",
"lastname": "",
"email": "",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": false,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {},
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-06-27T08:35:31.793Z",
"updated_at": "2025-06-27T08:35:31.793Z",
"role_ids": [],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {}
},
"2": {
"id": 2,
"organization_id": 1,
"login": "nicole.braun@zammad.org",
"firstname": "Nicole",
"lastname": "Braun",
"email": "nicole.braun@zammad.org",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"tickets_closed": 0,
"tickets_open": 2
},
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-06-27T08:35:34.872Z",
"updated_at": "2025-07-02T11:46:41.840Z",
"role_ids": [
3
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {}
},
"3": {
"id": 3,
"organization_id": null,
"login": "admin@example.com",
"firstname": "Test",
"lastname": "Admin",
"email": "admin@example.com",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": "2025-07-02T08:54:52.403Z",
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
},
"locale": "de-de",
"intro": true,
"keyboard_shortcuts_clues": true,
"overviews_last_used": {
"1": "2025-06-27T09:27:26.333Z",
"5": "2025-06-27T09:27:28.222Z"
},
"theme": "light"
},
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-06-27T09:27:00.302Z",
"updated_at": "2025-07-02T14:20:57.498Z",
"role_ids": [
1,
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"1": [
"full"
]
}
}
}
},
"total_count": 2
}Параметар само укупног броја
Коришћење овог параметра only_total_count приказује само број резултата претраге.
GET-захтев послат: /api/v1/tickets/search?query=welcome&only_total_count=true
Details
json
// HTTP-Code 200 OK
{
"total_count": 1
}Затвори претрагу
Ако требате да претражујете не само у одређеној врсти објекта, то можете урадити коришћењем глобалне претраге без навођења објекта. Одговор може укључивати кориснике, тикете, организације, чланке базе знања, одговоре и разговоре, зависно од вашег система и садржаја. Ова глобална претрага понаша се као претрага у Zammad-овом интерфејсу у левој траци задатка. Доступни параметри су различити од оних за ендпоинт претрагу.
GET-захтев послат: /api/v1/search?query=welcome
Details
json
// HTTP-Code 200 OK
{
"assets": {
"Ticket": {
"1": {
"id": 1,
"group_id": 1,
"priority_id": 2,
"state_id": 1,
"organization_id": 1,
"number": "20001",
"title": "Welcome to Zammad!",
"owner_id": 1,
"customer_id": 2,
"note": null,
"first_response_at": null,
"first_response_escalation_at": null,
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": null,
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": null,
"update_in_min": null,
"update_diff_in_min": null,
"last_close_at": null,
"last_contact_at": "2025-01-14T07:45:08.726Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2025-01-14T07:45:08.726Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": null,
"pending_time": null,
"type": null,
"time_unit": null,
"preferences": {},
"updated_by_id": 2,
"created_by_id": 2,
"created_at": "2025-01-14T07:45:08.681Z",
"updated_at": "2025-01-14T07:45:08.790Z",
"checklist_id": null,
"referencing_checklist_ids": [],
"article_ids": [
1
],
"ticket_time_accounting_ids": []
}
},
"Group": {
"1": {
"id": 1,
"signature_id": 1,
"email_address_id": 1,
"name": "Users",
"name_last": "Users",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": "Standard Group/Pool for Tickets.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:08.274Z",
"updated_at": "2025-01-14T07:46:20.513Z",
"user_ids": [
3
]
},
"2": {
"id": 2,
"signature_id": null,
"email_address_id": null,
"name": "Support",
"name_last": "Support",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:20.548Z",
"updated_at": "2025-01-14T07:46:20.636Z",
"user_ids": [
4,
10,
3
]
},
"3": {
"id": 3,
"signature_id": null,
"email_address_id": null,
"name": "Support::1st Level",
"name_last": "1st Level",
"parent_id": 2,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:20.696Z",
"updated_at": "2025-01-14T07:46:20.895Z",
"user_ids": [
7,
6,
8,
4,
9,
5,
10,
3
]
},
"4": {
"id": 4,
"signature_id": null,
"email_address_id": null,
"name": "Support::2nd Level",
"name_last": "2nd Level",
"parent_id": 2,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:20.946Z",
"updated_at": "2025-01-14T07:46:21.085Z",
"user_ids": [
7,
6,
4,
5,
10,
3
]
},
"5": {
"id": 5,
"signature_id": null,
"email_address_id": null,
"name": "Sales",
"name_last": "Sales",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.149Z",
"updated_at": "2025-01-14T07:46:21.249Z",
"user_ids": [
14,
13,
10,
3
]
},
"6": {
"id": 6,
"signature_id": null,
"email_address_id": null,
"name": "Logistics Department",
"name_last": "Logistics Department",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.307Z",
"updated_at": "2025-01-14T07:46:21.389Z",
"user_ids": [
13,
10,
3
]
},
"7": {
"id": 7,
"signature_id": null,
"email_address_id": null,
"name": "Logistics Department::Shipping",
"name_last": "Shipping",
"parent_id": 6,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.447Z",
"updated_at": "2025-01-14T07:46:21.531Z",
"user_ids": [
13,
10,
3
]
},
"8": {
"id": 8,
"signature_id": null,
"email_address_id": null,
"name": "Logistics Department::Returns Processing",
"name_last": "Returns Processing",
"parent_id": 6,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.570Z",
"updated_at": "2025-01-14T07:46:21.633Z",
"user_ids": [
13,
10,
3
]
},
"9": {
"id": 9,
"signature_id": null,
"email_address_id": null,
"name": "IT Internal",
"name_last": "IT Internal",
"parent_id": null,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.673Z",
"updated_at": "2025-01-14T07:46:21.761Z",
"user_ids": [
11,
10,
3
]
},
"10": {
"id": 10,
"signature_id": null,
"email_address_id": null,
"name": "IT Internal::Infrastructure",
"name_last": "Infrastructure",
"parent_id": 9,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.813Z",
"updated_at": "2025-01-14T07:46:21.881Z",
"user_ids": [
11,
10,
3
]
},
"11": {
"id": 11,
"signature_id": null,
"email_address_id": null,
"name": "IT Internal::IT Support",
"name_last": "IT Support",
"parent_id": 9,
"assignment_timeout": null,
"follow_up_possible": "yes",
"reopen_time_in_days": null,
"follow_up_assignment": true,
"active": true,
"shared_drafts": true,
"note": null,
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:21.932Z",
"updated_at": "2025-01-14T07:46:21.995Z",
"user_ids": [
12,
10,
3
]
}
},
"User": {
"1": {
"id": 1,
"organization_id": null,
"login": "-",
"firstname": "-",
"lastname": "",
"email": "",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": false,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {},
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.542Z",
"updated_at": "2025-01-14T07:45:07.542Z",
"role_ids": [],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {}
},
"3": {
"id": 3,
"organization_id": 2,
"login": "lauren@fastlane.inc",
"firstname": "Lauren",
"lastname": "Brooks",
"email": "lauren@fastlane.inc",
"image": "775c807d577dbd6bd95569ec1872f338",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": "2025-01-14T07:46:54.082Z",
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
},
"locale": "en-us"
},
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:46:17.855Z",
"updated_at": "2025-01-14T07:46:58.108Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"1": [
"full"
],
"2": [
"full"
],
"3": [
"full"
],
"4": [
"full"
],
"5": [
"full"
],
"6": [
"full"
],
"7": [
"full"
],
"8": [
"full"
],
"9": [
"full"
],
"10": [
"full"
],
"11": [
"full"
]
}
},
"4": {
"id": 4,
"organization_id": 2,
"login": "ethan@fastlane.inc",
"firstname": "Ethan",
"lastname": "Kwan",
"email": "ethan@fastlane.inc",
"image": "3c3a37e93647e40c595937e336953de8",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:18.901Z",
"updated_at": "2025-01-14T07:46:26.067Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"2": [
"full"
],
"3": [
"full"
],
"4": [
"full"
]
}
},
"5": {
"id": 5,
"organization_id": 2,
"login": "julian@fastlane.inc",
"firstname": "Julian",
"lastname": "Reyes",
"email": "julian@fastlane.inc",
"image": "5ead44f8048cd52d94198bbb7aa1c0cc",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.051Z",
"updated_at": "2025-01-14T07:46:26.113Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
],
"4": [
"full"
]
}
},
"6": {
"id": 6,
"organization_id": 2,
"login": "thomas@fastlane.inc",
"firstname": "Thomas",
"lastname": "Lee",
"email": "thomas@fastlane.inc",
"image": "32340889dbe9bc093f9304d1f708ca6f",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.161Z",
"updated_at": "2025-01-14T07:46:26.156Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
],
"4": [
"full"
]
}
},
"7": {
"id": 7,
"organization_id": 2,
"login": "liam@fastlane.inc",
"firstname": "Liam",
"lastname": "Chen",
"email": "liam@fastlane.inc",
"image": "548f5e2072493a829319359384ba3c49",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.288Z",
"updated_at": "2025-01-14T07:46:26.202Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
],
"4": [
"full"
]
}
},
"8": {
"id": 8,
"organization_id": 2,
"login": "alex@fastlane.inc",
"firstname": "Alexander",
"lastname": "Jensen",
"email": "alex@fastlane.inc",
"image": "8e837e5b08ef314f920f13e6b8e44b3f",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.401Z",
"updated_at": "2025-01-14T07:46:26.245Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
]
}
},
"9": {
"id": 9,
"organization_id": 2,
"login": "emily@fastlane.inc",
"firstname": "Emily",
"lastname": "Wilson",
"email": "emily@fastlane.inc",
"image": "f527a90b9dc0c731005f5756bbd5a432",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.514Z",
"updated_at": "2025-01-14T07:46:26.301Z",
"role_ids": [
2
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"3": [
"full"
]
}
},
"10": {
"id": 10,
"organization_id": 2,
"login": "hannah@fastlane.inc",
"firstname": "Hannah",
"lastname": "Taylor",
"email": "hannah@fastlane.inc",
"image": "7b590e70915e7c33fff328f7e8fa0bb9",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.638Z",
"updated_at": "2025-01-14T07:46:26.406Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"2": [
"full"
],
"3": [
"full"
],
"4": [
"full"
],
"5": [
"full"
],
"6": [
"full"
],
"7": [
"full"
],
"8": [
"full"
],
"9": [
"full"
],
"10": [
"full"
],
"11": [
"full"
]
}
},
"11": {
"id": 11,
"organization_id": 2,
"login": "jackson@fastlane.inc",
"firstname": "Jackson",
"lastname": "Lee",
"email": "jackson@fastlane.inc",
"image": "f60bee881cf1856275d4f770ab9f6063",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.779Z",
"updated_at": "2025-01-14T07:46:26.451Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"9": [
"full"
],
"10": [
"full"
]
}
},
"12": {
"id": 12,
"organization_id": 2,
"login": "emily.t@fastlane.inc",
"firstname": "Emily",
"lastname": "Tran",
"email": "emily.t@fastlane.inc",
"image": "c9a8e23fe76079f0d249c87bcd145f95",
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": null,
"street": "",
"zip": "",
"city": "",
"country": "",
"address": null,
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"intro": true,
"keyboard_shortcuts_clues": true,
"notification_config": {
"matrix": {
"create": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"update": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": true,
"subscribed": true,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"reminder_reached": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
},
"escalation": {
"criteria": {
"owned_by_me": true,
"owned_by_nobody": false,
"subscribed": false,
"no": false
},
"channel": {
"email": true,
"online": true
}
}
}
}
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2025-01-14T07:46:19.893Z",
"updated_at": "2025-01-14T07:46:26.493Z",
"role_ids": [
2,
1
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {
"11": [
"full"
]
}
},
"2": {
"id": 2,
"organization_id": 1,
"login": "nicole.braun@zammad.org",
"firstname": "Nicole",
"lastname": "Braun",
"email": "nicole.braun@zammad.org",
"image": null,
"image_source": null,
"web": "",
"phone": "",
"fax": "",
"mobile": "",
"department": "",
"street": "",
"zip": "",
"city": "",
"country": "",
"address": "",
"vip": false,
"verified": false,
"active": true,
"note": "",
"last_login": null,
"source": null,
"login_failed": 0,
"out_of_office": false,
"out_of_office_start_at": null,
"out_of_office_end_at": null,
"out_of_office_replacement_id": null,
"preferences": {
"tickets_closed": 0,
"tickets_open": 1
},
"updated_by_id": 2,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:08.641Z",
"updated_at": "2025-01-14T07:45:20.373Z",
"role_ids": [
3
],
"two_factor_preference_ids": [],
"organization_ids": [],
"authorization_ids": [],
"overview_sorting_ids": [],
"group_ids": {}
}
},
"Role": {
"2": {
"id": 2,
"name": "Agent",
"preferences": {},
"default_at_signup": false,
"active": true,
"note": "To work on Tickets.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.649Z",
"updated_at": "2025-01-14T07:46:18.906Z",
"permission_ids": [
53,
55,
58,
61,
63
],
"knowledge_base_permission_ids": [],
"group_ids": {}
},
"1": {
"id": 1,
"name": "Admin",
"preferences": {},
"default_at_signup": false,
"active": true,
"note": "To configure your system.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.630Z",
"updated_at": "2025-01-14T07:46:19.646Z",
"permission_ids": [
1,
57,
59,
63
],
"knowledge_base_permission_ids": [],
"group_ids": {}
},
"3": {
"id": 3,
"name": "Customer",
"preferences": {},
"default_at_signup": true,
"active": true,
"note": "People who create Tickets ask for help.",
"updated_by_id": 3,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:07.659Z",
"updated_at": "2025-01-14T07:46:20.165Z",
"permission_ids": [
62,
64,
65,
66,
68,
69,
72
],
"knowledge_base_permission_ids": [],
"group_ids": {}
}
},
"Organization": {
"2": {
"id": 2,
"name": "Fast Lane Hardware",
"shared": true,
"domain": "",
"domain_assignment": false,
"active": true,
"vip": false,
"note": "IT hardware and custom PC builds",
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-01-14T07:46:17.574Z",
"updated_at": "2025-01-14T07:46:17.574Z",
"member_ids": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14
],
"secondary_member_ids": []
},
"1": {
"id": 1,
"name": "Zammad Foundation",
"shared": true,
"domain": "",
"domain_assignment": false,
"active": true,
"vip": false,
"note": "",
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2025-01-14T07:45:08.597Z",
"updated_at": "2025-01-14T07:45:08.699Z",
"member_ids": [
2
],
"secondary_member_ids": []
}
}
},
"result": [
{
"type": "Ticket",
"id": 1
}
]
}Претрага на основу услова
Можете чак користити услове као за окидаче и распоређиваче да претражујете преко API-ја. Ако не желите да градите такве услове ручно, испод можете наћи савет како брзо изградити структуру услова путем интерфејса и преузети је за ваш API захтев.
Дакле, како да направим овакав захтев заснован на условима?
- У Zammad-у, идите у администраторски интерфејс и креирајте услов, нпр. креирањем новог прегледа или окидача. Може бити неактиван тако да неће имати никакве нежељене акције или промене.
- Идите у
Rails konzolu </admin/console>, било коришћењемrails c/zammad run rails cили додавањем префиксаrails r/zammad run rails rиспред команди испод, зависно од вашег подешавања. - Пронађите креирани услов, прилагодите следеће примере својим потребама:
ruby
puts Overview.find_by(name: 'My test overview').attributes.slice('condition').to_jsonruby
puts Trigger.find_by(name: 'My new test trigger').attributes.slice('condition').to_jsonОво води до излаза као што је следећи:
Details
json
{"condition":{"ticket.state_id":{"operator":"is","value":["2"]},"ticket.title":{"operator":"contains","value":"Test"}}}Користите ово као payload у вашем POST-захтеву за ендпоинт претрагу. Одговор укључује исте објекте као и окидач или преглед који сте креирали.
Сортирање резултата претраге
Zammad вам омогућава да сортирате резултате претраге по пољу ако је потребно.
sort_by
Додајте ?sort_by={row name} у упит да бисте сортирали по одређеном реду који се појављује у резултату претраге.
order_by
Додајте ?order_by={direction} у упит да бисте пребацили између узлазног и силазног редоследа.
Смјерови су: asc и desc.
TIP
Обично ћете жељети да комбинујете оба параметра у претрази - нпр.: ?query={search string}&sort_by={row name}&order_by={direction}
Акције у име других корисника
Услов: корисник који се користи за извршавање упита у име другог мора имати дозволу admin.user.
Извршавање API упита у име других корисника вам омогућава нпр. креирање тикета од стране другог корисника.
Да бисте то урадили, додајте ново HTTP заглавље под називом From свом захтеву. Вредност овог заглавља може бити једна од следећих:
- ID корисника
- корисничко име
- емаил корисника
From је доступно за све крајње тачке.
Кодирање
API очекује UTF-8 кодирање. Имајте на уму да ћете посебно приликом коришћења URL адреса са опцијама (нпр. ?query=this) можда морати да кодирате ваш URL на одговарајући начин.
Ако желите сазнати више о URL кодирању, чланак на Wikipediji вам може помоћи
Reпрезентацијски Стање Трансфер - Апликационо Програмско Интерфејс) ↩︎