{ "db_name": "example_db", "coll_name": "example_collection", "filters": {"field": "value"}, "limit": 50, "offset": 0, "is_deleted": false }
Available APIs
-
Data CRUDHandles CRUD operations on MongoDB collections.
{ "db_name": "example_db", "coll_name": "example_collection", "data": { "field1": "value1", "field2": "value2" } }
{ "db_name": "example_db", "coll_name": "example_collection", "operation": "update", "query": {"field": "value"}, "update_data": {"field1": "new_value"} }
{ "db_name": "example_db", "coll_name": "example_collection", "operation": "soft_delete", "query": {"field": "value"} }
GET:{ "success": true, "message": "Data found!", "data": [...] }
POST:{ "success": true, "message": "Documents inserted successfully!" }
PUT:{ "success": true, "message": "Document updated successfully" }
DELETE (soft_delete):{ "success": true, "message": "Document soft-deleted successfully" }
DELETE (hard delete):{ "success": true, "message": "Document deleted successfully" }
-
List CollectionsLists all collections for a specified database.
{ "db_name": "example_db" }
GET:{ "success": true, "message": "Collections retrieved successfully", "data": ["collection1", "collection2", ...] }
-
Add CollectionAdds new collections to an existing database, specifying document fields for each collection.
{ "db_name": "example_db", "collections": [...] }
POST:{ "success": true, "message": "Collections added successfully" }
-
Create DatabaseCreates a new database with specified collections and fields.
{ "db_name": "new_database", "collections": [...] }
POST:{ "success": true, "message": "Database created 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" }
-
Get MetadataFetches metadata for a specific database, including collections, fields, and additional metadata.
{ "db_name": "example_db" }
GET:{ "success": true, "message": "Metadata retrieved successfully", "data": { "database_name": "example_db", "number_of_collections": 3, "number_of_fields": 12, "collections_metadata": [...] } }