Skip to main content

Delete a branch

This method deletes a branch and all its segments.

URL

CODE
(DELETE) /api/apps/wbflex/documents/{id}/branches/delete

PARAMETERS

The URL parameters are:

id

Specify the Flex container ID

string, Mandatory

The BODY must be a JSON object with these properties:

branch

The branch to delete.

string, Mandatory

callback

Specify a URL which will be called upon success or failure of operation. This makes polling for operation status unnecessary. See Callbacks (with asynchronous operations)

object, Optional

RESULTS

The operation is asynchronous and may take a few seconds to complete. The method returns an Asynchronous operation result:

CODE
{
  "trm": {
    "requestid":32230,
    "status":"Waiting",
    "statusText":"Waiting..."
  }
}

Specify the callback in the payload to be automatically notified of completion. Otherwise you need to poll the operation for completion (until status = “Finished”). When finished (or via the callback) you obtain the results as a JSON:

CODE
{
    "trm": { ... }
    "custom": {
        "segments": 5690,
        "error": null
    }
}

The result provides an indication of how many segments were updated by the script.

  • total: Total segments in branch.

  • deleted: Total segments successfully deleted. Should be same as the total.

  • error: A message if the delete fails. For example, if the branch has no segments (and thus is considered to not exist).

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.