Create or Update Asset

put https://app.mk.io/api/v1/projects/:project_name/media/assets/:asset_name

Create or Update Asset. When creating an asset, that asset needs to have a unique container & storage account within the project. When updating an asset, only the description column can be updated.

Authentication

Authorization Bearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

project_name string Required
asset_name string Required

Request

This endpoint expects an object.

labelsmap from strings to stringOptional

A dictionary of labels associated with the resource.

  • Maximum number of labels: 32.
  • Maximum length of a label or value: 256 characters.
  • Label: alphanumeric, hyphens and underscores.
  • Value: alphanumeric, hyphens, underscores and spaces.
Show value schemaHide value schema
[any key]string
propertiesobjectAssetPutPropertiesRequired
The properties of the asset.
Show 8 propertiesHide 8 properties
alternateIdstringOptional0-64 characters
An alternate ID of the asset.
containerstringOptional3-63 characterspattern: ^(?!.*--)(?=[a-z0-9-]{3,63}$)(?!-)[a-z0-9]+(?:-[a-z0-9]+)*$
The name of the container if this asset is stored in an Azure storage account.
containerDeletionPolicyenumOptional

This field defines the deletion policy for the underlying storage. This determines the behavior when an asset record is deleted. There are two options, 'Delete', and 'Retain'.

A deletion policy of 'Delete' will result in the associated storage container or folder and all its contents being removed. A deletion policy of 'Retain' will leave the content in place. If left blank, the default behavior of the system will be to retain content.

Once set by the user, this value can be modified, but not un-set.

Allowed values:DeleteRetain
descriptionstringOptional0-4096 characters
The Asset description.
encryptionScopestring or nullOptional
Accepted, not supported. The name of the encryption scope to use within your storage container. Errors may be cryptic.
storageAccountNamestringRequired0-255 characters
The name of the storage in MK.IO.
storageEncryptionFormatenumOptional
This field was deprecated in the v3 API. Accepted, not supported. Use an encryption scope instead.
Allowed values:NoneMediaStorageClientEncryption
subPathstringOptional1-256 characterspattern: ^(?!/)(?!.*(//|\?|%|&)).*[^/]$

Optional subpath for instances where your asset is not in the root of the container. This needs to be an absolute directory path and can't be an empty string or start with '.', './' or '/' or end with '/'.

Valid examples: 'path', 'path2', 'path/to/asset'

Response

200 Asset was updated
idstringOptional
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
labelsmap from strings to stringOptional

A dictionary of labels associated with the resource.

  • Maximum number of labels: 32.
  • Maximum length of a label or value: 256 characters.
  • Label: alphanumeric, hyphens and underscores.
  • Value: alphanumeric, hyphens, underscores and spaces.
Show value schemaHide value schema
[any key]string
namestringOptional1-260 characterspattern: ^[^\^\'<>%&:\\?/*+]+$
The name of the resource
propertiesobjectAssetPropertiesRequired
The properties of the asset.
Show 11 propertiesHide 11 properties
alternateIdstringOptional0-64 characters
An alternate ID of the asset.
assetIdstringOptionalformat: uuid
The Asset ID.
containerstringOptional3-63 characterspattern: ^(?!.*--)(?=[a-z0-9-]{3,63}$)(?!-)[a-z0-9]+(?:-[a-z0-9]+)*$
The name of the container if this asset is stored in an Azure storage account.
containerDeletionPolicyenumOptional

This field defines the deletion policy for the underlying storage. This determines the behavior when an asset record is deleted. There are two options, 'Delete', and 'Retain'.

A deletion policy of 'Delete' will result in the associated storage container or folder and all its contents being removed. A deletion policy of 'Retain' will leave the content in place. If left blank, the default behavior of the system will be to retain content.

Once set by the user, this value can be modified, but not un-set.

Allowed values:DeleteRetain
createdstringOptionalformat: date-time
The creation date of the Asset.
descriptionstringOptional0-4096 characters
The Asset description.
encryptionScopestring or nullOptional
Accepted, not supported. The name of the encryption scope to use within your storage container. Errors may be cryptic.
lastModifiedstringOptionalformat: date-time
The last modified date of the Asset.
storageAccountNamestringRequired0-255 characters
The name of the storage in MK.IO.
storageEncryptionFormatenumOptional
This field was deprecated in the v3 API. Accepted, not supported. Use an encryption scope instead.
Allowed values:NoneMediaStorageClientEncryption
subPathstringOptional1-256 characterspattern: ^(?!/)(?!.*(//|\?|%|&)).*[^/]$

Optional subpath for instances where your asset is not in the root of the container. This needs to be an absolute directory path and can't be an empty string or start with '.', './' or '/' or end with '/'.

Valid examples: 'path', 'path2', 'path/to/asset'

systemDataobjectSystemDataSchemaOptional
Metadata pertaining to creation and last modification of the resource.
Show 7 propertiesHide 7 properties
createdAtstringRequiredformat: date-time
The timestamp of resource creation (UTC).
createdBystringRequired
The identity that created the resource.
createdByTypeenumRequired
The type of identity that created the resource.
Allowed values:UserApplicationManagedIdentityKey
internalIdstringRequiredformat: uuid
The internal ID of the resource.
lastModifiedAtstringRequiredformat: date-time
The timestamp of resource last modification (UTC).
lastModifiedBystringRequired
The identity that last modified the resource.
lastModifiedByTypeenumRequired
The type of identity that last modified the resource.
Allowed values:UserApplicationManagedIdentityKey
typestringOptional
The type of the resource. E.g. "Microsoft.Media/mediaservices/assets"
201 Asset was created
idstringOptional
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
labelsmap from strings to stringOptional

A dictionary of labels associated with the resource.

  • Maximum number of labels: 32.
  • Maximum length of a label or value: 256 characters.
  • Label: alphanumeric, hyphens and underscores.
  • Value: alphanumeric, hyphens, underscores and spaces.
Show value schemaHide value schema
[any key]string
namestringOptional1-260 characterspattern: ^[^\^\'<>%&:\\?/*+]+$
The name of the resource
propertiesobjectAssetPropertiesRequired
The properties of the asset.
Show 11 propertiesHide 11 properties
alternateIdstringOptional0-64 characters
An alternate ID of the asset.
assetIdstringOptionalformat: uuid
The Asset ID.
containerstringOptional3-63 characterspattern: ^(?!.*--)(?=[a-z0-9-]{3,63}$)(?!-)[a-z0-9]+(?:-[a-z0-9]+)*$
The name of the container if this asset is stored in an Azure storage account.
containerDeletionPolicyenumOptional

This field defines the deletion policy for the underlying storage. This determines the behavior when an asset record is deleted. There are two options, 'Delete', and 'Retain'.

A deletion policy of 'Delete' will result in the associated storage container or folder and all its contents being removed. A deletion policy of 'Retain' will leave the content in place. If left blank, the default behavior of the system will be to retain content.

Once set by the user, this value can be modified, but not un-set.

Allowed values:DeleteRetain
createdstringOptionalformat: date-time
The creation date of the Asset.
descriptionstringOptional0-4096 characters
The Asset description.
encryptionScopestring or nullOptional
Accepted, not supported. The name of the encryption scope to use within your storage container. Errors may be cryptic.
lastModifiedstringOptionalformat: date-time
The last modified date of the Asset.
storageAccountNamestringRequired0-255 characters
The name of the storage in MK.IO.
storageEncryptionFormatenumOptional
This field was deprecated in the v3 API. Accepted, not supported. Use an encryption scope instead.
Allowed values:NoneMediaStorageClientEncryption
subPathstringOptional1-256 characterspattern: ^(?!/)(?!.*(//|\?|%|&)).*[^/]$

Optional subpath for instances where your asset is not in the root of the container. This needs to be an absolute directory path and can't be an empty string or start with '.', './' or '/' or end with '/'.

Valid examples: 'path', 'path2', 'path/to/asset'

systemDataobjectSystemDataSchemaOptional
Metadata pertaining to creation and last modification of the resource.
Show 7 propertiesHide 7 properties
createdAtstringRequiredformat: date-time
The timestamp of resource creation (UTC).
createdBystringRequired
The identity that created the resource.
createdByTypeenumRequired
The type of identity that created the resource.
Allowed values:UserApplicationManagedIdentityKey
internalIdstringRequiredformat: uuid
The internal ID of the resource.
lastModifiedAtstringRequiredformat: date-time
The timestamp of resource last modification (UTC).
lastModifiedBystringRequired
The identity that last modified the resource.
lastModifiedByTypeenumRequired
The type of identity that last modified the resource.
Allowed values:UserApplicationManagedIdentityKey
typestringOptional
The type of the resource. E.g. "Microsoft.Media/mediaservices/assets"

Errors

400 Bad Request
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
401 Unauthorized
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
403 Forbidden
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
404 Not Found
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
409 Conflict
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
429 Too Many Requests
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
500 Internal Server Error
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code