Learn R Programming

sevenbridges (version 1.2.4)

Auth-class: Class Auth

Description

Auth token object

get Token from config files and option list

Read Auth config file to options

Usage

getToken(platform = NULL, username = NULL)
updateAuthList()

Arguments

platform
which platform you are using, by default it is cgc platform, it tries to search your .sbg.auth.yml file to parse platform id your deinfed there.
username
username defined in .sbg.auth.yml file

Value

a token string.

Fields

token
[character] your auth token.
url
[character] basic url used for API, by default it's https://api.sbgenomics.com/1.1/
version
url version number
platform
which platform you are using, by default it is cgc platform, it tries to search your .sbg.auth.yml file to parse platform id your deinfed there.
fs
FS object, for mount and unmount file system.

Methods

api(..., limit = getOption("sevenbridges")$limit, offset = getOption("sevenbridges")$offset, complete = FALSE)
This call returns all API paths, and pass arguments to api() function and input token and url automatically
billing(id = NULL, breakdown = FALSE, ...)
if no id provided, This call returns a list of paths used to access billing information via the API. else, This call lists all your billing groups, including groups that are pending or have been disabled. if breakdown = TRUE, This call returns a breakdown of spending per-project for the billing group specified by billing_group. For each project that the billing group is associated with, information is shown on the tasks run, including their initiating user (the runner), start and end times, and cost.
file(name = NULL, id = NULL, project = NULL, exact = FALSE, detail = FALSE, metadata = list(), origin.task = NULL, ...)
This call returns a list of all files in a specified project that you can access. For each file, the call returns: 1) Its ID 2) Its filename The project is specified as a query parameter in the call.
invoice(id = NULL, ...)
no id provided, This call returns a list of invoices, with information about each, including whether or not the invoice is pending and the billing period it covers. The call returns information about all your available invoices, unless you use the query parameter bg_id to specify the ID of a particular billing group, in which case it will return the invoice incurred by that billing group only. if id provided, This call retrieves information about a selected invoice, including the costs for analysis and storage, and the invoice period.
project(name = NULL, id = NULL, index = NULL, ignore.case = TRUE, exact = FALSE, owner = NULL, detail = FALSE, ...)
If no id or name provided, this call returns a list of all projects you are a member of. Each project's project_id and URL on the CGC will be returned. If name or id provided, we did a match search the list
project_new(name = NULL, billing_group_id = NULL, description = name, tags = list(), type = "v2", ...)
Create new projects, required parameters: name, billing_group_id, optional parameteres: tags and description, type.
project_owner(owner = NULL, ...)
List the projects owned by and accessible to a particular user. Each project's ID and URL will be returned.
rate_limit(...)
This call returns information about your current rate limit. This is the number of API calls you can make in one hour.
user(username = NULL, ...)
This call returns a list of the resources, such as projects, billing groups, and organizations, that are accessible to you. If you are not an administrator, this call will only return a successful response if username is replaced with your own username. If you are an administrator, you can replace username with the username of any CGC user, to return information on their resources.

Details

Every object could be requested from this Auth object and any action could start from this object using cascading style. Please check vignette 'easy-api' for more information.

Current config file is set on home directory with the name .sbg.auth.yml

Examples

Run this code
## replace it with real token
token <- "aef7e9e3f6c54fb1b338ac4ecddf1a56"
a <- Auth(token)

Run the code above in your browser using DataLab