{"id":6947,"date":"2015-09-14T16:15:58","date_gmt":"2015-09-14T13:15:58","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=6947"},"modified":"2015-09-06T12:21:41","modified_gmt":"2015-09-06T09:21:41","slug":"mongodb-shells-new-crud-api","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/","title":{"rendered":"The MongoDB Shell&#8217;s New CRUD API"},"content":{"rendered":"<p>We released the latest development version of MongoDB the other week. The <a href=\"http:\/\/blog.mongodb.org\/post\/127802855483\/mongodb-317-is-released\">official announcement<\/a> focuses on bug fixes, but I&#8217;m much more excited about a new feature: the mongo shell includes the new CRUD API! In addition to the old <code>insert<\/code>, <code>update<\/code>, and <code>remove<\/code>, the shell now supports <code>insertMany<\/code>, <code>replaceOne<\/code>, and a variety of other new methods.<\/p>\n<p>Why do I care about this, and why should you?<\/p>\n<p>MongoDB&#8217;s next-generation drivers, released this spring, include <a href=\"https:\/\/www.mongodb.com\/blog\/post\/consistent-crud-api-next-generation-mongodb-drivers\">the new API for CRUD operations<\/a>, but the shell did not initially follow suit. My reader Nick Milon <a href=\"http:\/\/emptysqua.re\/blog\/announcing-pymongo-3\/#comment-1955330570\">commented<\/a> that this is a step in the wrong direction: drivers are now less consistent with the shell. He pointed out, &#8220;developers switch more often between a driver and shell than drivers in different programming languages.&#8221; So <a href=\"https:\/\/jira.mongodb.org\/browse\/SERVER-17953\">I proposed the feature<\/a>, Christian Kvalheim coded it, and Kay Kim is updating the user&#8217;s manual.<\/p>\n<p>It&#8217;s satisfying when a stranger&#8217;s suggestion is so obviously right that we hurry to implement it.<\/p>\n<p>The shell is now more consistent with the drivers than ever before. But beyond that, the new API is just better. For example, the old <code>insert<\/code> method could take one document or many, and its return value didn&#8217;t include the new ids:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the old insert API\r\n&gt; db.test.insert({_id: 1})\r\nWriteResult({ \"nInserted\" : 1 })\r\n&gt; db.test.insert([{_id: 2}, {_id: 3}, {_id: 4}])\r\nBulkWriteResult({\r\n    \"writeErrors\" : [ ],\r\n    \"writeConcernErrors\" : [ ],\r\n    \"nInserted\" : 3,\r\n    \"nUpserted\" : 0,\r\n    \"nMatched\" : 0,\r\n    \"nModified\" : 0,\r\n    \"nRemoved\" : 0,\r\n    \"upserted\" : [ ]\r\n})<\/pre>\n<p>The new API better distinguishes single- and bulk-insert, and returns more useful results:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the new CRUD API\r\n&gt; db.test2.insertOne({_id: 1})\r\n{\r\n    \"acknowledged\" : true,\r\n    \"insertedId\" : 1\r\n}\r\n&gt; db.test2.insertMany([{_id: 2}, {_id: 3}, {_id: 4}])\r\n{ \r\n    \"acknowledged\" : true,\r\n    \"insertedIds\" : [ 2, 3, 4 ]\r\n}<\/pre>\n<p>The old <code>insert<\/code> method remains in the shell indefinitely, however: we know there are heaps of scripts written with the old methods and we don&#8217;t plan to drop them.<\/p>\n<p>On to the next operation. The shell&#8217;s <code>update<\/code> is famously ill-designed. No one can remember the order of the &#8220;upsert&#8221; and &#8220;multi&#8221; options, and defaulting &#8220;multi&#8221; to false stumped generations of new users:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the old update API\r\n&gt; db.test.update(\r\n... {_id: 1},\r\n... {$set: {x: 1}},\r\n... true              \/* upsert *\/,\r\n... false             \/* multi *\/\r\n)\r\nWriteResult({\r\n    \"nMatched\" : 0,\r\n    \"nUpserted\" : 1,\r\n    \"nModified\" : 0,\r\n    \"_id\" : 1\r\n})<\/pre>\n<p>The new <code>updateOne<\/code> method is much easier to use correctly:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the new update API\r\n&gt; db.test2.updateOne(\r\n... {_id: 1},\r\n... {$set: {x: 1}},\r\n... {upsert: true}\r\n)\r\n{\r\n    \"acknowledged\" : true,\r\n    \"matchedCount\" : 0,\r\n    \"modifiedCount\" : 0,\r\n    \"upsertedId\" : 1\r\n}<\/pre>\n<p>We introduce <code>updateMany<\/code> for multi-updates.<\/p>\n<p>Another flaw in the old <code>update<\/code> was, if you forgot the $-sign on an operator, you replaced a whole document instead of modifying it:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the old replace API\r\n&gt; db.test.update(\r\n... {_id: 1},\r\n... {set: {x: 1}}  \/\/ OOPS!!\r\n)\r\nWriteResult({\r\n    \"nMatched\" : 1,\r\n    \"nUpserted\" : 0,\r\n    \"nModified\" : 1\r\n})\r\n&gt; \/\/ document was replaced\r\n&gt; db.test.findOne()\r\n{ \"_id\" : 1, \"set\" : { \"x\" : 1 } }<\/pre>\n<p>Now, replacing a document and updating it are kept distinct, preventing mistakes:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the new update API catches mistakes\r\n&gt; db.test2.updateOne(\r\n... {_id: 1},\r\n... {set: {x: 1}}\r\n)\r\nError: the update operation document must contain atomic operators\r\n&gt;\r\n&gt; \/\/ explicitly replace with \"replaceOne\"\r\n&gt; db.test2.replaceOne(\r\n... {_id: 1},\r\n... {x: 1}\r\n)\r\n{\r\n    \"acknowledged\" : true,\r\n    \"matchedCount\" : 1,\r\n    \"modifiedCount\" : 1\r\n}\r\n&gt; db.test2.findOne()\r\n{ \"_id\" : 1, \"x\" : 1 }<\/pre>\n<p>The old <code>remove<\/code> method is full of surprises: it defaults &#8220;multi&#8221; to true, although &#8220;multi&#8221; is false for updates:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the old delete API\r\n&gt; db.test.remove({})  \/\/ remove EVERYTHING!!<\/pre>\n<p>The new methods let you say clearly which you want:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the new delete API\r\n&gt; db.test2.deleteOne({})\r\n{ \"acknowledged\" : true, \"deletedCount\" : 1 }\r\n&gt; db.test2.deleteMany({})\r\n{ \"acknowledged\" : true, \"deletedCount\" : 3 }<\/pre>\n<p>MongoDB&#8217;s <code>findAndModify<\/code> command is powerful, and its options are impossible to learn.<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the old findAndModify\r\n&gt; db.test.findAndModify({\r\n... query: {_id: 1},\r\n... update: {$set: {x: 1}},\r\n... new: true\r\n... })\r\n{ \"_id\" : 1, \"x\" : 1 }\r\n&gt; db.test.findAndModify({\r\n... query: {_id: 1},\r\n...  \/\/ REPLACE the document!\r\n... update: {field: 'value'},\r\n...  \/\/ Return previous doc.\r\n... new: false\r\n... })\r\n{ \"_id\" : 1, \"x\" : 1 }\r\n&gt; db.test.findAndModify({\r\n... query: {_id: 1},\r\n... remove: true\r\n... })\r\n{ \"_id\" : 1, \"field\" : \"value\" }<\/pre>\n<p>So we&#8217;ve split the one overloaded <code>findAndModify<\/code> into three:<\/p>\n<pre class=\" brush:php\">&gt; \/\/ the new API\r\n&gt; db.test2.findOneAndUpdate(\r\n... {_id: 1},\r\n... {$set: {x: 1}},\r\n... {returnNewDocument: true}\r\n... )\r\n{ \"_id\" : 1, \"x\" : 1 }\r\n&gt; db.test2.findOneAndReplace(\r\n... {_id: 1},\r\n... {field: 'value'},\r\n... {returnNewDocument: false}\r\n... )\r\n{ \"_id\" : 1, \"x\" : 1 }\r\n&gt; db.test2.findOneAndDelete({_id: 1})\r\n{ \"_id\" : 1, \"field\" : \"value\" }<\/pre>\n<p>This is not a complete description of the changes. The <code>find<\/code>, <code>findOne<\/code>, and other query methods have standardized new options while preserving compatibility with old scripts. There&#8217;s also a new <code>bulkWrite<\/code> method that&#8217;s easier and more efficient than the old Bulk API. We&#8217;ll have complete documentation for the new shell API when we publish the manual for MongoDB 3.2. Meanwhile, read <a href=\"https:\/\/www.mongodb.com\/blog\/post\/consistent-crud-api-next-generation-mongodb-drivers\">Jeremy Mikola&#8217;s article about the CRUD API<\/a>, and <a href=\"https:\/\/github.com\/mongodb\/specifications\/blob\/master\/source\/crud\/crud.rst\">the spec itself<\/a> is quite legible, too.<\/p>\n<p>Since the old <code>insert<\/code>, <code>update<\/code>, and <code>remove<\/code> are so pervasive in our users&#8217; code we have no plans to drop them or make backwards-incompatible changes.<\/p>\n<p>I&#8217;m so glad we took the time to implement the new CRUD API in the shell. It was a big effort building, testing, and documenting it\u2014the <a href=\"https:\/\/github.com\/mongodb\/mongo\/commit\/8c8da71903a3325d4df19faaf2745f23bfbe7302\">diff for the initial patch alone<\/a> is frightening\u2014but it&#8217;s well worth it to give the next generation of developers a consistent experience when they first learn MongoDB. Thanks again to Nick Milon for giving us the nudge.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/emptysqua.re\/blog\/mongo-shell-crud-api\/\">The MongoDB Shell&#8217;s New CRUD API<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Jesse Davis at the <a href=\"http:\/\/emptysqua.re\/blog\/\">A. Jesse Jiryu Davis<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I&#8217;m much more excited about a new feature: the mongo shell includes the new CRUD API! In addition to the old insert, update, and remove, the shell now supports insertMany, replaceOne, and a variety of other &hellip;<\/p>\n","protected":false},"author":29,"featured_media":1649,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[57],"class_list":["post-6947","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nosql","tag-mongodb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The MongoDB Shell&#039;s New CRUD API - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I&#039;m much more excited about a\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The MongoDB Shell&#039;s New CRUD API - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I&#039;m much more excited about a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-14T13:15:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jesse Davis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/jessejiryudavis\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jesse Davis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\"},\"author\":{\"name\":\"Jesse Davis\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/294d6819cb410ef55f273ecf25426c56\"},\"headline\":\"The MongoDB Shell&#8217;s New CRUD API\",\"datePublished\":\"2015-09-14T13:15:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\"},\"wordCount\":568,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg\",\"keywords\":[\"MongoDB\"],\"articleSection\":[\"NoSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\",\"name\":\"The MongoDB Shell's New CRUD API - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg\",\"datePublished\":\"2015-09-14T13:15:58+00:00\",\"description\":\"We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I'm much more excited about a\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NoSQL\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/nosql\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"The MongoDB Shell&#8217;s New CRUD API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/294d6819cb410ef55f273ecf25426c56\",\"name\":\"Jesse Davis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2db0fdaadd8cd6b86d93e1205e30dd3b43e3c46b91826513ab618934c3db8cf9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2db0fdaadd8cd6b86d93e1205e30dd3b43e3c46b91826513ab618934c3db8cf9?s=96&d=mm&r=g\",\"caption\":\"Jesse Davis\"},\"description\":\"Jesse is a senior engineer at MongoDB in New York City. He specializes in Python, MongoDB drivers, and asynchronous frameworks.\",\"sameAs\":[\"http:\/\/emptysqua.re\/blog\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/jessejiryudavis\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/jesse-davis\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The MongoDB Shell's New CRUD API - Web Code Geeks - 2026","description":"We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I'm much more excited about a","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/","og_locale":"en_US","og_type":"article","og_title":"The MongoDB Shell's New CRUD API - Web Code Geeks - 2026","og_description":"We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I'm much more excited about a","og_url":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-09-14T13:15:58+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg","type":"image\/jpeg"}],"author":"Jesse Davis","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/jessejiryudavis","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Jesse Davis","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/"},"author":{"name":"Jesse Davis","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/294d6819cb410ef55f273ecf25426c56"},"headline":"The MongoDB Shell&#8217;s New CRUD API","datePublished":"2015-09-14T13:15:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/"},"wordCount":568,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg","keywords":["MongoDB"],"articleSection":["NoSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/","url":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/","name":"The MongoDB Shell's New CRUD API - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg","datePublished":"2015-09-14T13:15:58+00:00","description":"We released the latest development version of MongoDB the other week. The official announcement focuses on bug fixes, but I'm much more excited about a","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/nosql-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/nosql\/mongodb-shells-new-crud-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"NoSQL","item":"https:\/\/www.webcodegeeks.com\/category\/nosql\/"},{"@type":"ListItem","position":3,"name":"The MongoDB Shell&#8217;s New CRUD API"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/294d6819cb410ef55f273ecf25426c56","name":"Jesse Davis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2db0fdaadd8cd6b86d93e1205e30dd3b43e3c46b91826513ab618934c3db8cf9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2db0fdaadd8cd6b86d93e1205e30dd3b43e3c46b91826513ab618934c3db8cf9?s=96&d=mm&r=g","caption":"Jesse Davis"},"description":"Jesse is a senior engineer at MongoDB in New York City. He specializes in Python, MongoDB drivers, and asynchronous frameworks.","sameAs":["http:\/\/emptysqua.re\/blog\/","https:\/\/x.com\/https:\/\/twitter.com\/jessejiryudavis"],"url":"https:\/\/www.webcodegeeks.com\/author\/jesse-davis\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/6947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=6947"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/6947\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1649"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=6947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=6947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=6947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}