Clearing notification list

41 views
Skip to first unread message

Kevin Seger

unread,
Jan 29, 2016, 9:39:46 AM1/29/16
to Assembla API Development
Hello!
I am currently working on setting up an integration against the API, and I would like to be able to clear the notification list on a ticket but am not able to do so.
From what I can tell, according to the API reference for updating a ticket (https://api-doc.assembla.com/content/ref/tickets_update.html) and definition for a ticket object (https://api-doc.assembla.com/content/ref/ticket_fields.html) I should be able to clear the list by passing an empty string to the API in the put request.

PUT /v1/spaces/[SPACENAME]/tickets/[TICKETNUMBER] HTTP/1.1
X-Api-Key: [KEY]
X-Api-Secret: [SECRETKEY]
Content-Type: application/json

{"ticket":{"notification_list":""}}

It seems like what I am doing is correct but I am not seeing any change at all in Assembla.

I have also tried changing the notification list to only contain one email addres using the following request


PUT /v1/spaces/[SPACENAME]/tickets/[TICKETNUMBER] HTTP/1.1
X-Api-Key: [KEY]
X-Api-Secret: [SECRETKEY]
Content-Type: application/json

{"ticket":{"notification_list":"add...@example.com"}}

This only adds a new follower to the notification list however. Contradicting the statement made in the API reference regarding the field "notification_list":  "A list of user IDs and emails separated by a comma, be careful when updating this field, any update operation will totally rewrite the field, you have to programmatically get the existing list, append your data to it and update the field with the full list."
Any help would be appreciated.

Stanislav Kolotinskiy

unread,
Feb 9, 2016, 12:16:46 PM2/9/16
to assembla...@googlegroups.com
Hi Kevin,

I tried to follow the same steps and it worked fine for me. I created a ticket, added a follower to it, then made an API request to confirm this. After that, I made  a PUT request with {"ticket": {"notification_list": ""}} body and made a GET request to check it again - there were no followers at all. After that, I made another PUT request with {"ticket": {"notification_list": "some...@example.com"}} and made a GET request to check it - there was one follower - this email. I made all the requests using cURL. Please let me know if that helps.

Regards,
Stanislav
--
You received this message because you are subscribed to the Google Groups "Assembla API Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to assembla-api-d...@googlegroups.com.
To post to this group, send email to assembla...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages