I am trying create document in an existing bucket in CouchBase using N1QL query. I am using soapUI to send request to localhost CouchBase server. I used this link to gain knowledge http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-rest-api/index.html
N1QL:
GET http://localhost:8093/query/service?statement = ?select * from beer use keys ["beername::abcc"]
this works well to fetch doc
How can I do the same to post json data, creating new document.
I tried:
POST http://localhost:8093/query/service.
In request body
INSERT INTO `beer` ( KEY, VALUE )
VALUES
(
"k001",
{ "id": "01", "type": "airline"}
)
RETURNING META().id as docid, *;
I am getting
"Error processing json request"