Hi @Blacki-66 ,
I’m really the wrong person for this. I never coded in python, but I will give a try:
test.py
from pprint import pprint
from zammad_py import ZammadAPI
client = ZammadAPI(url='http://ubuntu-rs:3000/api/v1', username='admin@example.com', password='test')
search = client.ticket.search('number:53001')
pprint(vars(search))
ubuntu-rs@ubuntu-rs:/workspace/git_zammad/Python-ZammadTicketSearch$ pip install zammad_py
ubuntu-rs@ubuntu-rs:/workspace/git_zammad/Python-ZammadTicketSearch$ python3 test.py
{'_function_name': 'search',
'_items': [{'article_count': 1,
'article_ids': [1],
'close_at': None,
'close_diff_in_min': None,
'close_escalation_at': None,
'close_in_min': None,
'create_article_sender': 'Customer',
'create_article_sender_id': 2,
'create_article_type': 'phone',
'create_article_type_id': 5,
'created_at': '2023-08-26T08:58:32.967Z',
'created_by': 'nicole.braun@zammad.org',
'created_by_id': 2,
'customer': 'nicole.braun@zammad.org',
'customer_id': 2,
'escalation_at': None,
'first_response_at': None,
'first_response_diff_in_min': None,
'first_response_escalation_at': None,
'first_response_in_min': None,
'group': 'Users',
'group_id': 1,
'id': 1,
'last_close_at': None,
'last_contact_agent_at': None,
'last_contact_at': '2023-08-31T08:38:38.385Z',
'last_contact_customer_at': '2023-08-31T08:38:38.385Z',
'last_owner_update_at': None,
'note': None,
'number': '53001',
'organization': 'Zammad Foundation',
'organization_id': 1,
'owner': '-',
'owner_id': 1,
'pending_time': None,
'preferences': {},
'preview': 'blub',
'priority': '2 normal',
'priority_id': 2,
'state': 'new',
'state_id': 1,
'ticket_time_accounting': [],
'ticket_time_accounting_ids': [],
'time_unit': None,
'title': 'Welcome to Zammad!',
'type': None,
'update_diff_in_min': None,
'update_escalation_at': None,
'update_in_min': None,
'updated_at': '2023-08-31T09:36:36.619Z',
'updated_by': 'nicole.braun@zammad.org',
'updated_by_id': 2}],
'_page': 1,
'_params': {'filters': {'expand': 'true',
'page': 1,
'per_page': 10,
'query': 'number:53001'},
'search_string': 'number:53001'},
'_resource': <zammad_py.api.Ticket object at 0x7f9cb1710520>}
You can do the same search in the frontend to make sure the the ticket exists which you are searching for.