Skip to contents

This function creates a new subfolder inside a parent folder in a given repository using the repository name path to parent folder ID, e.g., path.

Usage

create_subfolder(
  name,
  path,
  folder_id = NULL,
  type = "Folder",
  url = getOption("integral_url"),
  ...
)

Arguments

name

A character string specifying the name of the subfolder to create in the remote Integral repository.

path

A character string specifying the path to the parent folder in an Integral repository.

folder_id

Optional character string representing the ID of the parent folder (UUID). This can be used as an alternative to path.

type

A character string specifying the type of subfolder to create. Defaults to "Folder". See get_folder_types for available folder types configured with your Integral account.

url

A character string representing the base URL of the Integral repository. Defaults to getOption("integral_url").

...

Additional arguments to include in the body of the request.

Value

A list where each element contains information from the response.

Details

The function makes an HTTP request to a predefined URL. The request includes a header with an encoded API key, and a data body. The response is then processed to create a new subfolder in a remote Integral repository.

Examples

if (FALSE) { # \dontrun{
create_subfolder(
 path = "R-Integral/Documents", 
 name = "new_folder"
)

create_subfolder(
 name = "My sub folder", 
 folder_id = "216a0cc7-b641-40be-8db1-b4bf126cbad7"
)
} # }