User¶
All URIs are relative to https://api.ubiops.com/v2.1
Method | HTTP request | Description |
---|---|---|
user_create | POST /user | Create a new user |
user_delete | DELETE /user | Delete user |
user_create¶
user_create(data)
Create a new user
Description¶
Create a new user with the given details. After creation, an email is send to the email address to activate the account. The user is required to accept the terms and conditions. The password needs to be at least 8 characters long.
Required Parameters¶
email
: Email of the userpassword
: Password of the userterms_conditions
: A boolean indicating whether the user accepts terms and conditions
Optional Parameters¶
name
: Name of the usersurname
: Surname of the usernewsletter
: A boolean indicating whether to subscribe to the newsletters
Request Examples¶
{
"email": "[email protected]",
"password": "secret-password",
"name": "User name",
"surname": "User surname",
"terms_conditions": true,
"newsletter": false
}
{
"email": "[email protected]",
"password": "secret-password",
"terms_conditions": true,
"newsletter": false
}
Response Structure¶
Details of the created user
email
: Email of the username
: Name of the usersurname
: Surname of the user
Response Examples¶
{
"email": "[email protected]",
"name": "User name",
"surname": "User surname"
}
Example¶
data <- list(
email = "email",
password = "password",
name = "name", # (optional)
surname = "surname", # (optional)
terms_conditions = FALSE,
newsletter = FALSE # (optional)
)
# Use environment variables
Sys.setenv("UBIOPS_API_TOKEN" = "YOUR API TOKEN")
result <- ubiops::user_create(
data
)
# Or provide directly
result <- ubiops::user_create(
data,
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.
user_delete¶
user_delete()
Delete user
Description¶
Delete the user that makes the request
Example¶
# Use environment variables
Sys.setenv("UBIOPS_API_TOKEN" = "YOUR API TOKEN")
ubiops::user_delete()
# Or provide directly
ubiops::user_delete(
UBIOPS_API_TOKEN = "YOUR API TOKEN"
)
# 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.