Changing Session's rights (SOAP API).
I need to include a Panopto video into an another web site.
Using the API GetFoldersList + GetSessionsList (https://support.panopto.com/resource/APIDocumentation/Help/html/84794f4d-3175-3f40-0965-3fa543adc606.htm) I can easily get the list of my sessions stored on my Panopto server.
I can set the filter of the request, and finally get the GUID of the searched session.
How can I change the rights of this session in order to allow the persons who have the link to see it?
I mean, when the session is created it has visible right = "Limitated" I need to change to "Public - who has the link"
Thanks
Roberto
Best Answers
-
Kevin Baum Panopto Employee
Hi Roberto,
We do have an endpoint to change this behavior in our SOAP API. You can use the IAccessManagement.GrantPublicGroupAccessToSession SOAP API endpoint in order to set a specific session to be publicly available with the link. This requires an administrator or a creator on the session to call the endpoint. When you call the endpoint, you can specify the role as ViewerWithLink to set the session's access to be "Public (unlisted) Anyone who has the link".
I hope that this helps you. Please let me know if you have any questions.
Thanks,
Kevin
0 -
Kevin Baum Panopto Employee
Hi Roberto,
That comment in the documentation relates to the version of Panopto, not the API version. Based on the sample URL you've sent, your Panopto site is based in our cloud, and so you should be on the latest version of Panopto.
You should be able to access that endpoint using your original URL (https://<myserver>.cloud.panopto.eu/Panopto/PublicAPI/4.2/AccessManagement.svc).
Please try accessing the endpoint with that URL, and let me know if you have any difficulties with it.
Thanks,
Kevin
1 -
Roberto Sironi Tyro
Hello Kevin,
Many tanks, I found all and it works well !!!
Case closed 😉
Bye
Roberto
0 -
Jonathan Champ Whiz Kid
Oh, sorry, I just re-read your comment. The "public group" cannot have any access other than Viewer or ViewerWithLink. To grant viewer access to specific users on a session, you would use GrantUsersViewerAccessToSession. To grant other levels of access, it must be done at the Folder level using GrantUsersAccessToFolder.
1 -
Jonathan Champ Whiz Kid
Answer 2:
The GetSessionAccessDetails return value is a SessionAccessDetails object. The SessionAccessDetails.FolderAccess property is a FolderAccessDetails class. The properties like UsersWithCreatorAccess can help determine which users and which groups have which access roles to the folder.
However, it might be easier to use GetUserAccessDetails if you want to focus on a specific user. It returns a UserAccessDetails object. If you are accessing the API as the user you want to check, you can use GetSelfUserAccessDetails instead.
1 -
Jonathan Champ Whiz Kid
IsPublic might be sufficient. I haven't tested checking for a "public" group, does a public group show up?
1
Answers
Hi Kevin,
Many thanks for your quikly answer, it is exactly what I was searching.
But now I have another problem, I can't find it into the svc that I'm using (I guess IAccessManagement ??) ,
I use https://<myserver>.cloud.panopto.eu/Panopto/PublicAPI/4.2/AccessManagement.svc but the docs says that this endpoint is "Only supported in Panopto versions 5.2 and later"
How can I check wich API versions are available on my Panopto server?
I tried to use https://<myserver>.cloud.panopto.eu/Panopto/PublicAPI/5.2/AccessManagement.svc but It wasn't found.
How can I install the last version of API?
Thanks,
Roberto
Hi Kevin,
Sorry again,
Question1)
this is how I change the session's rights
AccessManagement accessMgr = new AccessManagementClient("BasicHttpBinding_IAccessManagement");
SessionAccessDetails adPre= accessMgr.GetSessionAccessDetails(accessAuthInfo, sessionId);
accessMgr.GrantPublicGroupAccessToSession(accessAuthInfo, sessionId, ar);
As I wrote it works well , but it works only if ar = AccessRole.ViewerWithLink (2) or ar = AccessRole.Viewer (1)
It doesn't work if I pass ar=AccessRole.Creator or ar=AccessRole.Publisher and I get "System.ServiceModel.FaultException: 'Invalid AccessRole specified.'"
Question 2) How get the current session's AccessRole ?
I use GetSessionAccessDetails I get a big data structure , but I don't understand where the AccessRole is
Thanks in advance
br
Roberto
Maybe it's just the string "Creator" or "Publisher"?
Where?
Thanks Jonathan
I tried RevokeAllImplicitGroupAccessToSession for remove the possibility to see the session to any person who has the link and seems that it works.
for the second question maybe I can check the flag IsPublic =true and if GroupsWithDirectViewerAccess = {System.Guid[1]} is present nd has at least 1 record ?
Many thanks
R.