Extracting the Name of Zendesk Custom Fields through APIs in Python



Gepostet 29. Okt. 2022

I'm trying to extract the custom field names created by me (who is also an admin in Zendesk) through API calls in Zendesk with Python but so far have only been successful in extracting the IDs of the custom fields. Is there anyway to extract the name of the custom fields so I know what to populate it with. here is my code ,


credentials = {'token': ' ', 'email':'', 'subdomain': ' '}

create_ticket = zenpy_client.tickets.create(
    Ticket(subject='This field will contain a subject',
           description='This field will contain description',
           requester=User(name='testtest'), assignee_id=5883758502685, priority='normal'
           )
)

ticket_id = create_ticket.__dict__['ticket'].id


custom_field_ticket = zenpy_client.tickets(id=ticket_id)

custom_fields = custom_field_ticket.__dict__['custom_fields'] # this provides a list of IDs as list of dictionaries


Can anyone please provide some insight ?


0

0

0 Kommentare

Melden Sie sich an, um einen Kommentar zu hinterlassen.

Sie finden nicht, wonach Sie suchen?

Neuer Post