我尝试使用N1QL查询作为REST API端点来访问数据,但是得到了一个404错误。需要在couchbase服务器中配置什么才能支持N1Q1 Rest API吗
发布于 2019-10-17 00:15:04
The bucket name `travel-sample` has special characters so you need to use escaped identifier (back ticks).查询服务正在8093端口上运行,您还必须将REST API发送到8093端口。
你也可以试试这个。
curl -v http://localhost:8093/query/service -H "Content-Type: application/json" -d '{"statement":"select a.name,r.destinationairport,count(a.name) AS total_flights from `travel-sample` r join `travel-sample` a on keys r.airlineid where r.type = "route" and a.type="airline" group by r.destinationairport, a.name order by r.destinationairport", "creds":[{"user":"user","pass":"xxxx"}]}'https://stackoverflow.com/questions/58414582
复制相似问题