Showing results for 
Search instead for 
Did you mean: 

Create project from AI catalog using the R API

Create project from AI catalog using the R API

Hi All,


I’m trying to create a project from a dataset in the AI catalog trough the R API and I was wondering if someone has done it before.


I have previously used Dataset.get and Project.create_from_dataset in Python but I cannot seem to find the corresponding functions in R.


The function SetupProject in R doesn’t work with the dataset id from the AI catalog.


Has someone passed through this process and is it possible to create a project from data in the AI catalog using the R API?



Labels (1)
4 Replies

SetupProjectFromDataSource seems equivalent to the python create_from_dataset 

However I haven't been able to get it to work yet : / 



Hi Ira,


Thanks! I think this is exactly what I am looking for. Unfortunately, the function doesn't work for me as well 😕

0 Kudos

I kept running into the same issue, and my workaround was just using the REST API via the `httr` package. Not perfect, but if doing it programmatically is important then it gets the job done without you needing to download the data. Here is an example:

# Load packages

endpoint <- ""
token <- "Your Token"

ConnectToDataRobot(endpoint=endpoint, token=token)

get.url <- function(endpoint, id) {
  paste0(endpoint, "/datasets/", id, "/file/")

make.GET <- function(endpoint, id, token) {
  response <- GET(
    get.url(endpoint, id),
      "Accept" = "text/csv",
      "Authorization" = paste0("Bearer ", token)
} <- "ID from AI Catalog" <- "Project Name"

response <- make.GET(endpoint,, token)
content <- content(response, "text")
data <- read.csv(text=content) %>% as_tibble()

project <- SetupProject(
   dataSource = data,
   projectName =
0 Kudos

Thanks for this code. 😎

0 Kudos