20 July 2023
over 1 year ago by Encoding.com Product Team #2
New GetMediaList version
Added new version for GetMediaList request with advanced filtering and pagination
Request
<?xml version="1.0"?>
<query>
<userid><<id>></userid>
<userkey><<key>></userkey>
<action>GetMediaList</action>
<version>3</version>
<page>[PageNum]</page>
<per_page>[ItemsPerPage]</per_page>
<date_from>[DateFrom]</date_from>
<date_to>[DateTo]</date_to>
<mediaid>[MediaID]</mediaid>
<taskid>[QueueID]</taskid>
<output>[OutputName]</output>
<format_params>[FormatParams]</format_params>
<sort>[SortingField]</sort>
<order>[asc|desc]</order>
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "GetMediaList",
"version": "3",
"page": "[PageNum]",
"per_page": "[ItemsPerPage]",
"date_from": "[DateFrom]",
"date_to": "[DateTo]",
"mediaid": "[MediaID]",
"taskid": "[QueueID]",
"output": "[OutputName]",
"format_params": "[FormatParams]",
"sort": "[SortingField]",
"order": "[asc|desc]"
}
}
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
page | Page number | Positive integer number | 1 |
per_page | Number of elements per page | Positive integer number between between 5 and 100 inclusive | 10 |
date_from | Minimum media created Date | Valid date | none |
date_to | Maximum media created date | Valid date | none |
mediaid | Media ID | Positive integer number | none |
taskid | Output task ID | Positive integer number | none |
output | Output format name | String | none |
format_params | List of output format parameters | Comma separated list | none |
sort | Sorting field | user – User ID (for parent user) media_id – Media ID source – Source File status – Media Status queue_time – Media Queue Time created – Created Date started – Started Date finished – Finished Date | media_id |
order | Sorting order | asc, desc | asc |
Response
<?xml version="1.0"?>
<response>
<pagination>
<per_page>[ItemsPerPage]</per_page>
<page>[PageNum]</page>
<count>[ItemsCountOnPage]</count>
<total>[TotalItemsCount]</total>
<pages>[PagesCount]</pages>
</pagination>
<media>
<id>[MediaID]</id>
<userid>[UserID]</userid>
<sourcefile>[SourceFile]</sourcefile>
<created>[CreatedDate]</created>
<started>[StartedDate]</started>
<finished>[FinishedDate]</finished>
</media>
<media>
<id>[MediaID]</id>
<userid>[UserID]</userid>
<sourcefile>[SourceFile1]</sourcefile>
<sourcefile>[SourceFile2]</sourcefile>
<!-- multiple source files -->
<sourcefile>[SourceFileN]</sourcefile>
<created>[CreatedDate]</created>
<started>[StartedDate]</started>
<finished>[FinishedDate]</finished>
</media>
</response>
{
"response": {
"pagination": {
"per_page": "[ItemsPerPage]",
"page": "[PageNum]",
"count": "[ItemsCountOnPage]",
"total": "[TotalItemsCount]",
"pages": "[PagesCount]"
},
"media": [
{
"id": "[MediaID]",
"userid": "[UserID]",
"sourcefile": "[SourceFile]",
"created": "[CreatedDate]",
"started": "[StartedDate]",
"finished": "[FinishedDate]"
},
{
"id": "[MediaID]",
"userid": "[UserID]",
"sourcefile": [
"[SourceFile1]",
"[SourceFile2]",
// multiple source files
"[SourceFileN]"
],
"created": "[CreatedDate]",
"started": "[StartedDate]",
"finished": "[FinishedDate]"
}
]
}
}
Parameter | Description |
---|---|
Pagination parameters | |
per_page | Number of elements per page |
page | Page number |
count | Count of items on current page |
total | Total count of items |
pages | Pages count |
Media parameters | |
id | Media ID |
userid | User ID |
sourcefile | Source files location |
created | Media creation date and time |
started | Media start date and time |
finished | Media encoding finish date and time |
Frame rate conversion method
Added option to select frame rate conversion method
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>AddMedia</action>
<source>[SourceFile]</source> <!-- required-->
<format> <!-- required -->
<output>[output]</output> <!-- required -->
<!-- format params -->
<framerate_method>[FrameRateConversionMethod]</framerate_method>
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "AddMedia", // required
"source": "[SourceFile]", // required
"format": { // required
"output": "[output]", // required
// format params
"framerate_method": "[FrameRateConversionMethod]"
}
}
}
Parameter | Description | Allowed Values | Default Value |
---|---|---|---|
framerate_method | Frame rate conversion method | default, filter | default |