EN
Ta zawartość nie jest dostępna w wymaganym języku. Wersja w języku angielskim znajduje się tutaj.
Ten temat nie został jeszcze oceniony - Oceń ten temat

JobTemplates

A JobTemplate provides reusable settings for Jobs that need to be run repeatedly.

ImportantImportant
When accessing entities in Windows Azure Media Services, you must set specific header fields and values in your HTTP requests. For more information, see Setup for Media Services REST API Development.

ImportantImportant
After successfully connecting to https://media.windows.net, you will receive a 301 redirect specifying another Media Services URI. You must make subsequent calls to the new URI.

JobTemplate Entity Properties

 

Property Type Description

Id

Edm.String

Unique identifier set by Media Services.

Name

Edm.String

Optional. Friendly name for the job template.

Created

Edm.DateTime

This value is set by Media Services at creation time. It represents the number of milliseconds since midnight Jan 1, 1970.

LastModified

Edm.DateTime

This value is updated by Media Services after any property changes are made. It represents the number of milliseconds since midnight Jan 1, 1970.

JobTemplateBody

Edm.String

This section defines what TaskTemplates and the number of input and output assets to use.

NumberofInputAssets

Edm.Int32

The number of input assets that can be used with this JobTemplate.

TemplateType

Edm.Int32

The type of JobTemplate that can be created. Valid values are:

  • SystemLevel = 0

  • AccountLevel = 1

noteNote
SystemLevel JobTemplate types are reserved for Media Services. You must set this value to AccountLevel (that is "1").

TaskTemplates

TaskTemplates entity set

Navigation property that references all associated TaskTemplate entities.

Create a JobTemplate

JobTemplates can be created with a POST HTTP request.

 

Method Request URI HTTP Version

POST

https://media.windows.net/API/JobTemplates

HTTP/1.1

Sample Request

POST https://media.windows.net/API/JobTemplates HTTP/1.1
Content-Type: application/json;odata=verbose
Accept: application/json;odata=verbose
DataServiceVersion: 3.0
MaxDataServiceVersion: 3.0
x-ms-version: 2.1
Authorization: Bearer http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=youraccountname&urn%3aSubscriptionId=2f84471d-b1ae-4e75-aa09-010f0fc0cf5b&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&Audience=urn%3aWindowsAzureMediaServices&ExpiresOn=1337212980&Issuer=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&HMACSHA256=kK7PbPM3lTAEJYIx5OTWeaSY7zvia358UjPiuvSFHz0%3d
Host: media.windows.net
Content-Length: 608
Expect: 100-continue

{"Name" : "NewJobTemplate14ad96d1-2d14-4618-9014-08db7d227062", "TemplateType" : "1",  "JobTemplateBody" : "<?xml version=\"1.0\" encoding=\"utf-8\"?><jobTemplate><taskBody taskTemplateId=\"nb:ttid:UUID:071370A3-E63E-4E81-A099-AD66BCAC3789\"><inputAsset>JobInputAsset(0)</inputAsset><outputAsset>JobOutputAsset(0)</outputAsset></taskBody></jobTemplate>", "TaskTemplates" : [{"Id" : "nb:ttid:UUID:071370A3-E63E-4E81-A099-AD66BCAC3789", "Configuration" : "H.264 iPad", "MediaProcessorId" : "nb:mpid:UUID:2f381738-c504-4e4a-a38e-d199e207fcd5", "Name" : "SampleTaskTemplate2", "NumberofInputAssets" : 1, "NumberofOutputAssets" : 1}] }

List JobTemplates

JobTemplates can be retrieved using a GET HTTP request.

 

Method Request URI HTTP Version

GET

https://media.windows.net/API/JobTemplates

HTTP/1.1

 

Method Request URI HTTP Version

GET

https://media.windows.net/API/JobTemplates('nb:jtid:UUID:ed10f137-7a8e-8343-9110-f54603d1136f')

HTTP/1.1

Sample Request

GET https://media.windows.net/API/JobTemplates('nb:jtid:UUID:ed10f137-7a8e-8343-9110-f54603d1136f') HTTP/1.1
Content-Type: application/json;odata=verbose
Accept: application/json;odata=verbose
DataServiceVersion: 3.0
MaxDataServiceVersion: 3.0
x-ms-version: 2.1
Authorization: Bearer http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=youraccountname&urn%3aSubscriptionId=2f84471d-b1ae-4e75-aa09-010f0fc0cf5b&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&Audience=urn%3aWindowsAzureMediaServices&ExpiresOn=1337212980&Issuer=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&HMACSHA256=kK7PbPM3lTAEJYIx5OTWeaSY7zvia358UjPiuvSFHz0%3d
Host: media.windows.net

Delete a JobTemplate

JobTemplates can be deleted using a DELETE HTTP request.

 

Method Request URI HTTP Version

DELETE

https://media.windows.net/API/JobTemplates('jobtemplateid')

HTTP/1.1

Sample Request

DELETE https://media.windows.net/API/JobTemplates('nb:jtid:UUID:1149a161-92c6-be40-8e9c-7bf640c05df6') HTTP/1.1
Content-Type: application/json;odata=verbose
Accept: application/json;odata=verbose
DataServiceVersion: 3.0
MaxDataServiceVersion: 3.0
x-ms-version: 2.1
Authorization: Bearer http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=youraccountname&urn%3aSubscriptionId=2f84471d-b1ae-4e75-aa09-010f0fc0cf5b&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&Audience=urn%3aWindowsAzureMediaServices&ExpiresOn=1337178759&Issuer=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&HMACSHA256=cKlWvRDsu0bQwDkc1A4sMM5OQOGBEk8OWcuaj9zDkp0%3d
Host: media.windows.net
Content-Length: 0

See Also


Build Date:

2013-05-23
Oceniasz te materiały jako pomocne?
(Pozostało znaków: 1500)

Zawartość społeczności

Dodaj
© 2013 Microsoft. Wszelkie prawa zastrzeżone.
facebook page visit twitter rss feed newsletter