Welcome to the Panopto Community

Please note: All new registrants to the Panopto Community Forum must be approved by a forum moderator or admin. As such, if you navigate to a feature that is members-only, you may receive an error page if your registration has not yet been approved. We apologize for any inconvenience and are approving new members as quickly as possible.

How to Preserve Original Owner When Copying a Session via /sessioncopy in REST API?

Hello,
I am using the /sessioncopy endpoint in the REST API to copy a session.
The problem is that when I copy it with administrator privileges, the newly created session’s owner and creator are set to the administrator.

I would like to keep the owner as the original session’s owner.
Is there a way to achieve this?
It seems there is no method to obtain the ownerId from the original session.

Thank you.

Answers

  • Hello,
    In the global settings, I set "Set Session Copy requester as Owner" to False.
    However, when I use the session_copy (ref) API to make a copy, the owner is still set to the administrator.

    Is there a way to keep the original user’s ownership when using the session_copy API?
    Thank you.

  • Vegard WallinVegard Wallin Crackerjack

    Hi.

    I just tried the

    POST/api/v1/sessions/{id}/sessioncopy endpoint, and it preserves both the Owner and Videographer for me. For both reference and full copies. So, that is strange?

  • Thank you for the reply.
    Below is my source code.

    public function copy_session_ref($origin_session_id, $folder_id, $name)
    {
    $url ="/Panopto/api/v1/sessions/$origin_session_id/sessioncopy";
    $payload = ["CopyType"=>"reference", "Name"=>$name."_".date("Y-m-d H:i:s"), "FolderId"=>$folder_id];
    $result = $this->execute_post_request_with_response($url, $payload);
    $returnTxt = json_decode($result->getBody(), true);

    if($result->getStatusCode()==200){
    return [
    "deliveryId" => $returnTxt["NewDeliveryId"],
    "newsessionId" => $returnTxt["NewSessionId"],
    ];
    }
    return false;

    }

    After I perform the copy, it shows under the admin account.
    I think this is because the course-specific folder was created by admin, and when the copy is placed into that folder, the folder’s default permissions are admin.

    was the folder created with the admin account? Or is it a folder that an individual has permissions for?

    I think I need an official response from Panopto.
    When I contact support, they tell me that API-related questions should be posted on the forum, so it’s not easy to get an answer.
    Thank you.

  • Hi Kiwon,

    This should be working if setting "Copy - Video Copy Requester is New Owner" is set to False.
    Please just check the config again, and verify it is saved…

    Let me know if this doesn't work.

    Thanks,

    Adis

Sign In or Register to comment.