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

Add documentation for endpoint `sampleBuckets/install`

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Unresolved
    • None
    • 6.5 Milestone 1
    • admin, rest
    • None
    • DOC-2020-S4-Mar08, DOC-2020-S5-Mar22
    • 1

    Description

      All of the information we have discussed in the documentation channel around adding documentation for this endpoint can be found in my initial post] and subsequent posts thereafter. 

      I'm new to Couchbase, I'm a developer advocate and one of the things I am doing is blindly following documentation trying to put together a full stack JavaScript application.
      The reason we do these exercises is because
      1. I have to learn the stuff somehow and learning the hard way is always the best way to commit to memory for me.
      2. More importantly, our customers and their developers have to take this path.
      One thing I can imagine a developer wanting to do is "Install the travel-sample bucket" using a Dockerfile and a configure.sh script and either curl or calling the cbdocloader. I chose the cbdocloader because it is what is mentioned on the Install Sample Buckets page:
      https://docs.couchbase.com/server/6.0/manage/manage-settings/install-sample-buckets.html
      and after scanning the entire documentation for REST Endpoints and not finding anything for installing buckets (with indexes preferably).
      https://docs.couchbase.com/server/current/rest-api/rest-intro.html
      I was informed in the #engineering channel that there is a REST endpoint,
      I would imagine that someone at some point had to create documentation for the endpoint:
      localhost:8091/sampleBuckets/install and how to use it. I have found several situations where I felt our endpoints did not have enough information for me (someone who is not familiar with Couchbase) to get their job done without asking someone here who is on the engineering team. Our customers typically do not have that luxury.
      I think we should create a ticket to get this added to the documentation. Can anyone point me to the right project in JIRA to create this ticket? Also I'm thinking of another ticket for the cbdocloader, because it doesnt install indexes only the data bucket. (edited)

      TLDR: When exploring the docs for API Endpoints, there is no documentation around the endpoint for adding example buckets, only a page that documents how to do it in the Couchbase Server UI and a command that one can use from `cbdocloader`, this can be found at:

      https://docs.couchbase.com/server/6.0/manage/manage-settings/install-sample-buckets.html

      I believe that we should have the restful endpoint documented on that page and a link to the API reference list where further and more documented version of this endpoint would be.

      Attachments

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

        Activity

          Added the slack post as our defect are public and lots of users do not have access to Slack.

          pvarley Patrick Varley added a comment - Added the slack post as our defect are public and lots of users do not have access to Slack.
          tony.hillman Tony Hillman added a comment -

          There are two endpoints to be documented here I think. The first is the one that retrieves the available sample buckets:

          $ curl -X GET -u Administrator:password http://10.143.194.101:8091/sampleBuckets/
          [\{"name":"beer-sample","installed":true,"quotaNeeded":104857600},\{"name":"gamesim-sample","installed":false,"quotaNeeded":104857600},\{"name":"travel-sample","installed":true,"quotaNeeded":104857600}]

          The second is the one that installs sample buckets from a specified list:

          curl -X POST -u Administrator:password http://localhost:8091/sampleBuckets/install -d '["travel-sample", "beer-sample"]'

          tony.hillman Tony Hillman added a comment - There are two endpoints to be documented here I think. The first is the one that retrieves the available sample buckets: $ curl -X GET -u Administrator:password  http://10.143.194.101:8091/sampleBuckets/ [\{"name":"beer-sample","installed":true,"quotaNeeded":104857600},\{"name":"gamesim-sample","installed":false,"quotaNeeded":104857600},\{"name":"travel-sample","installed":true,"quotaNeeded":104857600}] The second is the one that installs sample buckets from a specified list: curl -X POST -u Administrator:password  http://localhost:8091/sampleBuckets/install  -d ' ["travel-sample", "beer-sample"] '
          tony.hillman Tony Hillman added a comment - PR at  https://github.com/couchbase/docs-server/pull/1100
          tony.hillman Tony Hillman added a comment -

          Merged.

          tony.hillman Tony Hillman added a comment - Merged.

          People

            tony.hillman Tony Hillman
            eric.bishard Eric Bishard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 8h
                8h
                Remaining:
                Remaining Estimate - 8h
                8h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty