How to retrieve a list of contact types on incidents

ndunn
Kilo Contributor

On the incident endpoint of the REST api, you can set and retrieve the "contact_type" attribute.

What endpoint do you have to go to, to retrieve a list of what the contact types are?

Thanks.

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @ndunn 

that is a tricky topic since contact_type - just like many others - is a selection field. And only reading the values from the sys_choice table is not enough, as OOTB and due to lacking its own values the incident table inherit its values from the task table.

My recommendation is to provide the consumer with the list of allowed values instead of asking other tables for the list of allowed values. This also reduced the number of requests at your instance.

Kind regards
Maik

View solution in original post

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi @ndunn 

that is a tricky topic since contact_type - just like many others - is a selection field. And only reading the values from the sys_choice table is not enough, as OOTB and due to lacking its own values the incident table inherit its values from the task table.

My recommendation is to provide the consumer with the list of allowed values instead of asking other tables for the list of allowed values. This also reduced the number of requests at your instance.

Kind regards
Maik

ndunn
Kilo Contributor

Hi Maik

That's really helpful - can the same be said of Status, Impact and Urgency? The lists there can also not be easily retrieved?

Thanks.

Hi @ndunn 

yes, exactly.

Kind regards
Maik