Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-5548

N1QL Rest API is missing the JSON API

    XMLWordPrintable

Details

    Description

      In the section explaining the rest api,
      this is shown:

      curl -v http://172.23.99.98:8093/query/service -d 'statement=SELECT meta().id FROM `travel-sample` WHERE type = "hotel" and meta().id LIKE $1 &args=["hotel_1002%25"]'

      however there is anohter way, via json property, just like the UI does.

      $ curl -v -H "Content-Type: application/json'"
      http://172.23.99.98:8093/query/service -d '"

      {statement":"SELECT meta().id FROM `travel-sample` WHERE type = 'hotel' and meta().id LIKE 'xx' "}

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            simon.dew Simon Dew
            roi.katz Roi Katz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty