A newer version of this documentation is available.

View Latest

Delete a Plan

      +
      The Backup Service API allows plans to be deleted.

      HTTP Method and URI

      DELETE /plan/<plan-id>

      Description

      Deletes a specified plan. Note that the plan cannot be currently in use by any repository.

      Curl Syntax

      curl -X DELETE http://<backup-node-ip-address-or-domain-name>:8097/plan/<plan-id>
        -u <username>:<password>

      The plan-id must be the id of a plan currently defined on the cluster. The username and password must identify an administrator with the Full Admin role.

      Responses

      Success returns 200 OK. If the specified plan cannot be found, or if the URI is otherwise incorrectly specified, 404 Object Not Found is returned. If the specified plan is currently in use by one or more repositories, 400 Bad Request is returned, with a message such as the following: {"status":400,"msg":"cannot update plan as it is in use by repository: hourlyBackupRepo"}. If an internal server error prevents deletion of the plan, 500 Internal Server Error is returned.

      Failure to authenticate returns 401 Unauthorized.

      Examples

      The following call deletes a plan named testPlan2, which is currently used by no repository.

      curl -v -X DELETE http://127.0.0.1:8097/api/v1/plan/testPlan2 \
      -u Administrator:password

      Success returns 200 OK.

      See Also

      An overview of the Backup Service is provided in Backup Service. A step-by-step guide to using Couchbase Web Console to configure and use the Backup Service is provided in Manage Backup and Restore. For information on creating plans, see Create and Edit Plans.