Creates a collection.

Collections are classified into various types. The names of collections of the same type must be different.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateMetaCollection

The action that you want to perform. Set the value to CreateMetaCollection.

Name String Yes collection_name

The name of the collection.

The name must be 1 to 32 characters in length.

Comment String No this is a comment

The comment of the collection.

The comment must be 1 to 64 characters in length.

ParentQualifiedName String No album.333508

The unique identifier of the parent collection.

CollectionType String Yes ALBUM

The type of the collection.

A category must belong to a data album.

You can create a category in a data album only after you create the data album. You can set the value of the parentQualifiedName parameter to the unique identifier of the data album to create the category.

Response parameters

Parameter Type Example Description
RequestId String E6F0DBDD-5AD****

The ID of the request.

QualifiedName String album.11111

The unique identifier of the collection.

Success String true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
ErrorCode String NoPermission

The error code returned.

ErrorMessage String The specified parameters are invalid.

The error message returned.

HttpStatusCode String 200

The HTTP status code returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateMetaCollection
&Name=collection_name
&Comment=this is a comment
&ParentQualifiedName=album.333508
&CollectionType=ALBUM and ALBUM_CATEGORY
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateMetaCollectionResponse>
    <RequestId>E6F0DBDD-5AD****</RequestId>
    <QualifiedName>album.1111</QualifiedName>
    <Success>true</Success>
    <ErrorCode>9999</ErrorCode>
    <ErrorMessage>The specified parameters are invalid.</ErrorMessage>
    <HttpStatusCode>200</HttpStatusCode>
</CreateMetaCollectionResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "E6F0DBDD-5AD****",
  "QualifiedName" : "album.1111",
  "Success" : "true",
  "ErrorCode" : "9999",
  "ErrorMessage" : "The specified parameters are invalid.",
  "HttpStatusCode" : "200"
}

Error codes

For a list of error codes, see Service error codes.