Targeting Global Announcements via API

Jump to solution
Brianca
Community Member

We are trying to push global announcements into Canvas via API and we are running into a couple of blockers I was hoping someone could help with.

We want to be able to send announcements outside the course context to targeted users for things like safety messaging.

We have roles in our back end system, that don't align with the roles in canvas, so we have a list of users that we want to target who are not in a role in the canvas system.

Initially, I was looking at sending to individual users and just rolling through the users in our back end role and sending one at a time, but it looks like I can only send to canvas roles and not individual users.

Then I started looking at creating a canvas role on the fly and sending to that role.  Hopefully, I could then delete the role in canvas so that its not cluttering the roles in canvas with these additional roles.  I found APIs to create a role, but not to manage membership in that role, so I didn't see a way to add my target users into that role.

Has anyone been able to do something similar via api, or am I missing something in the api documentation that would allow me to do one of the above?

 

Thanks,

brian

0 Likes
1 Solution
chriscas
Community Coach
Community Coach

Hi @Brianca,

I might be able to answer a little bit about the roles...  You can definitely make roles at an account level (whether they are account or course roles), but assigning people tho those roles is something done via course enrollments (for course roles) or the admin tab for an account (I'm sure there is an API for that, I just don't know it offhand).

I would strongly advice against using account roles for this, as even if it was for a short time, you'd technically be making these users account administrators and could end up making features available to them that would be undesirable.  Course level roles seem more appropriate, but you would need to enroll these, likely in some kind of dummy course, then send announcements, then remove the enrollment.  This assumes you're trying to use the "notify" option of global announcements.  Without that option, the notification would just display on the dashboard, and would (as far as I know) disappear as soon as you remove the enrollment.

While Canvas may be able to do what you want, I don't think it's really the intended use for the platform.  You may want to investigate some other communication platforms, or even Impact by Instructure if it's something critical to your school/institution and there would be funding available.  (P.S.,I'm a Canvas admin for a public university, not an Instructure employee, so I'm only mentioning this platform as an option since I've heard about in other places.  Not trying to sell you on anything>)

-Chris

View solution in original post

0 Likes