Delete Metadata Collection

delete

/documents/api/1.2/metadata/{collectionName}

Delete a metadata collection and all of its values assigned to files or folders.

Request

Supported Media Types
Path Parameters
  • Collection name. For a user personal collection, it must start with Personal., such as Personal.MyCollection.
Back to Top

Response

Supported Media Types

200 Response

The request was fulfilled.

Body ()
Root Schema : CollectionDeleteResponse
Type: object
The response body includes information about deleting a metadata collection.
Show Source

400 Response

Request parameters are not formatted correctly.

A collection with that name does not exist.

Back to Top

Examples

The following example deletes the CollectionB metadata collection.

DELETE .../metadata/CollectionB

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
  "errorCode": "0"
}

Example 2

The following example deletes the Personal.CollectionA metadata collection.

DELETE .../metadata/Personal.CollectionA

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 200

JSON Response

{
    "errorCode": "0"
}

Example 3

The following example attempts to delete a nonexistent metadata collection.

DELETE .../metadata/Personal.CollectionAB

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 404

JSON Response

{
    "errorCode": "-16",
    "errorKey": "!csUnableToDeleteMetaColDef!csMetaCollectionDoesntExist,Personal.CollectionAB",
    "errorMessage": "Unable to delete metadata collection definition. Metadata Collection 'Personal.CollectionAB' is not defined.",
    "title": "Unable to delete metadata collection definition. Metadata Collection 'Personal.CollectionAB' is not defined.",
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}

Example 4

The following example attempts to delete a metadata collection using invalid characters in the name.

DELETE .../metadata/Personal.CollectionA,B

Request Header

None.

Request Body

None.

HTTP Status Code

HTTP_STATUS = 400

JSON Response

{
    "errorCode": "-96",
    "errorKey": "!csCollectionNameInvalidCharacters,Personal.CollectionA\\,B",
    "errorMessage": "Invalid characters in the collection name 'Personal.CollectionA,B'.",
    "title": "Invalid characters in the collection name 'Personal.CollectionA,B'.",
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Back to Top