Úvod
Zammad poskytuje výkonné REST API[1], které umožňuje všechny operace dostupné také přes uživatelské rozhraní.
Tato stránka vám poskytne první představu o tom, co obecně platí pro všechny koncové body, a jak se tomu přizpůsobit.
API klienti
K dispozici jsou API klienti. Upozorňujeme, že tito klienti nemusí poskytovat přístup ke všem zde uvedeným koncovým bodům.
- Klient pro Ruby (oficiální)
- Klient pro PHP (oficiální)
- Klient pro Python (třetí strana)
- Klient pro .NET (třetí strana)
- API klient pro Android (třetí strana)
- Klient pro Go (třetí strana; pouze API klient, nikoli aplikace "připravená k použití")
Autentizace
Zammad podporuje pro své API tři různé metody ověřování.
Základní ověřování HTTP (uživatelské jméno/heslo)
Uživatelské jméno / heslo je nutné předat v HTTP hlavičce volání HTTP. Tuto metodu ověřování lze vypnout a ve vašem systému nemusí být k dispozici.
curl -u {username}:{password} https://{fqdn}/{endpoint}WARNING
Důrazně nedoporučujeme používat základní ověřování. Kdykoli je to možné, používejte přístupové tokeny!
Ověřování tokenem HTTP (přístupový token)
Přístupový token je nutné předat v HTTP hlavičce volání HTTP. Každý uživatel si může v osobním nastavení vytvořit několik přístupových tokenů. Tuto metodu ověřování lze vypnout a ve vašem systému nemusí být k dispozici.
curl -H "Authorization: Token token={your_token}" https://{fqdn}/{endpoint}OAuth2 (přístup přes token)
Token je nutné předat v HTTP hlavičce vašich volání. To umožňuje aplikacím třetích stran ověřovat se vůči Zammadu.
curl -H "Authorization: Bearer {your_token}" https://{fqdn}/{endpoint}Koncové body a ukázková data
Pro jednoduchost na dalších stránkách neuvádíme konkrétní příkazy, ale jen možnou metodu volání (např. GET) a koncový bod, který se má použít (např. /api/v1/users). Pokud Zammad v URL koncového bodu očekává nějaké údaje, uvádíme je ve složených závorkách takto: /api/v1/users/{user id}
Formát odpovědi je kompletní odpověď JSON z výchozí instance Zammadu. Mějte na paměti, že pokud jste přidali objekty nebo jiné údaje, můžete vidět více polí nebo obecných informací.
Typ obsahu
Při načítání dat vrací Zammad obsah ve formátu JSON. Pokud data odesíláte, nezapomeňte bez ohledu na typ požadavku uvést také typ obsahu application/json.
Obsah odpovědí (expand)
Zammad vždy vrací informace včetně odkazů na všechny vazby. Pokud potřebujete více informací (protože samotná ID nemusí stačit), můžete volání koncových bodů rozšířit o ?expand=true.
Tento přepínač poskytne ještě více informací – kromě ID minimálně také pojmenované vazby. Níže najdete dva příklady, jeden pro tiket a jeden pro uživatele:
Obsah pro uživatele:
Details
// 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"
}Obsah pro tiket:
Details
// 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
Upozorňujeme, že Core Workflow může omezit přístup k atributům nebo hodnotám.
Stránkování
Protože Zammad z výkonnostních důvodů omezuje počet vrácených objektů, budete možná na některých místech muset použít stránkování.
INFO
Počet vrácených objektů: Zammad má pevné limity pro maximální počet vrácených objektů. Tyto limity nelze zvýšit.
Celkový počet objektů k vrácení: Zammad neposkytuje celkový počet objektů dostupných pro váš dotaz, pokud o něj výslovně nepožádáte. Chcete-li zahrnout počet výsledků hledání, použijte parametr with_total_count nebo only_total_count.
Pro stránkování potřebujete dva parametry GET: per_page a page. Jejich kombinací získáte 5 výsledků z první stránky výsledků: ?page=1&per_page=5 – zvýšením čísla stránky získáte další výsledky.
Hledání přes API
Hledání v koncových bodech
Některé koncové body podporují vyhledávací dotaz. Jsou to:
Vyhledávací dotaz podporují i následující koncové body, v této dokumentaci však nejsou výslovně popsány:
- Relace chatu
- Znalostní báze
- Makra
- Přehled
- Šablony
- Textové moduly
Příklad hledání
Odeslaný požadavek GET: /api/v1/tickets/search?query=welcome
Details
// 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": []
}
]Parametr expand
Pokud chcete získat další související informace, můžete použít parametr expand. Ten převede ID a vypíše navíc i hodnoty/názvy.
Odeslaný požadavek GET: /api/v1/tickets/search?query=welcome&expand=true
Details
// 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"
}
]Parametr full
Odpověď můžete ještě rozšířit pomocí parametru full. Počítejte s tím, že tato odpověď může být obrovská. Vypisuje všechna data (assets) včetně souvisejících atributů a také celkový počet výsledků hledání total_count.
Odeslaný požadavek GET: /api/v1/tickets/search?query=welcome&full=true
Details
// 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
}Parametr s celkovým počtem
Tento parametr navíc vypíše počet výsledků hledání. Lze ho kombinovat s full a expand.
Odeslaný požadavek GET: /api/v1/tickets/search?query=welcome&full=true&with_total_count=true
Details
// 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
}Parametr pouze s celkovým počtem
Parametr only_total_count vypíše pouze počet výsledků hledání.
Odeslaný požadavek GET: /api/v1/tickets/search?query=welcome&only_total_count=true
Details
// HTTP-Code 200 OK
{
"total_count": 1
}Globální hledání
Pokud potřebujete hledat nejen v konkrétním typu objektu, můžete použít globální hledání bez určení objektu. Odpověď může v závislosti na vašem systému a obsahu zahrnovat uživatele, tikety, organizace, články a odpovědi znalostní báze a chaty. Toto globální hledání se chová jako hledání v uživatelském rozhraní Zammadu v levém panelu. Dostupné parametry se liší od parametrů pro hledání v koncových bodech.
Odeslaný požadavek GET: /api/v1/search?query=welcome
Details
// 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
}
]
}Hledání podle podmínek
K hledání přes API můžete použít i podmínky jako u spouštěčů a plánovačů. Pokud takové podmínky nechcete sestavovat ručně, níže najdete tip, jak rychle sestavit strukturu podmínky v uživatelském rozhraní a získat ji pro svůj požadavek API.
Jak tedy takový požadavek s podmínkami sestavit?
- V Zammadu přejděte do administrace a vytvořte podmínku, např. vytvořením nového přehledu nebo spouštěče. Může být neaktivní, aby nedocházelo k nechtěným akcím nebo změnám.
- Otevřete
Rails console </admin/console>, a to buď pomocírails c/zammad run rails c, nebo přidáním předponyrails r/zammad run rails rpřed níže uvedené příkazy, podle vaší instalace. - Vyhledejte vytvořenou podmínku; následující příklady upravte podle svých potřeb:
puts Overview.find_by(name: 'My test overview').attributes.slice('condition').to_jsonputs Trigger.find_by(name: 'My new test trigger').attributes.slice('condition').to_jsonVýsledkem je výstup podobný tomuto:
Details
{"condition":{"ticket.state_id":{"operator":"is","value":["2"]},"ticket.title":{"operator":"contains","value":"Test"}}}Použijte jej jako obsah svého požadavku POST při hledání v koncovém bodu. Odpověď obsahuje stejné objekty jako vytvořený spouštěč nebo přehled.
Řazení výsledků hledání
Zammad umožňuje v případě potřeby seřadit výsledky hledání podle pole.
sort_by
Připojte k dotazu ?sort_by={row name}, chcete-li řadit podle konkrétního sloupce, který se objevuje ve výsledku hledání.
order_by
Připojte k dotazu ?order_by={direction}, chcete-li přepínat mezi vzestupným a sestupným řazením.
Směry jsou: asc a desc.
TIP
Obvykle budete chtít při hledání kombinovat oba parametry – např.: ?query={search string}&sort_by={row name}&order_by={direction}
Akce jménem jiných uživatelů
Předpoklad: uživatel, pod kterým se dotaz jménem jiného uživatele spouští, potřebuje oprávnění admin.user.
Spouštění dotazů API jménem jiných uživatelů vám umožňuje např. vytvářet tikety jako jiný uživatel.
Za tímto účelem přidejte do požadavku novou HTTP hlavičku From. Hodnotou této hlavičky může být jedno z následujících:
- ID uživatele
- přihlašovací jméno uživatele
- e-mail uživatele
From je k dispozici pro všechny koncové body.
Kódování
API očekává kódování UTF-8. Mějte na paměti, že zejména při použití URL s parametry GET (např. ?query=this) může být nutné URL odpovídajícím způsobem zakódovat.
Pokud se chcete o kódování URL dozvědět více, může vám pomoci tento článek na Wikipedii
Representational State Transfer - Application Programming Interface) ↩︎