create_users: Create users and add them to an ixplorer repository.

View source: R/create_users.R

create_usersR Documentation

Create users and add them to an ixplorer repository.

Description

This function automates the process of creating users and adding them as collaborators to a repository on ixplorer.

Usage

create_users(
  base_url,
  api_key,
  owner,
  repo,
  user_data_df,
  collaborator_permissions
)

Arguments

base_url

The base URL of the ixplorer server.

api_key

The API key for authentication on the ixplorer server.

owner

The owner (organization or user) of the repository where the users will be added as collaborators.

repo

The name of the repository where the users will be added as collaborators.

user_data_df

A data frame, each row containing user information (email, login_name, username).

collaborator_permissions

The permissions to be assigned to the collaborators ("Read", "Write", or "Admin").

Value

A data frame containing information about the created users.

Examples

## Not run: 
  # API configuration
  base_url <- "https://prueba.ixpantia.com"
  api_key <- "your_api_key" # Replace with your actual API key
  owner <- ""
  repo <- ""

   #User date in a data frame
   user_data_df <- data.frame(
   email = c("user@email.com", "user2@email.com"),
   login_name = c("User-1", "User-2"),
   username =  c("User-1", "User-2")
            )
  # Collaborator permissions to be added (Read, Write, or Admin)
  collaborator_permissions <- "Write"

  # Create users and add them to the repository with specific permissions
  results <- create_users(base_url, api_key, owner, repo, user_data_df,
  collaborator_permissions)
## End(Not run)

ixpantia/ixplorer documentation built on Jan. 3, 2024, 7:59 p.m.