There are two operations to delete collections.
Note that there are no software pre-requirements for deleting a collection (that is, a collection can be deleted at any time). However, it is highly recommended that you first delete the records in a collection before deleting the collection itself, as described in Deleting a collection and its records.
<deleteCollections> <outerTransactionId>?</outerTransactionId> <language>en</language> <collectionKey collectionKey="?"/> </deleteCollections>
The collectionKey element specifies the collection key of the collection to be deleted (note that collection names are case sensitive). The outerTransactionId and language attributes are optional.
The deleteCollections operation lets you delete multiple collections with the same request. To do so, use multiple collectionKey elements within the <deleteCollections> structure. Keep in mind, however, that a deleteCollections operation that deletes multiple collections is atomic, which means that either the operation is successful (i.e., all collections are successfully deleted) or the entire operation fails if at least one of the deletes fail (i.e., none of the collections is deleted).
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.endeca.com/endeca-server/sconfig/3/0"> <soapenv:Header/> <soapenv:Body> <ns:deleteCollections> <ns:language>en</ns:language> <ns:collectionKey collectionKey="EmpRecs"/> <ns:collectionKey collectionKey="ArchivedRecs"/> </ns:deleteCollections> </soapenv:Body> </soapenv:Envelope>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns2:deleteCollectionsResponse xmlns:ns2="http://www.endeca.com/endeca-server/sconfig/3/0"> <ns2:numCollectionsDeleted>2</ns2:numCollectionsDeleted> </ns2:deleteCollectionsResponse> </env:Body> </env:Envelope>
In the example, two collections were deleted. If the deleteCollections operation was not successful, the numCollectionsDeleted element will have 0 (zero) as its value.
<deleteAllCollections> <outerTransactionId>?</outerTransactionId> <language>en</language> </deleteAllCollections>
The outerTransactionId and language attributes are optional.
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <ns2:deleteAllCollectionsResponse xmlns:ns2="http://www.endeca.com/endeca-server/sconfig/3/0"> <ns2:numCollectionsDeleted>3</ns2:numCollectionsDeleted> </ns2:deleteAllCollectionsResponse> </env:Body> </env:Envelope>
In the example, three collections were deleted. If the deleteAllCollections operation was not successful, the numCollectionsDeleted element will have 0 (zero) as its value.
If you delete a collection that has an entity that depends on the collection, then the entity's isValid attribute will be set to false. In this case, you should update the configuration of the entity to remove the dependency on the deleted collection.