AccessPolicies
An AccessPolicy defines the permissions and duration of access to an Asset.
Important |
|---|
| 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. |
Important |
|---|
| 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. |
AccessPolicy Entity Properties
| Property | Type | Description |
|---|---|---|
|
Id |
Edm.String |
Unique identifier set by Media Services. |
|
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. |
|
Name |
Edm.String |
Required. Friendly name for your AccessPolicy. |
|
DurationInMinutes |
Edm.Double |
Required. Duration that the AccessPolicy is valid for. |
|
Permissions |
Edm.Int32 |
Optional. This value specifies the access rights the client has when interacting with the Asset. Valid values are:
The default value is 0. |
Create an AccessPolicy
AccessPolicies can be created with a POST HTTP request.
| Method | Request URI | HTTP Version |
|---|---|---|
|
POST |
https://media.windows.net/API/AccessPolicies |
HTTP/1.1 |
Sample Request
POST https://media.windows.net/API/AccessPolicies 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=070500D0-F35C-4A5A-9249-485BBF4EC70B&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&Audience=urn%3aWindowsAzureMediaServices&ExpiresOn=1334275521&Issuer=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3d
Host: media.windows.net
Content-Length: 67
Expect: 100-continue
{"Name": "NewUploadPolicy", "DurationInMinutes" : "100", "Permissions" : 2 }
List AccessPolicies
AccessPolicies can be retrieved using a GET HTTP request.
| Method | Request URI | HTTP Version |
|---|---|---|
|
GET |
https://media.windows.net/API/AccessPolicies |
HTTP/1.1 |
| Method | Request URI | HTTP Version |
|---|---|---|
|
GET |
https://media.windows.net/API/AccessPolicies('accesspolicyid') |
HTTP/1.1 |
| Method | Request URI | HTTP Version |
|---|---|---|
|
GET |
https://media.windows.net/API/Assets('assetid')/AccessPolicies |
HTTP/1.1 |
Sample Request
GET https://media.windows.net/API/AccessPolicies('nb:pid:UUID:ad05d8fa-06a2-4e2f-8fb4-fac57875135a') 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=070500D0-F35C-4A5A-9249-485BBF4EC70B&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fnimbusvoddev.accesscontrol.windows.net%2f&Audience=urn%3aWindowsAzureMediaServices&ExpiresOn=1334276569&Issuer=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&HMACSHA256=Cax61TKgo%2fLo5k6AWA%2brOLdAbMMd4poqvpVqiRPdTXk%3d
Host: media.windows.net
Delete an AccessPolicy
AccessPolicies can be deleted using a DELETE HTTP request.
| Method | Request URI | HTTP Version |
|---|---|---|
|
DELETE |
https://media.windows.net/API/AccessPolicies('accesspolicyid') |
HTTP/1.1 |
Sample Request
DELETE https://media.windows.net/API/AccessPolicies('nb:pid:UUID:ad05d8fa-06a2-4e2f-8fb4-fac57875135a') 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=1337156939&Issuer=https%3a%2f%2fwamsprodglobal001acs.accesscontrol.windows.net%2f&HMACSHA256=IMU5VFP%2bhekKwnUJR13b%2fBMsrZF1h72pZdMlqZ8Txf8%3d
Host: media.windows.net
Content-Length: 0
See Also
Concepts
ContentKeyAsset
AssetFiles
Jobs
JobTemplates
Locators
MediaProcessors
Task
TaskTemplates
Other Resources
Media Services Considerations
Build Date:
Important