Problems with UpdateSessionOwner
Hello, I am trying to change the owner of an session with the SOAP UpdateSessionOwner call, but can't seem to get it right.
This is my call:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:pan="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40">
<soapenv:Header/>
<soapenv:Body>
<tem:UpdateSessionOwner>
<tem:auth>
<pan:Password><password></pan:Password>
<pan:UserKey><admin username></pan:UserKey>
</tem:auth>
<tem:sessionIds>d6484c52-25d2-49ea-92a5-afb900a98022</tem:sessionIds>
<tem:newOwnerUserKey><new owner username></tem:newOwnerUserKey>
</tem:UpdateSessionOwner>
</soapenv:Body>
</soapenv:Envelope>
I am getting: "An error occurred deserializing the message. See server logs for details" in return.
Do you see anything wrong? Is it the format of "sessionIds"? I see in the doc that it can be multiple values but I only want to change one session.
Answers
The Session ID (really Delivery ID) needs to be stored in an array / list of GUIDs. From the docs:
I'd be happy to know if you get it to work. :)
Any suggestion on how to write an array of sessionIds in the XML? What is the syntax?
I don't know XML very well. I'd try enclosing the ID(s) like this:
<value>ID1</value><value>ID2</value> ...
but I really don't know if it's the correct syntax.
Thank you, I figured it out, this one worked:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:pan="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soapenv:Header/>
<soapenv:Body>
<tem:UpdateSessionOwner>
<tem:auth>
<pan:Password><password></pan:Password>
<pan:UserKey><admin username></pan:UserKey>
</tem:auth>
<tem:sessionIds>
<arr:guid>db954290-31ce-4ec5-bdfd-afbf013649c9</arr:guid>
</tem:sessionIds>
<tem:newOwnerUserKey><new owner username></tem:newOwnerUserKey>
</tem:UpdateSessionOwner>
</soapenv:Body>
</soapenv:Envelope>