{}
Available APIs
-
Health CheckChecks the health status of the API.GET:
{ "success": true, "message": "API is healthy" }
-
Create DatabaseCreates a new database with specified collections and fields.
{ "db_name": "new_database", "collections": [ { "name": "users", "fields": [ {"name": "username", "type": "string"}, {"name": "age", "type": "number"} ] } ] }
POST:{ "success": true, "message": "Database created successfully" }
-
Add CollectionsAdds new collections to an existing database, specifying document fields for each collection.
{ "database_id": "507f1f77bcf86cd799439011", "collections": [ { "name": "orders", "fields": [ {"name": "order_id", "type": "string"}, {"name": "total", "type": "number"} ] } ] }
POST:{ "success": true, "message": "Collections added successfully" }
-
List CollectionsLists all collections in a specified database.
{'database_id': '507f1f77bcf86cd799439011'}
GET:{ "success": true, "message": "Collections retrieved successfully", "data": [ "users", "products" ] }
-
Create DocumentsCreates documents in a specified collection.
{ "database_id": "507f1f77bcf86cd799439011", "collection_name": "users", "data": [ { "username": "john_doe", "age": 30 } ] }
POST:{ "success": true, "message": "Documents inserted successfully!" }
-
Read DocumentsReads documents from a specified collection with optional filters.
{'database_id': '507f1f77bcf86cd799439011', 'collection_name': 'users', 'filters': '{"age":{"$gt":25}}', 'limit': 50, 'offset': 0}
GET:{ "success": true, "message": "Data found!", "data": [...] }
-
Update DocumentsUpdates documents in a specified collection.
{ "database_id": "507f1f77bcf86cd799439011", "collection_name": "users", "filters": {"username": "john_doe"}, "update_data": {"age": 31} }
PUT:{ "success": true, "message": "Document updated successfully" }
-
Delete DocumentsDeletes documents from a specified collection.
{ "database_id": "507f1f77bcf86cd799439011", "collection_name": "users", "filters": {"username": "john_doe"}, "soft_delete": true }
DELETE:{ "success": true, "message": "Document deleted successfully" }
-
List DatabasesLists all databases in the MongoDB cluster with pagination and optional filtering.
{'page': 1, 'page_size': 10, 'filter': 'example'}
GET:{ "success": true, "message": "Databases retrieved successfully", "data": [ { "name": "example_db", "num_collections": 3 }, { "name": "user_data_db", "num_collections": 1 }, ] }
-
Drop DatabaseDeletes a database and all its collections and metadata with confirmation.
{ "database_id": "507f1f77bcf86cd799439011", "confirmation": "example_db" }
DELETE:{ "success": true, "message": "Database dropped successfully" }
-
Drop CollectionsDeletes specified collections from a database.
{ "database_id": "507f1f77bcf86cd799439011", "collection_names": ["users", "orders"] }
DELETE:{ "success": true, "message": "Collections dropped successfully" }
-
Get Database MetadataFetches metadata for a specific database, including collections, fields, and additional metadata.
{'database_id': '507f1f77bcf86cd799439011'}
GET:{ "success": true, "message": "Metadata retrieved successfully", "data": { "database_name": "example_db", "number_of_collections": 3, "number_of_fields": 12, "collections_metadata": [...] } }