Skip to content

Getting Started

Please follow the installation procedure and then run the following. You will need to fill in your own API token (YOUR_API_TOKEN) and project name (YOUR_PROJECT_NAME). Documentation on creating an API token can be found here.

library(ubiops)

# 1) Use environment variables
Sys.setenv("UBIOPS_PROJECT" = "YOUR_PROJECT_NAME")
Sys.setenv("UBIOPS_API_TOKEN" = "YOUR_API_TOKEN")
result <- deployments_list()

# 2) Or provide directly
# result <- deployments_list(UBIOPS_PROJECT = "YOUR_PROJECT_NAME", UBIOPS_API_TOKEN = "YOUR_API_TOKEN")

print(result)

# Or print in JSON format
print(jsonlite::toJSON(result, auto_unbox=TRUE))

# The default API url is https://api.ubiops.com/v2.1
# Want to use a different API url? Provide `UBIOPS_API_URL`, either directly or as environment variable.