【文章內(nèi)容簡(jiǎn)介】
2fidentity%2fclaims%2fnameidentifier=youraccountnameamp。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。Audience=urn%3aWindowsAzureMediaServicesamp。ExpiresOn=1335956356amp。Issuer=%3a%2f%%2famp。HMACSHA256=1B1ysfYRcpI%2fQY9SSNIBBVBpgc67j4R2yXD7BCxs8D8%3dHost: ContentLength: 183Expect: 100continue{AccessPolicyId: nb:pid:UUID:94763883537a41c0a0974e3f755bbeab, AssetId : nb:cid:UUID:cab358e0deaa4c4f9a9f35687b54b0aa, StartTime : 5/2/2012 1:04:32 AM, Type : 1 }Create Locator Response:HTTP/ 201 CreatedCacheControl: nocacheContentLength: 1148ContentType: application/json。odata=verbose。charset=utf8Location: (39。nb%3Alid%3AUUID%3A8002bf3ca2154602b4a42aac367f709e39。)Server: MicrosoftIIS/xmsrequestid: 6937fd5170ad4d3d8138991863906b43XContentTypeOptions: nosniffDataServiceVersion: 。XAspNetVersion: XPoweredBy: Date: Wed, 02 May 2012 00:59:30 GMT{d:{__metadata:{id:(39。nb%3Alid%3AUUID%3A8002bf3ca2154602b4a42aac367f709e39。),uri:(39。nb%3Alid%3AUUID%3A8002bf3ca2154602b4a42aac367f709e39。),type:},AccessPolicy:{__deferred:{uri:(39。nb%3Alid%3AUUID%3A8002bf3ca2154602b4a42aac367f709e39。)/AccessPolicy}},Asset:{__deferred:{uri:(39。nb%3Alid%3AUUID%3A8002bf3ca2154602b4a42aac367f709e39。)/Asset}},Id:nb:lid:UUID:8002bf3ca2154602b4a42aac367f709e,ExpirationDateTime:\/Date(1335938672000)\/,Type:1,Path:,AccessPolicyId:nb:pid:UUID:94763883537a41c0a0974e3f755bbeab,AssetId:nb:cid:UUID:cab358e0deaa4c4f9a9f35687b54b0aa,StartTime:\/Date(1335920672000)\/}}Path 是上傳的URL。Preform the File Upload:PUT ContentType: application/octetstreamxmsversion: 20110818xmsdate: 20110117xmsblobtype: BlockBlobHost: ContentLength: 4045744Expect: 100continuewsh?1hfN??C?V??,??sd??:?j?dCfT?,?6????8?f?p??o???????6C??q?????KbP???w*????i[Rest of binary data truncated for readability]Response:HTTP/ 201 CreatedTransferEncoding: chunkedContentMD5: 2Lzhghji5MH0CZ+EUidXyA==LastModified: Tue, 08 May 2012 19:37:16 GMTETag: 0x8CEFB691BBEDD64Server: WindowsAzureBlob/ MicrosoftHTTPAPI/xmsrequestid: 4902799b568f49a8893c77fbee74ce18xmsversion: 20110818Date: Tue, 08 May 2012 19:37:15 GMT0Revoking the Upload URL(Optional)刪除上傳定位器以取消對(duì)你Asset得寫權(quán)限。Delete the upload Locator to revoke write access to your Asset’s blobstorage container。DELETE (39。nb%3Alid%3AUUID%3A81e5bd3246ad4d66b7b850008ee4aec539。) HTTP/ContentType: application/json。odata=verboseAccept: application/json。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion: Authorization: Bearer %3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=youraccountnameamp。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。Audience=urn%3aWindowsAzureMediaServicesamp。ExpiresOn=1336547485amp。Issuer=%3a%2f%%2famp。HMACSHA256=ISzXspEIbgWifYYXqiPK1vo3%2bDHnTsX85umNxRjD3kQ%3dHost: ContentLength: 0成功會(huì)返回 HTTP/ 204 No ContentGenerating File MetadataGET 39。nb%3Acid%3AUUID%3Ac80d312d7cb144aabb232c35d10c44bd39。 HTTP/ContentType: application/json。odata=verboseAccept: application/json。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion: Authorization: Bearer %3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=youraccountnameamp。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。Audience=urn%3aWindowsAzureMediaServicesamp。ExpiresOn=1336547485amp。Issuer=%3a%2f%%2famp。HMACSHA256=ISzXspEIbgWifYYXqiPK1vo3%2bDHnTsX85umNxRjD3kQ%3dHost: ContentLength: 0 Ingesting Assets in Bulk with the REST APIRESTAPI向Assets批量插入workflow 1. Create the IngestManifest2. Create the Assets3. Create the IngestManifestAssets4. Optionally Create ContentKeys used for Encryptions5. Create the IngestManifestFiles for each Asset6. Upload the files to Blob Storage7. Monitor Bulk Ingest Progress1. Create the IngestManifest創(chuàng)建插入請(qǐng)求清單The IngestManifest is a container for a set of asset, asset files , and statistic information that can be used to determine the progress of bulk ingesting for the set.POST :// ContentType: application/json。odata=verboseAccept: application/json。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion: Authorization: Bearer %3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=070500D0F35C4A5A9249485BBF4EC70Bamp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。Audience=urn%3aWindowsAzureMediaServicesamp。ExpiresOn=1334275521amp。Issuer=%3a%2f%%2famp。HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3dHost: ContentLength: 36Expect: 100continue{ Name : ExampleManifestREST }2. Create the AssetsAssets: is a container for multiple types or sets of objects in Media Services, including video, audio,images, thumbnail collections, text tracks and closed caption files. 文件夾。HTTP POST 請(qǐng)求創(chuàng)建asset:POST ContentType: application/json。odata=verboseAccept: application/json。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion: Authorization: Bearer %3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=070500D0F35C4A5A9249485BBF4EC70Bamp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。Audience=urn%3aWindowsAzureMediaServicesamp。ExpiresOn=1334275521amp。Issuer=%3a%2f%%2famp。HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3dHost: ContentLength: 55Expect: 100continue{ Name : ExampleManifestREST_Asset, Options : 1 }3. Create the IngestManifestAssetsPOST ContentType: application/json。odata=verboseAccept: application/json。odata=verboseDataServiceVersion: M