how can i find out if a user is AccountAdmin of the ROOT account via REST API? Meaning the master account of all the sub accounts?
Easily enough, all you need is the Admins API endpoint. This will list all admins for whichever account you need to query (in this case just add the root account ID).
You can also pass the user_id[] parameter to the query string if you want to see if the user in question exists as an admin under that account.
https<SPAN class="punctuation token">:</SPAN><SPAN class="operator token">/</SPAN><SPAN class="operator token">/</SPAN>school<SPAN class="punctuation token">.</SPAN>instructure<SPAN class="punctuation token">.</SPAN>com<SPAN class="operator token">/</SPAN>api<SPAN class="operator token">/</SPAN>v1<SPAN class="operator token">/</SPAN>accounts<SPAN class="operator token">/</SPAN>self<SPAN class="operator token">/</SPAN>admins<SPAN class="operator token">?</SPAN>per_page<SPAN class="operator token">=</SPAN><SPAN class="number token">100</SPAN> <BR /><BR />Edit<SPAN class="punctuation token">:</SPAN> A PowerShell example to <SPAN class="keyword token">get</SPAN> AccountAdmins ONLY<SPAN class="punctuation token">:</SPAN><BR />$res <SPAN class="operator token">=</SPAN> invoke<SPAN class="operator token">-</SPAN>restmethod <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://school.instructure.com/api/v1/accounts/self/admins?per_page=100" rel="nofollow noopener noreferrer">https://school.instructure.com/api/v1/accounts/self/admins?per_page=100</A><SPAN>"</SPAN></SPAN> <SPAN class="operator token">-</SPAN>method <SPAN class="keyword token">get</SPAN> <SPAN class="operator token">-</SPAN>headers @<SPAN class="punctuation token">{</SPAN><SPAN class="string token">"Authorization"</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Bearer $auth"</SPAN><SPAN class="punctuation token">}</SPAN><BR /><SPAN class="keyword token">foreach</SPAN> <SPAN class="punctuation token">(</SPAN>$r <SPAN class="keyword token">in</SPAN> $res<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN><BR /> <SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>$r<SPAN class="punctuation token">.</SPAN>role <SPAN class="operator token">-</SPAN>like <SPAN class="string token">"AccountAdmin"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN><BR /> $r<BR /> <SPAN class="punctuation token">}</SPAN><BR /><SPAN class="punctuation token">}</SPAN><BR /><BR />
Hello, I was thinking of this a while ago and have been trying to message Canvas support about this but they suggested here but not which category. I apologize if this is the wrong spot. When messaging students right now we need to message one by one. I would like to know if there is a way we can change that to streamline…
I'm building a tool for my institution that imports grades from another LTI tool into Canvas so instructors can automate late assignment policies not otherwise supported by Canvas. I'm trying to use the LTIv1.3 ID which is readily available on the LTI-side as a link to the student record on Canvas, but I can't find the ID…
How can one track Canvas Media use without having the reports available from Canvas Studio? Checking API endpoints and the Data 2 schema, there do not seem to be dedicated Canvas Media endpoints. Am I missing some? A method I've considered is using the body field of the wiki_pages table, as this contains the html code of…
Hello, I'm trying to utilize an API call to pull completed certificates and was hoping to download and store the certs as a backup. I can successfully run the API call but it will not allow me to view the certificate unless I access the URL while signed into an account where it's "my" cert. Is there a permissions setting…
UI for weekly progression idea that rest in the Schedule tab of the **K-12 UI** of Canvas it's incomplete and I really would not take it and push it into instance but I am going to post it here because in the past people like @James && @robotcars || @Steve_25 have had terrific input in the past... maybe w/their eyes and…