{"id":2507,"date":"2017-02-08T12:50:16","date_gmt":"2017-02-08T12:50:16","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2507"},"modified":"2025-10-09T07:10:44","modified_gmt":"2025-10-09T14:10:44","slug":"developer-release-curl-n1ql","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/","title":{"rendered":"Couchbase Developer Release &#8211; Put some cURL in your N1QL"},"content":{"rendered":"<h2 id=\"docs-internal-guid-1f1882ec-bcc9-27eb-7b4c-375b4f171db8\" dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 4pt\"><span style=\"font-size: 22.6667px;font-family: Arial;color: #373d49;vertical-align: baseline\">What is cURL?<\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Ever heard of cURL? It\u2019s a famous command line tool for sending\/receiving data using URL syntax, says wikipedia <\/span><a style=\"text-decoration: none\" href=\"https:\/\/en.wikipedia.org\/wiki\/CURL\"><span style=\"font-size: 14px;font-family: Georgia;color: #a0aabf;text-decoration: underline;vertical-align: baseline\">here<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">. Let\u2019s start with an example related to Couchbase. The N1QL query service is available through a REST API. If you want to execute a N1QL query with cURL, and supposing your query service is enabled on localhost, it will look like this:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">curl https:\/\/localhost:8093\/query\/service -d &#8216;statement=SELECT * FROM default LIMIT 1&#8217;<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">or if you want to run a fulltext query you would do something like<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">curl -XPOST -H &#8220;Content-Type: application\/json&#8221; https:\/\/localhost:8094\/api\/index\/beer\/query -d &#8216;{&#8220;explain&#8221;: true,&#8221;fields&#8221;: [&#8220;*&#8221;],&#8221;highlight&#8221;: {},&#8221;query&#8221;: {&#8220;query&#8221;: &#8220;pale ale&#8221;}}&#8217;<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Right now there is nothing specific about <a href=\"https:\/\/www.couchbase.com\/products\/n1ql\/\">N1QL<\/a>, it\u2019s just an exemple of REST API call with cURL. So why this title? Well that\u2019s because you can call cURL from a N1QL query.<\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 4pt\"><span style=\"font-size: 22.6667px;font-family: Arial;color: #373d49;vertical-align: baseline\">cURL() in N1QL<\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">curl() is a new N1QL function that allow you to access external JSON data over a remote(usually HTTP(s)) endpoint. Similar to other N1QL functions, this function can be used in various N1QL expressions and various clauses of the SELECT\/DML queries (projection, where, from etc). When used in from clause the curl() invocation should result in a set\/collection of JSON documents.<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">It has already been covered quite extensively on <\/span><a style=\"text-decoration: none\" href=\"https:\/\/dzone.com\/articles\/curl-comes-to-n1ql-querying-external-json-data\"><span style=\"font-size: 14px;font-family: Georgia;color: #1155cc;text-decoration: underline;vertical-align: baseline\">DZone<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">, I strongly invite you to read it, as well as many other DZone <\/span><a style=\"text-decoration: none\" href=\"https:\/\/dzone.com\/search?page=1\"><span style=\"font-size: 14px;font-family: Georgia;color: #1155cc;text-decoration: underline;vertical-align: baseline\">posts<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\"> about N1QL and written by the N1QL team.<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">We can start as anyone will do when trying a new language with a very simple SELECT:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">SELECT CURL(&#8220;GET&#8221;,&#8221;https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json&#8221;, {&#8220;data&#8221;:&#8221;address=santa+cruz&amp;components=country:ES&amp;key=YOUR_API_KEY&#8221;});<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">This will get you the following JSON result:<\/span><\/p>\n<pre><code>\r\n[\r\n  {\r\n    \"results\": [\r\n      {\r\n        \"address_components\": [\r\n          {\r\n            \"long_name\": \"Santa Cruz de Tenerife\",\r\n            \"short_name\": \"Santa Cruz de Tenerife\",\r\n            \"types\": [\r\n              \"locality\",\r\n              \"political\"\r\n            ]\r\n          },\r\n          {\r\n            \"long_name\": \"Santa Cruz de Tenerife\",\r\n            \"short_name\": \"TF\",\r\n            \"types\": [\r\n              \"administrative_area_level_2\",\r\n              \"political\"\r\n            ]\r\n          },\r\n          {\r\n            \"long_name\": \"Canary Islands\",\r\n            \"short_name\": \"CN\",\r\n            \"types\": [\r\n              \"administrative_area_level_1\",\r\n              \"political\"\r\n            ]\r\n          },\r\n          {\r\n            \"long_name\": \"Spain\",\r\n            \"short_name\": \"ES\",\r\n            \"types\": [\r\n              \"country\",\r\n              \"political\"\r\n            ]\r\n          }\r\n        ],\r\n        \"formatted_address\": \"Santa Cruz de Tenerife, Spain\",\r\n        \"geometry\": {\r\n          \"bounds\": {\r\n            \"northeast\": {\r\n              \"lat\": 28.487616,\r\n              \"lng\": -16.2356646\r\n            },\r\n            \"southwest\": {\r\n              \"lat\": 28.4280248,\r\n              \"lng\": -16.3370045\r\n            }\r\n          },\r\n          \"location\": {\r\n            \"lat\": 28.4636296,\r\n            \"lng\": -16.2518467\r\n          },\r\n          \"location_type\": \"APPROXIMATE\",\r\n          \"viewport\": {\r\n            \"northeast\": {\r\n              \"lat\": 28.487616,\r\n              \"lng\": -16.2356646\r\n            },\r\n            \"southwest\": {\r\n              \"lat\": 28.4280248,\r\n              \"lng\": -16.3370045\r\n            }\r\n          }\r\n        },\r\n        \"place_id\": \"ChIJcUElzOzMQQwRLuV30nMUEUM\",\r\n        \"types\": [\r\n          \"locality\",\r\n          \"political\"\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n]\r\n<\/code><\/pre>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">There is a lot of information here and maybe you are only interested in getting the coordinates of the identified address. It\u2019s easy to do. You just treat the result of the cURL function like any other JSON object:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">SELECT CURL(&#8220;GET&#8221;,&#8221;https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json&#8221;, {&#8220;data&#8221;:&#8221;address=santa+cruz&amp;components=country:ES&amp;key=YOUR_API_KEY&#8221;}).results[0].geometry ;<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">And this will return just what you wanted:<\/span><\/p>\n<pre><code>\r\n[\r\n  {\r\n    \"geometry\": {\r\n      \"bounds\": {\r\n        \"northeast\": {\r\n          \"lat\": 28.487616,\r\n          \"lng\": -16.2356646\r\n        },\r\n        \"southwest\": {\r\n          \"lat\": 28.4280248,\r\n          \"lng\": -16.3370045\r\n        }\r\n      },\r\n      \"location\": {\r\n        \"lat\": 28.4636296,\r\n        \"lng\": -16.2518467\r\n      },\r\n      \"location_type\": \"APPROXIMATE\",\r\n      \"viewport\": {\r\n        \"northeast\": {\r\n          \"lat\": 28.487616,\r\n          \"lng\": -16.2356646\r\n        },\r\n        \"southwest\": {\r\n          \"lat\": 28.4280248,\r\n          \"lng\": -16.3370045\r\n        }\r\n      }\r\n    }\r\n  }\r\n]\r\n<\/code><\/pre>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">While this is quite nice, there is currently no link with your data. Let\u2019s pretend you have a document with an address but no geo coordinates. You can now add those coordinates with the following N1QL query:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">UPDATE<\/span><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">travel-sample<\/span><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">USE KEYS &#8220;myDocumentWithoutCoordinates&#8221; SET geo = CURL(&#8220;GET&#8221;,&#8221;https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json&#8221;, {&#8220;data&#8221;:&#8221;address=santa+cruz&amp;components=country:ES&amp;key=YOUR_API_KEY&#8221;}).results[0].geometry returning *<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">And now you just modified an existing document based on an external service with a N1QL query :)<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Here\u2019s another example. Same FTS query than before but as the FROM clause of a N1QL query:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">SELECT result.total_hits, array_length(result.hits) FROM curl(&#8220;POST&#8221;,&#8221;https:\/\/localhost:8094\/api\/index\/beer\/query&#8221;,{ &#8220;header&#8221;:&#8221;Content-Type: application\/json&#8221;, &#8220;data&#8221;:{&#8220;explain&#8221;:true,&#8221;fields&#8221;: [&#8220;*&#8221;],&#8221;highlight&#8221;: {},&#8221;query&#8221;: {&#8220;query&#8221;: &#8220;pale ale&#8221;}} }) result;<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">And this will give you:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">[ { &#8220;$1&#8221;: 10, &#8220;total_hits&#8221;: 3815 } ]<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Now you know that you can run a Fulltext search (or any call to any URL that returns JSON) and use all the goodness that is N1QL to get a nice projection on that JSON data. In a way this allow us to integrate FTS with N1QL. Since you can use cURL in a FROM clause than you can for instance JOIN the result to a bucket.<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Here\u2019s another example in that spirit, using our traditional beer-sample containing beers and brewery document. First we transform the previous query to get the list of IDs for the documents containing \u201cpale ale\u201d:<\/span><\/p>\n<pre><code>\r\nSELECT hit.id FROM \r\n  curl(\"POST\",\"https:\/\/localhost:8094\/api\/index\/beer\/query\",\r\n    {\"header\":\"Content-Type: application\/json\",\r\n    \"data\":{\"explain\":true,\"fields\": [\"*\"],\"highlight\": {},\"query\": {\"query\": \"pale ale\"}}\r\n    }) result \r\n  UNNEST result.hits AS hit\r\n\r\n[\r\n  {\r\n    \"id\": \"stone_brewing_co-stone_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"sierra_nevada_brewing_co-sierra_nevada_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"yards_brewing-yards_philadelphia_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"cooper_s_cave_ale_company-cooper_s_cave_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"tommyknocker_brewery_and_pub-pick_axe_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"bell_s_brewery_inc-pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"flying_dog_brewery-classic_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"appalachian_brewing_company-hoppy_trails_india_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"mogollon_brewing_company-superstition_pale_ale\"\r\n  },\r\n  {\r\n    \"id\": \"the_church_brew_works-pipe_organ_pale_ale\"\r\n  }\r\n]\r\n<\/code><\/pre>\n<p><span style=\"font-size: 14px;font-family: Verdana;color: #333333;background-color: transparent;vertical-align: baseline\">To learn more about this FTS query and what you can generally do with FTS REST API, please refer to the <\/span><a style=\"text-decoration: none\" href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/rest-api\/rest-fts.html\"><span style=\"font-size: 14px;font-family: Verdana;color: #1155cc;background-color: transparent;text-decoration: underline;vertical-align: baseline\">current documentation<\/span><\/a><span style=\"font-size: 14px;font-family: Verdana;color: #333333;background-color: transparent;vertical-align: baseline\">.<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Now we have a list of document IDs from FTS we can join on easily:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">SELECT beers.* FROM curl(&#8220;POST&#8221;,&#8221;https:\/\/localhost:8094\/api\/index\/beer\/query&#8221;, {&#8220;header&#8221;:&#8221;Content-Type: application\/json&#8221;, &#8220;data&#8221;:{&#8220;explain&#8221;:true,&#8221;fields&#8221;: [&#8220;*&#8221;],&#8221;highlight&#8221;: {},&#8221;query&#8221;: {&#8220;query&#8221;: &#8220;pale ale&#8221;}} }) result UNNEST result.hits AS hit JOIN beer-sample beers ON KEYS hit.id<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">How cool is that? But then you don\u2019t have to limit yourself to query Couchbase, you can use external sources. Here\u2019s another example. You will find lots of interesting JSON datasets on <\/span><a style=\"text-decoration: none\" href=\"https:\/\/catalog.data.gov\/dataset?res_format=JSON&amp;_res_format_limit=0\"><span style=\"font-size: 14px;font-family: Georgia;color: #a0aabf;text-decoration: underline;vertical-align: baseline\">catalog.data.gouv<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">. You can for instance look at the <\/span><a style=\"text-decoration: none\" href=\"https:\/\/data.cityofnewyork.us\/api\/views\/25th-nujf\/rows.json?accessType=DOWNLOAD\"><span style=\"font-size: 14px;font-family: Georgia;color: #a0aabf;text-decoration: underline;vertical-align: baseline\">Most Popular Baby Names by Sex and Mother\u2019s Ethnic Group in New York City<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">. It\u2019s a big JSON file, lots of rows, 13962 rows as you can learn running:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">SELECT count(row) FROM CURL(&#8220;GET&#8221;,&#8221;https:\/\/data.cityofnewyork.us\/api\/views\/25th-nujf\/rows.json?accessType=DOWNLOAD&#8221;) result UNNEST result.data AS row<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">And if you want a top 10 of the given name, you can run the following query:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">SELECT row FROM CURL(&#8220;GET&#8221;,&#8221;https:\/\/data.cityofnewyork.us\/api\/views\/25th-nujf\/rows.json?accessType=DOWNLOAD&#8221;) result UNNEST result.data AS row ORDER BY TONUMBER(row[13]) ASC, TONUMBER(row[12]) DESC LIMIT 10<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">It seems that Jayden and Isabella are very popular name in New York these days :)<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">From those examples you can see that the query Language N1QL is an innovative way to figure out what\u2019s inside a big JSON file. You can basically map a JSON endpoint to a Database :) And of course there are other possibilities we have not touched yet like using JOINs across a Couchbase bucket and a JSON endpoint.<\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 4pt\"><span style=\"font-size: 22.6667px;font-family: Arial;color: #373d49;vertical-align: baseline\">Documentation<\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Now we don\u2019t support every cURL features. It should however cover the basics and be usable right now. Here\u2019s the list of options we support so far. The curl function takes up to three parameters:<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">1 &#8211; The first parameter is the HTTP verb used. So far we support \u201cGET\u201d and \u201cPOST\u201d.<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">2 &#8211; The second parameter is the endpoint URL<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">3 &#8211; The third parameter represents different cURL options.<\/span><\/p>\n<h3 dir=\"ltr\" style=\"line-height: 1.38;margin-top: 14pt;margin-bottom: 4pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Security Options<\/span><\/h3>\n<div dir=\"ltr\" style=\"margin-left: 0pt\">\n<table style=\"border: none\">\n<tbody>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Option<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Description<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">value<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">user<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Server user and password<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">USERNAME[:PASSWORD]<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">basic<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Use HTTP Basic Authentication<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">&#8212;<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">insecure \u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Allow connections to SSL sites without certs (H)<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">&#8212;<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">anyauth<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">curl to figure out authentication method by itself, and use the most secure one (In our case this will be basic only for now. Eventually we will support digest)<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">&#8212;<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 dir=\"ltr\" style=\"line-height: 1.38;margin-top: 14pt;margin-bottom: 4pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Other Transfer-Related Options<\/span><\/h3>\n<div dir=\"ltr\" style=\"margin-left: 0pt\">\n<table style=\"border: none\">\n<tbody>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Option<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Description<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">value<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">connect-timeout<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Maximum time allowed for connection<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">SECONDS<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">max-time<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Maximum time allowed for the transfer<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">SECONDS<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">data \u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">HTTP POST data (H)<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">DATA<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">header \u00a0\u00a0<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Pass custom header LINE to server (H)<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">LINE<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">show-error<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Show error. With -s, make CURL() show errors when they occur<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\"><\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">silent<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Silent mode (don&#8217;t output anything)<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">&#8212;<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">max-redirs \u00a0<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Maximum number of redirects allowed (H)<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">NUM<\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 0px\">\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">keepalive-time<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">Wait SECONDS between keepalive probes<\/span><\/p>\n<\/td>\n<td style=\"vertical-align: top;padding: 7px 7px 7px 7px;border: solid #000000 1px\">\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 17.3333px;font-family: Georgia;color: #373d49;vertical-align: baseline\">SECONDS<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38;margin-top: 0pt;margin-bottom: 0pt\"><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">We would love to hear what you think about this feature. How would you use this? Is there anything missing? We are waiting for your comments below.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is cURL? Ever heard of cURL? It\u2019s a famous command line tool for sending\/receiving data using URL syntax, says wikipedia here. Let\u2019s start with an example related to Couchbase. The N1QL query service is available through a REST API. [&hellip;]<\/p>\n","protected":false},"author":49,"featured_media":2549,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[2165,1812],"tags":[],"ppma_author":[9023],"class_list":["post-2507","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-full-text-search","category-n1ql-query"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Couchbase Developer Release - Put some cURL in your N1QL - The Couchbase Blog<\/title>\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.couchbase.com\/blog\/developer-release-curl-n1ql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase Developer Release - Put some cURL in your N1QL\" \/>\n<meta property=\"og:description\" content=\"What is cURL? Ever heard of cURL? It\u2019s a famous command line tool for sending\/receiving data using URL syntax, says wikipedia here. Let\u2019s start with an example related to Couchbase. The N1QL query service is available through a REST API. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-08T12:50:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-09T14:10:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1434\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Laurent Doguin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ldoguin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"unstructured.io\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\"},\"author\":{\"name\":\"Laurent Doguin\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e\"},\"headline\":\"Couchbase Developer Release &#8211; Put some cURL in your N1QL\",\"datePublished\":\"2017-02-08T12:50:16+00:00\",\"dateModified\":\"2025-10-09T14:10:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\"},\"wordCount\":1161,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg\",\"articleSection\":[\"Full-Text Search\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\",\"name\":\"Couchbase Developer Release - Put some cURL in your N1QL - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg\",\"datePublished\":\"2017-02-08T12:50:16+00:00\",\"dateModified\":\"2025-10-09T14:10:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg\",\"width\":2048,\"height\":1434,\"caption\":\"NoSql Database\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase Developer Release &#8211; Put some cURL in your N1QL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e\",\"name\":\"Laurent Doguin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/12929ce99397769f362b7a90d6b85071\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g\",\"caption\":\"Laurent Doguin\"},\"description\":\"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase.\",\"sameAs\":[\"https:\/\/x.com\/ldoguin\"],\"honorificPrefix\":\"Mr\",\"birthDate\":\"1985-06-07\",\"gender\":\"male\",\"award\":[\"Devoxx Champion\",\"Couchbase Legend\"],\"knowsAbout\":[\"Java\"],\"knowsLanguage\":[\"English\",\"French\"],\"jobTitle\":\"Director Developer Relation & Strategy\",\"worksFor\":\"Couchbase\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/laurent-doguin\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Couchbase Developer Release - Put some cURL in your N1QL - The Couchbase Blog","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.couchbase.com\/blog\/developer-release-curl-n1ql\/","og_locale":"en_US","og_type":"article","og_title":"Couchbase Developer Release - Put some cURL in your N1QL","og_description":"What is cURL? Ever heard of cURL? It\u2019s a famous command line tool for sending\/receiving data using URL syntax, says wikipedia here. Let\u2019s start with an example related to Couchbase. The N1QL query service is available through a REST API. [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-02-08T12:50:16+00:00","article_modified_time":"2025-10-09T14:10:44+00:00","og_image":[{"width":2048,"height":1434,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg","type":"image\/jpeg"}],"author":"Laurent Doguin","twitter_card":"summary_large_image","twitter_creator":"@ldoguin","twitter_misc":{"Written by":"unstructured.io","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/"},"author":{"name":"Laurent Doguin","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e"},"headline":"Couchbase Developer Release &#8211; Put some cURL in your N1QL","datePublished":"2017-02-08T12:50:16+00:00","dateModified":"2025-10-09T14:10:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/"},"wordCount":1161,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg","articleSection":["Full-Text Search","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/","url":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/","name":"Couchbase Developer Release - Put some cURL in your N1QL - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg","datePublished":"2017-02-08T12:50:16+00:00","dateModified":"2025-10-09T14:10:44+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/shutterstock_568785541.jpg","width":2048,"height":1434,"caption":"NoSql Database"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase Developer Release &#8211; Put some cURL in your N1QL"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e","name":"Laurent Doguin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/12929ce99397769f362b7a90d6b85071","url":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","caption":"Laurent Doguin"},"description":"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase.","sameAs":["https:\/\/x.com\/ldoguin"],"honorificPrefix":"Mr","birthDate":"1985-06-07","gender":"male","award":["Devoxx Champion","Couchbase Legend"],"knowsAbout":["Java"],"knowsLanguage":["English","French"],"jobTitle":"Director Developer Relation & Strategy","worksFor":"Couchbase","url":"https:\/\/www.couchbase.com\/blog\/author\/laurent-doguin\/"}]}},"authors":[{"term_id":9023,"user_id":49,"is_guest":0,"slug":"laurent-doguin","display_name":"Laurent Doguin","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","author_category":"","last_name":"Doguin","first_name":"Laurent","job_title":"","user_url":"","description":"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2507"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2507\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/2549"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2507"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}