Creates a story.
Operation description
- Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
- Before you call this operation, make sure that you have indexed file metadata into the dataset automatically by calling the CreateBinding operation or manually by calling the IndexFileMeta or BatchIndexFileMeta operation.
- The operation is an asynchronous operation. After a task is executed, the task information is saved only for seven days. When the retention period ends, the task information can no longer be retrieved. You can call the GetTask or ListTasks to query information about the task. If you specify Notification , you can obtain information about the task based on notifications.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
imm:CreateStory | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectName | string | Yes | The name of the project. You can obtain the name of the project from the response of the CreateProject operation. | test-project |
DatasetName | string | Yes | The name of the dataset. For information about how to obtain the name of a dataset, see Create a dataset. | test-dataset |
ObjectId | string | No | The ID of the story. This parameter is optional. If you leave this parameter empty, IMM assigns a unique identifier to the story. You can query and update a story based on its ID. You can also manually create an ID for a story. After you create an ID for a story, you must specify this parameter to pass the ID into the system. This way, IMM can record the ID as the unique identifier of the story. If you pass an existing ID into the system, IMM updates the story that corresponds to the ID. | id1 |
StoryType | string | Yes | The type of the story. For information about valid types, see Story types and subtypes. | PeopleMemory |
StorySubType | string | No | The subtype of the story. For information about valid subtypes, see Story types and subtypes. | Solo |
StoryStartTime | string | No | The start time of the photo collection for which you want to create the story. StoryStartTime and StoryEndTime form a time interval based on which IMM filters candidate photos to generate a story. The value must be a string in the RFC3339 format. | 2016-12-30T16:00:00Z |
StoryEndTime | string | No | The end time of the photo collection for which you want to create the story. StoryStartTime and StoryEndTime form a time interval based on which IMM filters candidate photos to generate a story. The value must be a string in the RFC3339 format. | 2021-12-30T16:00:00Z |
StoryName | string | No | The name of the story. | name1 |
MinFileCount | long | No | The minimum number of photo files in the story. The actual number of photo files ranges from the value of MinFileCount to the value of MaxFileCount. The value of this parameter must be an integer greater than 1. If the actual number of candidate photos is less than the value of this parameter, a null story is returned. | 1 |
MaxFileCount | long | No | The maximum number of photo files in the story. The actual number of photo files ranges from the value of MinFileCount to the value of MaxFileCount. The value of this parameter must be an integer greater than the value of MinFileCount. To provide the desired effect, the algorithm limits the maximum number of photo files to 1,500. If you set MaxFileCount to a value greater than 1,500, this parameter does not take effect. | 3 |
NotifyTopicName | string | No | The topic name of the asynchronous reverse notification. | test-topic |
CustomLabels | object | No | The custom labels. Labels specify the custom information of the story. This enables retrieval based on your business requirements. | {"Bucket": "examplebucket"} |
CustomId | string | No | The custom ID. A custom ID of a generated story may differ from the value of ObjectID and can be utilized for subsequent retrieval and sorting of stories. | test |
Address | AddressForStory | No | The address of the story. IMM filters candidate photos to generate a story based on the value of this parameter. This parameter takes effect only if you set StoryType to TravelMemory. Note
If you are located in Hong Kong (China), Macao (China), Taiwan (China), or overseas, you cannot specify an address in the Chinese mainland by using this parameter.
| |
Tags | object | No | The tags. You can specify this parameter in one of the following scenarios:
| {"key":"val"} |
UserData | string | No | The custom information, which is returned as asynchronous notifications to facilitate notification management in your system. The maximum information length is 2,048 bytes. | {"ID": "testuid","Name": "test-user","Avatar": "http://test.com/testuid"} |
Notification | Notification | No | The notification settings. For information about the asynchronous notification format, see Asynchronous message examples. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "1B3D5E0A-D8B8-4DA0-8127-ED32C851****",
"TaskId": "CreateStory-4ef6ff43-edf3-4612-9cc4-0c7f9e19****",
"EventId": "392-1CqzvESGTEeNZ2OWFbRKIM****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-03-09 | The request parameters of the API has changed | View Change Details |
2022-08-16 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-08-16 | The Error code has changed. The request parameters of the API has changed | View Change Details |