Append values to multi-select field via Update Ticket API
Hi,
I have a multi-select dropdown with multiple values (ex. value1, value2, value3).
I would like to update this field via the update ticket API call, that will add one of the values. For example, one call from one source will append value1, the second call will append value2, etc.
The issue I am seeing is that whenever the Update Ticket API is run it just replaces the existing value in the multi-select dropdown, as opposed to appending the value.
Looking at the documentation on this topic, I don't believe this is possible. Can anyone confirm if there is an option to append a value to a multiselect dropdown via the API?
-
Hey Stephen, you could use either the Add Tags or Update Many Tickets endpoint and pass the tags of that multi-select field in the additional tags property.
Have a read on Protecting against ticket update collisions and Adding tags to tickets without overwriting existing tags.
-
Hi Rafael Santos,
Thanks for the response.
I had noticed that the Update Many Tickets API was available - this might be a silly question, but are you aware if there are any problems with using this API when you are only updating a single ticket?
I will look into the Add Tags endpoint to see if that will work - I was hoping to do this in as few API calls as possible and part of the Update Ticket call I am making also includes an internal comment.
-
Stephen, although not a problem, when using the tickets/update_many endpoint one has to keep in mind that it enforces safe_update: True, and that there's a rate limit for queued job statuses to Update Many Tickets or Update Many Users. Rate Limits > Job Limit
It's recommended to aggregate your requests in Bulk / Batch whenever possible, and to have one's app/service monitoring the job statuses queue as to prevent running into limits. Job Statuses
As for the safe_update part, one should have a handler for when requests return a 409 status code. Checking if the ticket was not updated
サインインしてコメントを残してください。
3 コメント