Identify Custom Fields among the Ticket Fields using an API

7 Comments

  • Bristlecone
    Comment actions Permalink

    In case of Users the API : GET /api/v2/user_fields returns only custom fields. Is there any API for Tickets that returns only custom fields.

    0
  • Greg - Community Manager
    Comment actions Permalink

    That is a good question and I have not been able to find a way to do this, either with a direct API call, side-loading, or even filtering on attributes. I wouldn't want to make any suggestions based on the available system ticket fields, as that could cause issues in your app if there were differences in account types or if we made changes down the line. 

    I'll reach out to the product team and see if this is something that they can put on their radar for future development.

    1
  • Bristlecone
    Comment actions Permalink

    Is it a fair assumption that for standard fields, the value of the type attribute is always the title of the field?

    We noticed this in the response of the API : List Ticket Fields

    Can this be a way to distinguish a standard and custom field as of now?

    0
  • Greg - Community Manager
    Comment actions Permalink

    It looks like this is not the case, as the Ticket Type system field is `type: tickettype`, whereas the title is simply "Type". It does appear to be the case for the other field values (from this list), but I would still be concerned about the reliability of that moving forward.

    1
  • Bristlecone
    Comment actions Permalink

    Hi Greg,

    We found that a custom field can have only following data types at present. So can we rely on this fact that if a field has any of the following data type, then it is a custom field.

    text
    textarea
    textarea
    dropdown
    regexp
    date
    integer
    decimal
    checkbox

    0
  • Bristlecone
    Comment actions Permalink

    Hi Greg,

    Could you validate the statement in our last comment?

    0
  • Greg - Community Manager
    Comment actions Permalink

    This does appear to be the case right now, as far as I can tell. I just want to reiterate that I can not guarantee that this will work down the line.

    Greg Katechis | Developer Support and Enablement Engineer

    0

Please sign in to leave a comment.

Powered by Zendesk