Assets - List

List Assets in the Media Services account with optional filtering and ordering

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets?api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets?api-version=2022-08-01&$filter={$filter}&$top={$top}&$orderby={$orderby}

URI Parameters

Name In Required Type Description
accountName
path True

string

The Media Services account name.

resourceGroupName
path True

string

The name of the resource group within the Azure subscription.

subscriptionId
path True

string

The unique identifier for a Microsoft Azure subscription.

api-version
query True

string

The version of the API to be used with the client request.

$filter
query

string

Restricts the set of items returned.

$orderby
query

string

Specifies the key by which the result collection should be ordered.

$top
query

integer

int32

Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n.

Responses

Name Type Description
200 OK

AssetCollection

OK

Other Status Codes

ErrorResponse

Detailed error information.

Examples

List all Assets
List Asset created in a date range
List Asset ordered by date

List all Assets

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets?api-version=2022-08-01

Sample Response

{
  "value": [
    {
      "name": "ClimbingLittleTahoma",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
        "created": "2012-04-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00003",
        "description": "A documentary showing the ascent of Little Tahoma",
        "container": "asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountAdams",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "1b648c1a-2268-461d-a1da-742bde23db40",
        "created": "2013-02-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00002",
        "description": "A documentary showing the ascent of Mount Adams",
        "container": "asset-1b648c1a-2268-461d-a1da-742bde23db40",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountBaker",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "89af1750-e681-4fbe-8c4c-9a5567867a6b",
        "created": "2011-02-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00004",
        "description": "A documentary showing the ascent of Mount Baker",
        "container": "asset-89af1750-e681-4fbe-8c4c-9a5567867a6b",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountRainer",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "258878ef-fe05-4518-988f-052e86dc19f6",
        "created": "2018-08-08T18:29:24.3948982Z",
        "lastModified": "2018-08-08T21:29:24.3948982Z",
        "alternateId": "altClimbingMountRainer",
        "description": "descClimbingMountRainer",
        "container": "testasset0",
        "storageAccountName": "storage0",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountRainier",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "f8eea45c-b814-44c2-9c42-a5174ebdee4c",
        "created": "2012-11-01T00:00:00Z",
        "lastModified": "2012-11-01T00:00:00Z",
        "alternateId": "CLIMB00001",
        "description": "A documentary showing the ascent of Mount Rainier",
        "container": "asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountSaintHelens",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "14d58c40-ec1f-446c-b041-f5cff949bd1d",
        "created": "2013-03-01T00:00:00Z",
        "lastModified": "2013-04-01T00:00:00Z",
        "alternateId": "CLIMB00005",
        "description": "A documentary showing the ascent of Saint Helens",
        "container": "asset-14d58c40-ec1f-446c-b041-f5cff949bd1d",
        "storageEncryptionFormat": "MediaStorageClientEncryption"
      }
    }
  ]
}

List Asset created in a date range

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets?api-version=2022-08-01&$filter=properties/created gt 2012-06-01 and properties/created lt 2013-07-01&$orderby=properties/created

Sample Response

{
  "value": [
    {
      "name": "ClimbingMountRainier",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "f8eea45c-b814-44c2-9c42-a5174ebdee4c",
        "created": "2012-11-01T00:00:00Z",
        "lastModified": "2012-11-01T00:00:00Z",
        "alternateId": "CLIMB00001",
        "description": "A documentary showing the ascent of Mount Rainier",
        "container": "asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountAdams",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "1b648c1a-2268-461d-a1da-742bde23db40",
        "created": "2013-02-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00002",
        "description": "A documentary showing the ascent of Mount Adams",
        "container": "asset-1b648c1a-2268-461d-a1da-742bde23db40",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountSaintHelens",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "14d58c40-ec1f-446c-b041-f5cff949bd1d",
        "created": "2013-03-01T00:00:00Z",
        "lastModified": "2013-04-01T00:00:00Z",
        "alternateId": "CLIMB00005",
        "description": "A documentary showing the ascent of Saint Helens",
        "container": "asset-14d58c40-ec1f-446c-b041-f5cff949bd1d",
        "storageEncryptionFormat": "MediaStorageClientEncryption"
      }
    }
  ]
}

List Asset ordered by date

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaServices/contosomedia/assets?api-version=2022-08-01&$orderby=properties/created

Sample Response

{
  "value": [
    {
      "name": "ClimbingMountBaker",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountBaker",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "89af1750-e681-4fbe-8c4c-9a5567867a6b",
        "created": "2011-02-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00004",
        "description": "A documentary showing the ascent of Mount Baker",
        "container": "asset-89af1750-e681-4fbe-8c4c-9a5567867a6b",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingLittleTahoma",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingLittleTahoma",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
        "created": "2012-04-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00003",
        "description": "A documentary showing the ascent of Little Tahoma",
        "container": "asset-e6c7ee55-d1f5-48bc-9c36-2d2157aadbbe",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountRainier",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainier",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "f8eea45c-b814-44c2-9c42-a5174ebdee4c",
        "created": "2012-11-01T00:00:00Z",
        "lastModified": "2012-11-01T00:00:00Z",
        "alternateId": "CLIMB00001",
        "description": "A documentary showing the ascent of Mount Rainier",
        "container": "asset-f8eea45c-b814-44c2-9c42-a5174ebdee4c",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountAdams",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountAdams",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "1b648c1a-2268-461d-a1da-742bde23db40",
        "created": "2013-02-01T00:00:00Z",
        "lastModified": "2017-11-01T00:00:00Z",
        "alternateId": "CLIMB00002",
        "description": "A documentary showing the ascent of Mount Adams",
        "container": "asset-1b648c1a-2268-461d-a1da-742bde23db40",
        "storageEncryptionFormat": "None"
      }
    },
    {
      "name": "ClimbingMountSaintHelens",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountSaintHelens",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "14d58c40-ec1f-446c-b041-f5cff949bd1d",
        "created": "2013-03-01T00:00:00Z",
        "lastModified": "2013-04-01T00:00:00Z",
        "alternateId": "CLIMB00005",
        "description": "A documentary showing the ascent of Saint Helens",
        "container": "asset-14d58c40-ec1f-446c-b041-f5cff949bd1d",
        "storageEncryptionFormat": "MediaStorageClientEncryption"
      }
    },
    {
      "name": "ClimbingMountRainer",
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contosomedia/assets/ClimbingMountRainer",
      "type": "Microsoft.Media/mediaservices/assets",
      "properties": {
        "assetId": "8cdacfe5-8473-413a-9aec-dd2a478b37c8",
        "created": "2018-08-08T18:29:25.0514734Z",
        "lastModified": "2018-08-08T21:29:25.0514734Z",
        "alternateId": "altClimbingMountRainer",
        "description": "descClimbingMountRainer",
        "container": "testasset0",
        "storageAccountName": "storage0",
        "storageEncryptionFormat": "None"
      }
    }
  ]
}

Definitions

Name Description
Asset

An Asset.

AssetCollection

A collection of Asset items.

AssetStorageEncryptionFormat

The Asset encryption format. One of None or MediaStorageEncryption.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

systemData

Metadata pertaining to creation and last modification of the resource.

Asset

An Asset.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.alternateId

string

The alternate ID of the Asset.

properties.assetId

string

The Asset ID.

properties.container

string

The name of the asset blob container.

properties.created

string

The creation date of the Asset.

properties.description

string

The Asset description.

properties.lastModified

string

The last modified date of the Asset.

properties.storageAccountName

string

The name of the storage account.

properties.storageEncryptionFormat

AssetStorageEncryptionFormat

The Asset encryption format. One of None or MediaStorageEncryption.

systemData

systemData

The system metadata relating to this resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

AssetCollection

A collection of Asset items.

Name Type Description
@odata.nextLink

string

A link to the next page of the collection (when the collection contains too many results to return in one response).

value

Asset[]

A collection of Asset items.

AssetStorageEncryptionFormat

The Asset encryption format. One of None or MediaStorageEncryption.

Name Type Description
MediaStorageClientEncryption

string

The Asset is encrypted with Media Services client-side encryption.

None

string

The Asset does not use client-side storage encryption (this is the only allowed value for new Assets).

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.