Introdução
O Zammad oferece uma poderosa API REST[1], que permite todas as operações também disponíveis via interface.
Esta página dá uma primeira impressão sobre coisas que geralmente valem para todos os endpoints e como se adaptar.
Clientes de API
Há clientes de API disponíveis. Observe que esses clientes podem não fornecer acesso a todos os endpoints disponíveis listados aqui.
- Cliente Ruby (oficial)
- Cliente PHP (oficial)
- Cliente Python (terceiros)
- Cliente .NET (terceiros)
- Cliente de API Android (terceiros)
- Cliente Go (terceiros; apenas cliente de API, sem app "pronto para uso")
Autenticação
O Zammad suporta três métodos diferentes de autenticação para sua API.
Autenticação HTTP Basic (usuário/senha)
O usuário/senha deve ser fornecido como cabeçalho HTTP na chamada HTTP. Esse método de autenticação pode ser desativado e pode não estar disponível no seu sistema.
curl -u {username}:{password} https://{fqdn}/{endpoint}WARNING
Recomendamos fortemente contra o uso de autenticação básica. Use tokens de acesso sempre que possível!
Autenticação HTTP Token (token de acesso)
O token de acesso deve ser fornecido como cabeçalho HTTP na chamada HTTP. Cada usuário pode criar vários tokens de acesso em suas preferências de usuário. Esse método de autenticação pode ser desativado e pode não estar disponível no seu sistema.
curl -H "Authorization: Token token={your_token}" https://{fqdn}/{endpoint}OAuth2 (acesso por token)
O token deve ser fornecido como cabeçalho HTTP nas suas chamadas. Isso permite que aplicações de terceiros se autentiquem no Zammad.
curl -H "Authorization: Bearer {your_token}" https://{fqdn}/{endpoint}Endpoints e dados de exemplo
Para simplificar, não forneceremos comandos específicos nas próximas páginas, mas em vez disso indicaremos o método de chamada possível (por exemplo, GET) e o endpoint a usar (por exemplo, /api/v1/users). Caso o Zammad espere informações dentro dessas URLs de endpoint, vamos colocá-las entre chaves assim: /api/v1/users/{user id}
O formato de resposta será uma resposta JSON completa de uma instância padrão do Zammad. Tenha em mente que você pode ver mais campos ou informações gerais caso tenha adicionado objetos ou outras informações.
Tipo de conteúdo
O Zammad retorna payloads JSON sempre que você recupera dados. Se você for fornecer dados, independentemente do tipo geral de solicitação, não esqueça de fornecer também o tipo de conteúdo application/json.
Payloads de resposta (expandir)
O Zammad sempre retorna informações incluindo dicas para todas as relações. Se você precisar de mais informações que isso (porque os IDs podem não ser suficientes), você também pode estender suas chamadas de endpoint com ?expand=true.
Essa opção fornecerá ainda mais informações - pelo menos relações nomeadas, além das de ID. Abaixo você encontra dois exemplos, um para ticket e um para usuário:
Payload de usuário:
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"
}Payload de ticket:
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
Observe que Core Workflows podem restringir o acesso a atributos ou valores.
Paginação
Como o Zammad limita o número de objetos retornados por motivos de desempenho, você pode precisar usar paginação em alguns pontos.
INFO
Número de objetos retornados: o Zammad tem limites rígidos para o máximo de objetos retornados. Você não pode aumentar esses limites.
Número total de objetos a retornar: o Zammad não fornece uma contagem total de objetos disponíveis para sua consulta, a menos que você solicite explicitamente. Para incluir a quantidade de resultados de pesquisa, use o parâmetro with_total_count ou only_total_count.
Para usar paginação, você precisará de duas opções get: per_page e page. Combine-as para receber 5 resultados da primeira página de resultados: ?page=1&per_page=5 - aumente a contagem de páginas para obter mais resultados.
Pesquisar via API
Pesquisa de endpoint
Alguns endpoints suportam uma consulta de pesquisa. São eles:
Groups <group>Organizations <organization>Roles <role>Tickets <ticket>Users <user>
Os seguintes endpoints também suportam uma consulta de pesquisa, mas não são explicitamente cobertos nesta documentação:
- Sessões de chat
- Base de conhecimento
- Macros
- Visão geral
- Modelos
- Módulo de texto
Exemplo de pesquisa
Solicitação GET enviada: /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": []
}
]Parâmetro Expand
Se você quiser ter informações relacionadas adicionais, pode usar o parâmetro expand. Usá-lo resolve os IDs e exibe valores/nomes adicionalmente.
Solicitação GET enviada: /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"
}
]Parâmetro Full
Você pode até estender a resposta usando o parâmetro full. Esteja ciente de que essa resposta pode ser enorme. Ela exibe todos os ativos, incluindo atributos relacionados e também um total_count dos resultados da pesquisa.
Solicitação GET enviada: /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
}Parâmetro With Total Count
Usar esse parâmetro exibirá adicionalmente a quantidade de resultados da pesquisa. Pode ser combinado com full e expand.
Solicitação GET enviada: /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
}Parâmetro Only Total Count
Usar esse parâmetro only_total_count exibirá apenas a quantidade de resultados da pesquisa.
Solicitação GET enviada: /api/v1/tickets/search?query=welcome&only_total_count=true
Details
// HTTP-Code 200 OK
{
"total_count": 1
}Pesquisa global
Se você precisar pesquisar não apenas em um tipo de objeto específico, pode fazer isso usando a pesquisa global sem especificar um objeto. A resposta pode incluir usuários, tickets, organizações, artigos e respostas da base de conhecimento e chats, dependendo do seu sistema e conteúdo. Essa pesquisa global se comporta como a pesquisa na interface do Zammad, na barra de tarefas esquerda. Os parâmetros disponíveis são diferentes dos usados na pesquisa de endpoint.
Solicitação GET enviada: /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
}
]
}Pesquisa baseada em condição
Você pode até usar condições, como para gatilhos e agendadores, para pesquisar via API. Se você não quiser construir tais condições manualmente, encontra abaixo uma dica de como construir rapidamente uma estrutura de condição via interface e buscá-la para sua solicitação de API.
Então, como faço para construir uma solicitação baseada em condição?
- No Zammad, vá até a interface de administração e crie uma condição, por exemplo, criando uma nova visão geral ou gatilho. Ela pode ser inativa, para que você não tenha ações ou alterações indesejadas.
- Vá até o
console Rails </admin/console>, seja usandorails c/zammad run rails c, ou adicionando o prefixorails r/zammad run rails rantes dos comandos abaixo, dependendo da sua configuração. - Procure pela condição criada, ajuste os exemplos a seguir conforme necessário:
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_jsonIsso resulta em uma saída como a seguinte:
Details
{"condition":{"ticket.state_id":{"operator":"is","value":["2"]},"ticket.title":{"operator":"contains","value":"Test"}}}Use isso como payload na sua solicitação POST em uma pesquisa de endpoint. A resposta inclui os mesmos objetos que o gatilho ou visão geral que você criou.
Ordenando resultados de pesquisa
O Zammad permite ordenar seus resultados de pesquisa por campo, se necessário.
sort_by
Adicione ?sort_by={row name} à sua consulta para ordenar por uma coluna específica que aparece no resultado da pesquisa.
order_by
Adicione ?order_by={direction} à sua consulta para alternar entre ordem crescente e decrescente.
As direções são: asc e desc.
TIP
Geralmente você vai querer combinar ambos os parâmetros nas suas pesquisas - por exemplo: ?query={search string}&sort_by={row name}&order_by={direction}
Ações em nome de outros usuários
Requisito: o usuário usado para executar a consulta em nome de outro precisa da permissão admin.user.
Executar consultas de API em nome de outros usuários permite, por exemplo, criar tickets em nome de outro usuário.
Para fazer isso, adicione um novo cabeçalho HTTP chamado From à sua solicitação. O valor desse cabeçalho pode ser um dos seguintes:
- ID do usuário
- login do usuário
- email do usuário
From está disponível para todos os endpoints.
Codificação
A API espera codificação UTF-8. Tenha em mente que, especialmente ao usar URLs com opções get (por exemplo, ?query=this), você pode precisar codificar sua URL adequadamente.
Se você quiser saber mais sobre codificação de URL, este artigo da Wikipédia pode ajudar
Representational State Transfer - Application Programming Interface) ↩︎