Available APIs
-
Data CRUDHandles CRUD operations on MongoDB collections.GET Request Body:
{ "db_name": "example_db", "coll_name": "example_collection", "operation": "fetch", "filters": {"field": "value"}, "limit": 50, "offset": 0 }
POST Request Body:{ "db_name": "example_db", "coll_name": "example_collection", "operation": "insert", "data": { "field1": "value1", "field2": "value2" } }
PUT Request Body:{ "db_name": "example_db", "coll_name": "example_collection", "operation": "update", "query": {"field": "value"}, "update_data": {"field1": "new_value"} }
DELETE Request Body:{ "db_name": "example_db", "coll_name": "example_collection", "operation": "delete", "query": {"field": "value"} }
-
List CollectionsLists all collections for a given database.GET Request Body:
{ "db_name": "example_db" }
-
Add CollectionAdds a new collection to an existing database.POST Request Body:
{ "db_name": "example_db", "coll_names": "new_collection_name" }
-
Create DatabaseCreates a new database and adds collections based on the product name.POST Request Body:
{ "db_name": "new_database", "num_collections": 5, "coll_names": ["collection1", "collection2"], "num_documents": 100, "num_fields": 10, "field_labels": ["label1", "label2"] }