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.
Get sessions in order
Stefan Bräu
Tyro
in API
Hi!
We sort our sessions within folders using the "Order" feature.
How can i get the sessions via api in the specified order?
i tried:
$params['request'] = array(
'FolderId' => $folderId,
'Pagination' => array(
'MaxNumberResults' => 30
),
'SortIncreasing' => true,
);
but the sessions are always returned in the same order (ignoring the ordering within the folder).
thanks!
stefan
0
Answers
Hi Stefan,
I assume you are talking about GetSessionsList() API. SortIncreasing field is looked at when SortBy field is specified. Can you try that?
Hi!
Yes i am using the GetFoldersList-Call. I cant find in the Docs, what are valid Values for "SortBy". What should i use here to sort by the ordering within the folder?
Thanks,
Stefan
Hello!
I solved it using this data:
$params['request'] = array(
'FolderId' => $folderId,
'Pagination' => array(
'MaxNumberResults' => 25
),
'SortIncreasing' => true,
'SortBy' => 'Order',
);
Best,
Stefan
For completeness, I'm adding the information that was useful to me for this discussion.
The SortBy field for Folders has the possible values: 'Name', 'Sessions', 'Relavance' [typo intentional]
The SortBy field for Sessions has the possible values: 'Name', 'Date', 'Duration', 'State', 'Relevance', 'Order'
References:
https://support.panopto.com/resource/APIDocumentation/Help/html/ec3e70b2-0bb9-4857-a32e-964ee1fc2e5f.htm
https://support.panopto.com/resource/APIDocumentation/Help/html/f7b65f0b-460c-b3de-6656-a3b0c4126244.htm