How can I delete a database and make a new one?

0 votes

I have a database which I can see in the App42 Management Console. I don't remember how I created it, but it wascreated with:

String dbName = "TEST";  
String collectionName = "foo";

Anyway I deleted all the documents and collections but "TEST" still remains.

I want to make a new database with the following:

String dbName = "TOTMPsubscriptions";  
String collectionName = "subscriptions"

I thought these statements would do that:

String subscribedUserJSON =  "{\"username\":\"" +app42userName"\",\"expirationdate\":\"2014-6-27\"}";    

storageService.InsertJSONDocument(dbNamecollectionNamesubscribedUserJSONnew StorageResponse());

But I get the following exception:

Exception is : com.shephertz.app42.paas.sdk.csharp.App42BadParameterException: {"httpErrorCode":"400", "appErrorCode":"2610", "message":"Bad Request", "details":"The request parameters are invalid. Storage '[TEST]' already exists."}

closed as a duplicate of: Storage service - Delete a database
asked Jun 25, 2014 in App42 Cloud API-BaaS by huffman (17 points)
closed Jun 25, 2014 by huffman
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...