eric_hybner
New Member

REST API PUT conversations only updates the first conversation

When I use the Canvas Live API, I can do something like this

URL: https://my.instructure.com/api/v1/conversations
Event: Star
Conversation_Ids: 90210,86753

Both of the convesations are starred.

If I do the same thing via Postman or a Python script, only the first of the conversation_ids is updated, and the progress URL indicates it is 100% complete with one conversation updated.

headers = {'Authorization':'Bearer %s' % canvas_token}
url = 'https://%s/api/v1/conversations' % (canvas_domain)
params = {'event': 'star', 'conversation_ids[]': '90210,86753'}
response = requests.put(url,headers=headers,params=params)

It does not matter which ID I list first, or what action (star, unstar, destroy) I specify. I am not at this time attempting to impersonate another user, just working with my own account.

Any idea what I could be missing that would cause this unusual behavior?

Labels (2)
0 Kudos
1 Reply
dgrobani
Community Champion

Purely a guess: in Python, try making the conversation IDs a list of strings instead of one comma-separated string?

0 Kudos