Server API - Create New Preset

Last Updated: Dec 16, 2014 03:21PM PST
Create New Preset allows you to add, or replace and if desired, publish a new preset to the Squeeze Servervpreset library. If authentication is enabled, a caller must be a member of the SqueezeServerAdmin or SqueezeServerLibrarian roles.
 
Base URI /api/jobs/
Protocol HTTP
HTTP Method POST
Response Formats XML, JSON
Help URL /api/presets/help/operations/CreateNewPreset
Authentication SqueezeServerAdmin or SqueezeServerLibrarian


Common Parameters
Name Required Description
name Yes Name of the new preset. The preset name should be unique to prevent a name clash and to easily identify one preset from another in any UI that uses the preset library.
replace No true or false (default): Indicates that the preset should replace a preset with the same name. If the preset exists of the same name and replace=false, a 409 Conflict will be returned.
publish No true or false (default) indicates that the preset should be made available for use, or “published.” Presets are not published by default to allow librarians the opportunity to test presets before making them available to others.


Request Data Fields
The request is a byte-stream consisting of the XML data for the new preset.

Response Data Fields
Name Data Type Required Description
PresetInfo Element Yes Container for the preset information (XML)
Created DateTime Yes Date the preset was created (GMT)
Description String Yes The description pulled from the preset data, if any
Extension String Yes The default file extension the preset will produce (ie: mov, flv, mp4). Note that a preset may produce a different file type in some cases.
Id Guid Yes Unique ID for the new preset
Modified DateTime Yes The date and time the preset was last modified
Name String Yes The preset name extracted from the preset XML data
Published Boolean Yes Indicates if the preset is published (publicly available) or not published (not publicly available)
Uri String Yes The URL for the preset. Squeeze Server and other clients can request the preset data with this URL
Workflow String Yes The workflow string for the preset. Extracted from the preset data if present


Example cURL call:
Send XML data:
curl -H "Accept: application/xml" -H "x-Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type:
text/plain" -X POST --data "<!DOCTYPE squeeze_audience><Output
DefaultName=\"MXF_DNxHD_1455.spfx\" Description=\"Create New Test\" FavWorkflow=\"\"
Id=\"82629120\" IsLite=\"False\" IsMBR=\"False\" Name=\"Preset_Name_Create_New_Preset\"
OutputFormat=\"MXFOutputFormat\" SubOutputFormat=\"OP-Atom\" UsingCustomFilter=\"True\"
Version=\"6.0\" Workflow=\"Editing\DNxHD\"><CanBeResetToDefaultSet tings Value=\"True\"/><FileName
Value=\"\"/><VideoFileName Value=\"\"/><AudioFileName Value=\"\"/><UsingCustomFileName
Value=\"False\"/><OutputExt Value=\"\"/><OutputAudExt Value=\"\"/><OutputPrefix
Value=\"\"/><OutputSuffix Value=\"\"/><UsePrefix Value=\"True\"/><UseSuffix
Value=\"True\"/><Status Value=\"Ready\"/><EncodeVideo Value=\"True\"/><EncodeAudio
Value=\"True\"/><UsePreFilter Value=\"True\"/><UsePlaybackConfiguration
Value=\"False\"/><UseFilesizeConstraint Value=\"False\"/><FileSizeConstraint
Value=\"0\"/><InOutPointsLocallyAssigned Value=\"False\"/><InOutPointsEnable
Value=\"False\"/><Filter Name=\"Custom\"><FilterSetting Name=\"Crop\"><AspectRatio
Value=\"Unconstrained\"/><FloatRatio Value=\"0.000000000000e+00\"/><Top Value=\"0\"/><Bottom
Value=\"0\"/><Left Value=\"0\"/><Right
Value=\"0\"/></FilterSetting></Filter><Notifications></Notifications><AudioCompressor
codec=\"AVIDLPCM\"><DataRate Value=\"6144000\"/><SampleRate Value=\"48000\"/><SampleSize
Value=\"16\"/><ChannelMode Value=\"ChannelMode7_1\"/><SubOutputFormat
Value=\"None\"/><ExtendedPluginSettings></ExtendedPluginSettings></AudioCompressor><VideoCompress
or codec=\"AVIDVC3 \"><DataRate Value=\"145000000\"/><FrameRate Value=\"29.97\"/><OutputSize
Height=\"1080\" Width=\"1920\"/><LetterBoxOrPillarEnable Value=\"True\"/><BitRateMode
Value=\"BitRateModeOnePassCBR\"/><ExtendedPluginSettings><FieldEncoding
Value=\"Interlaced\"/></ExtendedPluginSettings></VideoCompressor></Output>"
http://localhost/api/presets/any_dummy_string/?replace=true&publish=true –v


NOTE: The preset name in the URL, any_dummy_string from the example, is required to create a new preset, but it is not used. So, it can be any string.

Send a preset file:
curl -H "Accept: application/xml" -H "x-Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type:
text/plain" -X POST -d @"C:\MyPresetFolder\MOV_Wii.spfx"
http://<host>/api/presets/MyPreset/?replace=true&publish=true
squeezesupport@sorensonmedia.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete