api_project_create: Create a project

View source: R/api_projects.R

api_project_createR Documentation

Create a project

Description

Create a project and become manager of it. This is reserved to users with the permission to create projects; this is not the case of the default API user, for security reasons.

Usage

api_project_create(title, visible = TRUE, clone_of_id = 0)

Arguments

title

string, the project title.

visible

boolean, when TRUE, the project is visible by all users.

clone_of_id

internal, numeric id of a project to clone as a new one. By default it does not clone anything.

Value

The numeric id of the newly created project.

See Also

Other projects: api_project_delete(), api_project_update(), api_projects_filter(), api_project()

Examples

## Not run: 
# log in as a user with the permission to create a project
api_login("your@email", "your_password")
# create a project
project_id <- api_project_create("Test project through the API", visible=FALSE)
# get its URL
paste0(sub("api", "prj", api_url()), project_id)
# list it through the API
api_projects_filter("through the API")
# then delete it
api_project_delete(project_id)
api_projects_filter("through the API")

## End(Not run)

jiho/ecotaxar documentation built on Jan. 16, 2024, 12:26 a.m.