Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-40315

Document Function pause and resume in REST API

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5.1, 6.6.0
    • Component/s: eventing
    • Labels:
      None
    • Story Points:
      1

      Description

      Right now pause and resume are APIs the server supports, but based on discussion those are missing from the official rest api docs and should be added for completeness.

        Attachments

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

          Activity

          daschl Michael Nitschinger created issue -
          Hide
          jon.strabala Jon Strabala added a comment - - edited

          Refer to https://github.com/couchbase/docs-server/pull/1393 should be fixed in the primary docs soon.  This was only to add a description of pause via the currently documented method

          curl -XPOST -d '{"deployment_status":true,"processing_status":false}' http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/settings
          

          not to add the undocumneted endpoints of /api/v1/functions/test/{pause,resume,undeploy,deploy}

          Show
          jon.strabala Jon Strabala added a comment - - edited Refer to  https://github.com/couchbase/docs-server/pull/1393  should be fixed in the primary docs soon.  This was only to add a description of pause via the currently documented method curl -XPOST -d '{"deployment_status":true,"processing_status":false}' http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/settings not to add the undocumneted endpoints of /api/v1/functions/test/{pause,resume,undeploy,deploy}
          jeelan.poola Jeelan Poola made changes -
          Field Original Value New Value
          Fix Version/s Cheshire-Cat [ 15915 ]
          Hide
          jon.strabala Jon Strabala added a comment -

          Note the following seems to work for 7.0.0, 6.5.1, and 6.5.0 (doesn't seem to be supported for 6.0.4) none of them are documented

          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/pause
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/resume
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/undeploy
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/deploy

          the above is a lot cleaner than the currently documented method(s) for example deploy

          curl -XPOST -d '{"deployment_status":true,"processing_status":true}' http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/settings

          It seems like for 6.5.0+ we should also make the preferred method to change a function's state to /api/v1/functions/test/{pause,resume,undeploy,deploy}
          and put a deprecation statement concerning the  '{"deployment_status":<boolean>,"processing_status":<boolean>}' methods

           

          Show
          jon.strabala Jon Strabala added a comment - Note the following seems to work for 7.0.0, 6.5.1, and 6.5.0 (doesn't seem to be supported for 6.0.4) none of them are documented curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/pause curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/resume curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/undeploy curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/deploy the above is a lot cleaner than the currently documented method(s) for example deploy curl -XPOST -d '{"deployment_status":true,"processing_status":true}' http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/settings It seems like for 6.5.0+ we should also make the preferred method to change a function's state to /api/v1/functions/test/{pause,resume,undeploy,deploy} and put a deprecation statement concerning the  '{"deployment_status":<boolean>,"processing_status":<boolean>}' methods  
          jon.strabala Jon Strabala made changes -
          Comment [ Note the following seems to work for 7.0.0, 6.5.1, and 6.5.0 (doesn't seem to be supported for 6.0.4) none of them are documented
          {noformat}
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/pause
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/resume
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/undeploy
          curl -XPOST http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/deploy{noformat}
          the above is a lot cleaner than the currently documented method(s) for example deploy
          {noformat}
          curl -XPOST -d '{"deployment_status":true,"processing_status":true}' http://Administrator:password@192.168.3.150:8096/api/v1/functions/test/settings{noformat}
          It seems like for 6.5.0+ we should also make the preferred method to change a function's state to /api/v1/functions/test/\{pause,resume,undeploy,deploy}
          and put a deprecation statement concerning the  '\{"deployment_status":<boolean>,"processing_status":<boolean>}' methods

            ]
          jeelan.poola Jeelan Poola made changes -
          Assignee Jeelan Poola [ jeelan.poola ] Jon Strabala [ jon.strabala ]
          Hide
          jon.strabala Jon Strabala added a comment - - edited

          Updated documents for both 6.5 and 6.6 

          https://github.com/couchbase/docs-server/pull/1641 for 6.5 docs
          https://github.com/couchbase/docs-server/pull/1642 for 6.6 docs

          Show
          jon.strabala Jon Strabala added a comment - - edited Updated documents for both 6.5 and 6.6  https://github.com/couchbase/docs-server/pull/1641  for 6.5 docs https://github.com/couchbase/docs-server/pull/1642  for 6.6 docs
          Hide
          jon.strabala Jon Strabala added a comment -

          Tested and documented

          Show
          jon.strabala Jon Strabala added a comment - Tested and documented
          jon.strabala Jon Strabala made changes -
          Fix Version/s Cheshire-Cat [ 15915 ]
          Fix Version/s 6.5.1 [ 16622 ]
          Fix Version/s 6.6.0 [ 16787 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]

            People

            Assignee:
            jon.strabala Jon Strabala
            Reporter:
            daschl Michael Nitschinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty