Apps {sevenbridges2}R Documentation

R6 Class representing apps endpoint

Description

R6 Class representing apps resource endpoint.

Super class

sevenbridges2::Resource -> Apps

Public fields

URL

List of URL endpoints for this resource.

Methods

Public methods

Inherited methods

Method new()

Create new Apps resource object.

Usage
Apps$new(...)
Arguments
...

Other response arguments.


Method query()

This call lists all the apps available to you.

Usage
Apps$query(
  project = NULL,
  visibility = c("private", "public"),
  query_terms = NULL,
  id = NULL,
  limit = getOption("sevenbridges2")$limit,
  offset = getOption("sevenbridges2")$offset,
  fields = "!raw",
  ...
)
Arguments
project

Project ID string in the form ⁠<project_owner>/<project_short_name>⁠ or
⁠<division_name>/<project_short_name>⁠ or Project object,
to restrict the results to apps from that project only.

visibility

Set this to public to see all public apps on the Seven Bridges Platform.

query_terms

Enter one or more search terms to query apps. Read more about how to use the query_terms parameter in our API documentation.

id

Use this parameter to query apps based on their ID.

limit

The maximum number of collection items to return for a single request. Minimum value is 1. The maximum value is 100 and the default value is 50. This is a pagination-specific attribute.

offset

The zero-based starting index in the entire collection of the first item to return. The default value is 0. This is a pagination-specific attribute.

fields

Selector specifying a subset of fields to include in the response. For querying apps it is set to return all fields except 'raw' which stores CWL in form of a list. Please be careful when setting to return all fields, since the execution of this API request could be time-consuming.

...

Other arguments that can be passed to core api() function.

Returns

Collection containing App objects.

Examples
\dontrun{
 apps_object <- Apps$new(
   auth = auth
 )

 # List public apps
 apps_object$query(visibility = "public")
}


Method get()

This call returns information about the specified app. The app should be one in a project that you can access; this could be an app that has been uploaded to the Seven Bridges Platform by a project member, or a publicly available app that has been copied to the project.
More about this operation you can find in our API documentation.

Usage
Apps$get(id, revision = NULL, ...)
Arguments
id

The full ⁠<project_id>/<app_short_name>⁠ path for this API call is known as App ID. You can also get the App ID for an app by making the call to list all apps available to you.

revision

The number of the app revision you want to get.

...

Other arguments that can be passed to core api() function like 'fields', etc.

Returns

App object.

Examples
\dontrun{
 apps_object <- Apps$new(
   auth = auth
 )

 # Get app object
 apps_object$get(id = "<some_id>")
}


Method copy()

This call copies the specified app to the specified project. The app should be one in a project that you can access; this could be an app that has been uploaded to the Seven Bridges Platform by a project member, or a publicly available app that has been copied to the project.

Usage
Apps$copy(
  app,
  project,
  name = NULL,
  strategy = c("clone", "direct", "clone_direct", "transient"),
  ...
)
Arguments
app

App object or the short name of the app you are copying. Optionally, to copy a specific revision of the app, use the ⁠<app_short_name>/<revision_number>⁠ format, for example rfranklin/my-project/bamtools-index-2-4-0/1

project

The Project object or project ID you want to copy the app to.

name

The new name the app will have in the target project. If its name will not change, omit this key.

strategy

The method for copying the app. Can be one of:

  • clone : copy all revisions; get updates from the same app as the copied app (default);

  • direct: copy latest revision; get updates from the copied app;

  • clone_direct: copy all revisions; get updates from the copied app;

  • transient: copy latest revision; get updates from the same app as the copied app.

Read more about the strategies here.

...

Other arguments that can be passed to core api() function like 'fields', etc.

Returns

Copied App object.

Examples
\dontrun{
 apps_object <- Apps$new(
   auth = auth
 )
 # Copy app object to a project
 apps_object$copy(app = app, project = project)
}


Method create()

This call allows you to add an app using raw CWL.

Usage
Apps$create(
  raw = NULL,
  from_path = NULL,
  project,
  name,
  raw_format = c("JSON", "YAML"),
  ...
)
Arguments
raw

The body of the request should be a CWL app description saved as a JSON or YAML file. For a template of this description, try making the call to get raw CWL for an app about an app already in one of your projects. Shouldn't be used together with from_path parameter.

from_path

File containing CWL app description. Shouldn't be used together with raw parameter.

project

String project ID or Project object in which you want to store the app.

name

A short name for the app (without any non-alphanumeric characters or spaces)

raw_format

The type of format used (JSON or YAML).

...

Other arguments that can be passed to core api() function like 'fields', etc.

Returns

App object.

Examples
\dontrun{
 apps_object <- Apps$new(
   auth = auth
 )

 # Create new app object
 apps_object$create(
  raw = raw,
  project = project,
  name = name,
  raw_format = "YAML"
 )
}


Method clone()

The objects of this class are cloneable with this method.

Usage
Apps$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `Apps$query`
## ------------------------------------------------

## Not run: 
 apps_object <- Apps$new(
   auth = auth
 )

 # List public apps
 apps_object$query(visibility = "public")

## End(Not run)


## ------------------------------------------------
## Method `Apps$get`
## ------------------------------------------------

## Not run: 
 apps_object <- Apps$new(
   auth = auth
 )

 # Get app object
 apps_object$get(id = "<some_id>")

## End(Not run)


## ------------------------------------------------
## Method `Apps$copy`
## ------------------------------------------------

## Not run: 
 apps_object <- Apps$new(
   auth = auth
 )
 # Copy app object to a project
 apps_object$copy(app = app, project = project)

## End(Not run)


## ------------------------------------------------
## Method `Apps$create`
## ------------------------------------------------

## Not run: 
 apps_object <- Apps$new(
   auth = auth
 )

 # Create new app object
 apps_object$create(
  raw = raw,
  project = project,
  name = name,
  raw_format = "YAML"
 )

## End(Not run)


[Package sevenbridges2 version 0.2.0 Index]