galaxy_delete_history: Generic for deleting a Galaxy history

galaxy_delete_historyR Documentation

Generic for deleting a Galaxy history

Description

galaxy_delete_history() is an S4 generic. With x as a character scalar, it is treated as a history ID and the function returns API response metadata. With x as a Galaxy object, history_id and galaxy_url are taken from the object and the object state is updated.

Usage

galaxy_delete_history(
  x,
  purge = FALSE,
  galaxy_url = "https://usegalaxy.eu",
  verbose = FALSE
)

## S4 method for signature 'character'
galaxy_delete_history(
  x,
  purge = FALSE,
  galaxy_url = "https://usegalaxy.eu",
  verbose = FALSE
)

## S4 method for signature 'Galaxy'
galaxy_delete_history(x, purge = FALSE, verbose = FALSE)

Arguments

x

A history ID (character) or a Galaxy object.

purge

Logical. If TRUE, request permanent deletion (purge). Default: FALSE.

galaxy_url

Character. Base URL of the Galaxy instance, used by the character method. If GALAXY_URL is set, it takes precedence.

verbose

Logical. If TRUE, print request status. Default: FALSE.

Details

The function calls DELETE /api/histories/{history_id} with optional purge=TRUE to request permanent removal (server policy permitting).

Value

  • For the character method: a named list with success, status, content.

  • For the Galaxy method: the modified Galaxy object (state set to "success" on 2xx, otherwise "error").

Examples


## Not run: 
# Character method
hid <- galaxy_initialize("history to delete")
galaxy_delete_history(hid, purge = FALSE)

# Galaxy method
g <- galaxy(history_name = "history to delete")
g <- galaxy_initialize(g)
g <- galaxy_delete_history(g, purge = FALSE)

## End(Not run)


GalaxyR documentation built on July 6, 2026, 5:08 p.m.