Delete Metadata Collection
/documents/api/1.1/metadata/{collectionName}
Delete a metadata collection and all of its values assigned to files or folders.
Request
- application/json
- application/xml
- collectionName
-
Type:
string
Required:true
Collection name. For a user personal collection, it must start withPersonal.
, such asPersonal.MyCollection
.
Response
- application/json
- application/xml
The request was fulfilled.
- errorCode
-
Type:
string
An error code of zero (0) indicates no errors. - idList
-
Type:
string
The collection Id. - type
-
Type:
string
Item typecollection
.
Request parameters are not formatted correctly.
A collection with that name does not exist.
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" }