ohadinho
ohadinho

Reputation: 7144

Error using N1QL in Couchbase Server

I'm using Couchbase 4.0 community editionm and trying to perform simple N1QL operations in my couchbase server, using those GET requests:

simple "select 1" statement: http://localhost:8093/query?statement=SELECT%201

AND

http://localhost:8093/query?statement=SELECT%20*%20FROM%20cache

(where cache is my bucket name)

For any request i'm sending, I get the following error:

{
    "requestID": "30096327-05eb-4282-b170-7601f6118aac",
    "errors": [
        {
            "code": 1120,
            "msg": "Unsupported media type: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
        }
    ],
    "status": "fatal",
    "metrics": {
        "elapsedTime": "0",
        "executionTime": "0",
        "resultCount": 0,
        "resultSize": 0,
        "errorCount": 1
    }
}

What can be the issue ?

Upvotes: 1

Views: 447

Answers (1)

DaveR
DaveR

Reputation: 9640

It looks like your user agent (web browser?) is requesting a media type which isn't supported by the query engine - the user agent is requesting a variation of HTML.

Try using something like a command-line HTTP client (CuRL, wget etc).

Upvotes: 3

Related Questions