{"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\/pt\/developer-release-curl-n1ql\/","title":{"rendered":"Vers\u00e3o para desenvolvedores do Couchbase - Coloque um pouco de cURL em seu 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\">O que \u00e9 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\">Voc\u00ea j\u00e1 ouviu falar em cURL? \u00c9 uma famosa ferramenta de linha de comando para enviar\/receber dados usando a sintaxe de URL, diz a 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\">aqui<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">. Vamos come\u00e7ar com um exemplo relacionado ao Couchbase. O servi\u00e7o de consulta N1QL est\u00e1 dispon\u00edvel por meio de uma API REST. Se voc\u00ea quiser executar uma consulta N1QL com o cURL, e supondo que o servi\u00e7o de consulta esteja ativado no localhost, ela ter\u00e1 a seguinte apar\u00eancia:<\/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 'statement=SELECT * FROM default LIMIT 1'<\/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\">Ou, se voc\u00ea quiser executar uma consulta de texto completo, fa\u00e7a algo como<\/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 \"Content-Type: application\/json\" https:\/\/localhost:8094\/api\/index\/beer\/query -d '{\"explain\": true, \"fields\": [\"*\"], \"highlight\": {}, \"query\": {\"query\": \"pale ale\"}}'<\/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\">No momento, n\u00e3o h\u00e1 nada espec\u00edfico sobre <a href=\"https:\/\/www.couchbase.com\/blog\/pt\/products\/n1ql\/\">N1QL<\/a>\u00e9 apenas um exemplo de chamada de API REST com cURL. Ent\u00e3o, por que esse t\u00edtulo? Bem, \u00e9 porque voc\u00ea pode chamar o cURL a partir de uma consulta N1QL.<\/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() em 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() \u00e9 uma nova fun\u00e7\u00e3o N1QL que permite acessar dados JSON externos em um ponto de extremidade remoto (geralmente HTTP(s)). Semelhante a outras fun\u00e7\u00f5es N1QL, essa fun\u00e7\u00e3o pode ser usada em v\u00e1rias express\u00f5es N1QL e em v\u00e1rias cl\u00e1usulas das consultas SELECT\/DML (proje\u00e7\u00e3o, where, from etc.). Quando usada na cl\u00e1usula from, a invoca\u00e7\u00e3o curl() deve resultar em um conjunto\/cole\u00e7\u00e3o de documentos JSON.<\/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\">Esse assunto j\u00e1 foi amplamente abordado em <\/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\">Convido voc\u00ea a l\u00ea-lo, assim como a muitos outros artigos da 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\">postagens<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\"> sobre o N1QL e escrito pela equipe do N1QL.<\/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\">Podemos come\u00e7ar, como qualquer pessoa faz ao experimentar um novo idioma, com um SELECT muito simples:<\/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(\"GET\", \"https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json\", {\"data\": \"address=santa+cruz&amp;components=country:ES&amp;key=YOUR_API_KEY\"});<\/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\">Isso lhe dar\u00e1 o seguinte resultado JSON:<\/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\">H\u00e1 muitas informa\u00e7\u00f5es aqui e talvez voc\u00ea esteja interessado apenas em obter as coordenadas do endere\u00e7o identificado. Isso \u00e9 f\u00e1cil de fazer. Basta tratar o resultado da fun\u00e7\u00e3o cURL como qualquer outro objeto JSON:<\/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(\"GET\", \"https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json\", {\"data\": \"address=santa+cruz&amp;components=country:ES&amp;key=YOUR_API_KEY\"}).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\">E isso retornar\u00e1 exatamente o que voc\u00ea queria:<\/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\">Embora isso seja muito bom, atualmente n\u00e3o h\u00e1 nenhum v\u00ednculo com seus dados. Vamos supor que voc\u00ea tenha um documento com um endere\u00e7o, mas sem coordenadas geogr\u00e1ficas. Agora voc\u00ea pode adicionar essas coordenadas com a seguinte consulta N1QL:<\/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\">ATUALIZA\u00c7\u00c3O<\/span><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">amostra de viagem<\/span><span style=\"font-size: 14px;font-family: Verdana;color: #c7254e;background-color: #f9f2f4;vertical-align: baseline\">USE KEYS \"myDocumentWithoutCoordinates\" SET geo = CURL(\"GET\", \"https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json\", {\"data\": \"address=santa+cruz&amp;components=country:ES&amp;key=YOUR_API_KEY\"}).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\">E agora voc\u00ea acabou de modificar um documento existente com base em um servi\u00e7o externo com uma consulta N1QL :)<\/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\">Aqui est\u00e1 outro exemplo. A mesma consulta FTS de antes, mas como a cl\u00e1usula FROM de uma consulta N1QL:<\/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(\"POST\", \"https:\/\/localhost:8094\/api\/index\/beer\/query\",{\"header\": \"Content-Type: application\/json\", \"data\":{\"explain\":true, \"fields\": [\"*\"], \"highlight\": {}, \"query\": {\"query\": \"pale ale\"}}} }) 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\">E isso lhe dar\u00e1:<\/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\">[ { \"$1\": 10, \"total_hits\": 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\">Agora voc\u00ea sabe que pode executar uma pesquisa de texto completo (ou qualquer chamada para qualquer URL que retorne JSON) e usar todas as vantagens do N1QL para obter uma boa proje\u00e7\u00e3o desses dados JSON. De certa forma, isso nos permite integrar o FTS ao N1QL. Como \u00e9 poss\u00edvel usar o cURL em uma cl\u00e1usula FROM, voc\u00ea pode, por exemplo, unir o resultado a um 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\">Aqui est\u00e1 outro exemplo com esse esp\u00edrito, usando nossa amostra tradicional de cerveja que cont\u00e9m cervejas e documentos de cervejarias. Primeiro, transformamos a consulta anterior para obter a lista de IDs dos documentos que cont\u00eam \"pale ale\":<\/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\">Para saber mais sobre essa consulta do FTS e o que voc\u00ea pode fazer em geral com a API REST do FTS, consulte a se\u00e7\u00e3o <\/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\">documenta\u00e7\u00e3o atual<\/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\">Agora temos uma lista de IDs de documentos do FTS que podemos usar facilmente:<\/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(\"POST\", \"https:\/\/localhost:8094\/api\/index\/beer\/query\", {\"header\": \"Content-Type: application\/json\", \"data\":{\"explain\":true, \"fields\": [\"*\"], \"highlight\": {}, \"query\": {\"query\": \"pale ale\"}}} }) 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\">N\u00e3o \u00e9 legal? Mas voc\u00ea n\u00e3o precisa se limitar a consultar o Couchbase, voc\u00ea pode usar fontes externas. Aqui est\u00e1 outro exemplo. Voc\u00ea encontrar\u00e1 muitos conjuntos de dados JSON interessantes em <\/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\">cat\u00e1logo.dados.gouv<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">. Voc\u00ea pode, por exemplo, dar uma olhada no <\/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\">Nomes de beb\u00eas mais populares por sexo e grupo \u00e9tnico da m\u00e3e na cidade de Nova York<\/span><\/a><span style=\"font-size: 14px;font-family: Georgia;color: #373d49;vertical-align: baseline\">. \u00c9 um arquivo JSON grande, com muitas linhas, 13962 linhas, como voc\u00ea pode ver na execu\u00e7\u00e3o:<\/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(\"GET\", \"https:\/\/data.cityofnewyork.us\/api\/views\/25th-nujf\/rows.json?accessType=DOWNLOAD\") 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\">E se voc\u00ea quiser um top 10 do nome fornecido, poder\u00e1 executar a seguinte consulta:<\/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(\"GET\", \"https:\/\/data.cityofnewyork.us\/api\/views\/25th-nujf\/rows.json?accessType=DOWNLOAD\") 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\">Parece que Jayden e Isabella s\u00e3o nomes muito populares em Nova York atualmente :)<\/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\">A partir desses exemplos, voc\u00ea pode ver que a linguagem de consulta N1QL \u00e9 uma maneira inovadora de descobrir o que h\u00e1 dentro de um grande arquivo JSON. Basicamente, voc\u00ea pode mapear um ponto de extremidade JSON para um banco de dados :) E, \u00e9 claro, h\u00e1 outras possibilidades que ainda n\u00e3o mencionamos, como o uso de JOINs em um bucket do Couchbase e um endpoint JSON.<\/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\">Documenta\u00e7\u00e3o<\/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\">Atualmente, n\u00e3o oferecemos suporte a todos os recursos do cURL. No entanto, ele deve cobrir o b\u00e1sico e ser utiliz\u00e1vel no momento. Aqui est\u00e1 a lista de op\u00e7\u00f5es que suportamos at\u00e9 o momento. A fun\u00e7\u00e3o curl recebe at\u00e9 tr\u00eas par\u00e2metros:<\/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 - O primeiro par\u00e2metro \u00e9 o verbo HTTP usado. At\u00e9 o momento, oferecemos suporte a \"GET\" e \"POST\".<\/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 - O segundo par\u00e2metro \u00e9 o URL do ponto de extremidade<\/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 - O terceiro par\u00e2metro representa diferentes op\u00e7\u00f5es de cURL.<\/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\">Op\u00e7\u00f5es de seguran\u00e7a<\/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\">Op\u00e7\u00e3o<\/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\">Descri\u00e7\u00e3o<\/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\">valor<\/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\">usu\u00e1rio<\/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\">Usu\u00e1rio e senha do servidor<\/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\">NOME DE USU\u00c1RIO[:SENHA]<\/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\">b\u00e1sico<\/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\">Usar autentica\u00e7\u00e3o b\u00e1sica de HTTP<\/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\">inseguro \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\">Permitir conex\u00f5es com sites SSL sem certificados (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 para descobrir o m\u00e9todo de autentica\u00e7\u00e3o por si s\u00f3 e usar o mais seguro (no nosso caso, ser\u00e1 apenas o b\u00e1sico por enquanto. Eventualmente, daremos suporte ao 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\">Outras op\u00e7\u00f5es relacionadas \u00e0 transfer\u00eancia<\/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\">Op\u00e7\u00e3o<\/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\">Descri\u00e7\u00e3o<\/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\">valor<\/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\">Tempo limite de conex\u00e3o<\/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\">Tempo m\u00e1ximo permitido para conex\u00e3o<\/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\">SEGUNDOS<\/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\">tempo m\u00e1ximo<\/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\">Tempo m\u00e1ximo permitido para a transfer\u00eancia<\/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\">SEGUNDOS<\/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\">dados \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\">Dados HTTP POST (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\">DADOS<\/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\">cabe\u00e7alho \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\">Passar LINE de cabe\u00e7alho personalizado para o servidor (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\">LINHA<\/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\">Mostrar erro. Com -s, fa\u00e7a com que CURL() mostre os erros quando eles ocorrerem<\/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\">silencioso<\/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\">Modo silencioso (n\u00e3o emite nada)<\/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\">M\u00e1ximo de vermelhos \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\">N\u00famero m\u00e1ximo de redirecionamentos permitidos (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\">N\u00daMERO<\/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\">Aguarde SEGUNDOS entre as sondas keepalive<\/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\">SEGUNDOS<\/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\">Gostar\u00edamos muito de saber o que voc\u00ea pensa sobre esse recurso. Como voc\u00ea o usaria? Est\u00e1 faltando alguma coisa? Estamos aguardando seus coment\u00e1rios abaixo.<\/span><\/p>","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>","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\/pt\/developer-release-curl-n1ql\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\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\/pt\/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 minutos\" \/>\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\":\"pt-BR\",\"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\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@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\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@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\":\"pt-BR\",\"@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\/pt\/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\/pt\/developer-release-curl-n1ql\/","og_locale":"pt_BR","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\/pt\/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 minutos"},"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":"pt-BR","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":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/developer-release-curl-n1ql\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@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":"Blog do Couchbase","description":"Couchbase, o banco de dados NoSQL","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":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"Blog do Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@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":"pt-BR","@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 \u00e9 um nerd metaleiro que mora em Paris. Em sua maior parte, ele escreve c\u00f3digo em Java e texto estruturado em AsciiDoc, e frequentemente fala sobre dados, programa\u00e7\u00e3o reativa e outras coisas que est\u00e3o na moda. Ele tamb\u00e9m foi Developer Advocate do Clever Cloud e do Nuxeo, onde dedicou seu tempo e experi\u00eancia para ajudar essas comunidades a crescerem e se fortalecerem. Atualmente, ele dirige as Rela\u00e7\u00f5es com Desenvolvedores na 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\/pt\/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 \u00e9 um nerd metaleiro que mora em Paris. Em sua maior parte, ele escreve c\u00f3digo em Java e texto estruturado em AsciiDoc, e frequentemente fala sobre dados, programa\u00e7\u00e3o reativa e outras coisas que est\u00e3o na moda. Ele tamb\u00e9m foi Developer Advocate do Clever Cloud e do Nuxeo, onde dedicou seu tempo e experi\u00eancia para ajudar essas comunidades a crescerem e se fortalecerem. Atualmente, ele dirige as Rela\u00e7\u00f5es com Desenvolvedores na Couchbase."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/2507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=2507"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/2507\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/2549"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=2507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=2507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=2507"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=2507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}