All Products
Search
Document Center

Intelligent Media Management:CreateStory

Last Updated:Dec 11, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
imm:CreateStorycreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project. You can obtain the name of the project from the response of the CreateProject operation.

test-project
DatasetNamestringYes

The name of the dataset. For information about how to obtain the name of a dataset, see Create a dataset.

test-dataset
ObjectIdstringNo

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
StoryTypestringYes

The type of the story. For information about valid types, see Story types and subtypes.

PeopleMemory
StorySubTypestringNo

The subtype of the story. For information about valid subtypes, see Story types and subtypes.

Solo
StoryStartTimestringNo

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
StoryEndTimestringNo

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
StoryNamestringNo

The name of the story.

name1
MinFileCountlongNo

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
MaxFileCountlongNo

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
NotifyTopicNamestringNo

The topic name of the asynchronous reverse notification.

test-topic
CustomLabelsobjectNo

The custom labels. Labels specify the custom information of the story. This enables retrieval based on your business requirements.

{"Bucket": "examplebucket"}
CustomIdstringNo

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
AddressAddressForStoryNo

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.
TagsobjectNo

The tags. You can specify this parameter in one of the following scenarios:

  • Specify tags as custom data, which is returned in messages provided by Simple Message Queue.
  • Search for tasks by tag.
  • Specify tags as variables in destination URIs.
{"key":"val"}
UserDatastringNo

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"}
NotificationNotificationNo

The notification settings. For information about the asynchronous notification format, see Asynchronous message examples.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

1B3D5E0A-D8B8-4DA0-8127-ED32C851****
TaskIdstring

The task ID.

CreateStory-4ef6ff43-edf3-4612-9cc4-0c7f9e19****
EventIdstring

The event ID.

392-1CqzvESGTEeNZ2OWFbRKIM****

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2023-03-09The request parameters of the API has changedView Change Details
2022-08-16The Error code has changed. The request parameters of the API has changedView Change Details
2022-08-16The Error code has changed. The request parameters of the API has changedView Change Details