AddEditingProjectMaterials

Updated at:

Adds one or more materials to an editing project.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:AddEditingProjectMaterials

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

string

Yes

The ID of the cloud editing project.

*****b2101cb318c*****

MaterialMaps

string

Yes

The material IDs. Separate multiple IDs with commas (,). A maximum of 10 material IDs are supported for each type. Valid values:

  • "video": video

  • "audio": audio

  • "image": image

  • "liveStream": live stream

  • "editingProject": editing project

{"video":"*****2e057304fcd9b145c5cafc*****", "image":"****8021a8d493da643c8acd98*****,*****cb6307a4edea614d8b3f3c*****", "liveStream": "[{\"appName\":\"testrecord\",\"domainName\":\"test.alivecdn.com\",\"liveUrl\":\"rtmp://test.alivecdn.com/testrecord/teststream\",\"streamName\":\"teststream\"}]", "editingProject": "*****9b145c5cafc2e057304fcd*****"}

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

*****ACB-44F2-5F2D-88D7-1283E70*****

ProjectId

string

The ID of the cloud editing project.

*****67ae06542b9b93e0d1c387*****

MediaInfos

array<object>

The collection of qualified media assets.

array<object>

MediaId

string

The ID of the media asset.

*****5cb2e35433198daae94a72*****

MediaBasicInfo

object

The basic information of the media asset.

MediaId

string

The ID of the media asset.

*****5cb2e35433198daae94a72*****

InputURL

string

The URL of the media asset to be registered in the corresponding system.

http://bucket.oss-cn-shanghai.aliyuncs.com/file.mp4

MediaType

string

The media type of the media asset.

Video

BusinessType

string

The business type of the media asset.

general

Source

string

The source.

oss

Title

string

The title.

default_title_2020-12-23T03:32:59Z

Description

string

The description.

sample_description

Category

string

The category.

audio

MediaTags

string

The tags.

sample_tag

CoverURL

string

The URL of the cover image.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=

UserData

string

The user data.

userData

Snapshots

string

The snapshots.

null

Status

string

The status of the media asset. Valid values:

  • Init: initialized

  • Preparing: preparing

  • PrepareFail: preparation failed

  • Normal: normal

Normal

TranscodeStatus

string

The transcoding status.

Init

CreateTime

string

The time when the media asset was created. The time is displayed in ISO 8601 format in UTC (ending with Z).

2020-12-23T03:32:59Z

ModifiedTime

string

The time when the media asset was modified. The time is displayed in ISO 8601 format in UTC (ending with Z).

2020-12-23T03:32:59Z

DeletedTime

string

The time when the media asset was deleted. The time is displayed in ISO 8601 format in UTC (ending with Z).

2020-12-23T03:32:59Z

SpriteImages

string

The sprite images.

http://outin-example.oss-cn-shanghai.aliyuncs.com/test.png?Expires=&OSSAccessKeyId=&Signature=&security-token=

FileInfoList

array<object>

FileInfos

array<object>

FileBasicInfo

object

The basic information of the file, including the duration and size.

FileName

string

The name of the file.

example.mp4

FileStatus

string

The status of the file. Valid values:

  • Uploading: uploading

  • Normal: normal

  • UploadFail: upload failed

  • Disable: disabled

  • Deleted: deleted

Normal

FileType

string

The type of the file.

source_file

FileSize

string

The size of the file in bytes.

30611502

FileUrl

string

The OSS URL of the file.

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=

Region

string

The storage region of the file.

cn-shanghai

FormatName

string

The encapsulation format.

mov,mp4,m4a,3gp,3g2,mj2

Duration

string

The duration.

216.206667

Bitrate

string

The bitrate.

1132.68

Width

string

The width.

960

Height

string

The height.

540

LiveMaterials

array<object>

The materials associated with the live stream.

object

AppName

string

The name of the live streaming application.

testrecord

StreamName

string

The name of the live stream.

teststream

DomainName

string

The domain name of the live stream.

test.alivecdn.com

LiveUrl

string

The URL of the live stream.

rtmp://test.alivecdn.com/testrecord/teststream

ProjectMaterials

array

The materials associated with the editing project. A live editing project is associated with a common editing project after the live stream ends.

*****9b145c5cafc2e057304fcd*****

string

The ID of the common editing project associated with the live editing project.

*****c38767ae06542b9b93e0d1*****

Examples

Success response

JSON format

{
  "RequestId": "*****ACB-44F2-5F2D-88D7-1283E70*****",
  "ProjectId": "*****67ae06542b9b93e0d1c387*****",
  "MediaInfos": [
    {
      "MediaId": "*****5cb2e35433198daae94a72*****",
      "MediaBasicInfo": {
        "MediaId": "*****5cb2e35433198daae94a72*****",
        "InputURL": "http://bucket.oss-cn-shanghai.aliyuncs.com/file.mp4",
        "MediaType": "Video",
        "BusinessType": "general",
        "Source": "oss",
        "Title": "default_title_2020-12-23T03:32:59Z",
        "Description": "sample_description",
        "Category": "audio",
        "MediaTags": "sample_tag",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
        "UserData": "userData",
        "Snapshots": "null",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2020-12-23T03:32:59Z",
        "ModifiedTime": "2020-12-23T03:32:59Z",
        "DeletedTime": "2020-12-23T03:32:59Z",
        "SpriteImages": "http://outin-example.oss-cn-shanghai.aliyuncs.com/test.png?Expires=&OSSAccessKeyId=&Signature=&security-token="
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example.mp4",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "30611502",
            "FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=",
            "Region": "cn-shanghai",
            "FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
            "Duration": "216.206667",
            "Bitrate": "1132.68",
            "Width": "960",
            "Height": "540"
          }
        }
      ]
    }
  ],
  "LiveMaterials": [
    {
      "AppName": "testrecord",
      "StreamName": "teststream",
      "DomainName": "test.alivecdn.com",
      "LiveUrl": "rtmp://test.alivecdn.com/testrecord/teststream"
    }
  ],
  "ProjectMaterials": [
    "*****c38767ae06542b9b93e0d1*****"
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter \ is not valid.
404 ProjectNotFound The specified project not found

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.