item_rm: Remove item from SB

View source: R/item_rm.R

item_rmR Documentation

Remove item from SB

Description

Remove an item from ScienceBase. This is not reversible and will delete an item and its attached files. (advanced) Recursive is to be used with care and could result in unexpected file deletion.

Usage

item_rm(
  sb_id,
  ...,
  limit = 1000,
  recursive = FALSE,
  session = current_session()
)

Arguments

sb_id

An sbitem object or a character ScienceBase ID corresponding to the item

...

Additional parameters are passed on to GET, POST, HEAD, PUT, or DELETE

limit

The maximum number of child items to remove when called with recursive=TRUE.

recursive

logical, FALSE by default. CAUTION: setting recursive=TRUE means that not only will this item be deleted, but so will all its child items and their child items and so on.

session

Session object from authenticate_sb. Defaults to anonymous or last authenticated session

Value

httr response object

Examples

## Not run: 
res <- item_create(user_id(), "item-to-delete")
item_rm(res)

## End(Not run)

sbtools documentation built on May 1, 2023, 1:07 a.m.