Apps | R Documentation |
R6 Class representing the apps resource endpoint.
sevenbridges2::Resource
-> Apps
URL
List of URL endpoints for this resource.
new()
Create a new Apps resource object.
Apps$new(...)
...
Other response arguments.
query()
This call lists all the apps available to you.
Apps$query( project = NULL, visibility = c("private", "public"), query_terms = NULL, id = NULL, limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, fields = "!raw", ... )
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
A list of search terms used to filter apps based on
their details. Each term is case-insensitive and can relate to the
app's name, label, toolkit, toolkit version, category, tagline, or
description.
You can provide a single term (e.g., list("Compressor")
) or multiple
terms (e.g., list("Expression", "Abundance")
) to search for apps
that match all the specified terms. If a term matches any part of the
app's details, the app will be included in the results.
Search terms can also include phrases
(e.g., list("Abundance estimates input")
), which will search for
exact matches within app descriptions or other fields.
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 as a list. Be cautious when requesting all fields, as this API request may take a long time to execute.
...
Other arguments that can be passed to core api()
function.
Collection
containing App
objects.
\dontrun{ apps_object <- Apps$new( auth = auth ) # List public apps apps_object$query(visibility = "public") }
get()
This call returns information about the specified app.
The app must be in a project you can access. It could be an app
uploaded to the Seven Bridges Platform by a project member or a public
app copied into the project.
You can find more details about this operation in our
API documentation.
Apps$get(id, revision = NULL, ...)
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.
App
object.
\dontrun{ apps_object <- Apps$new( auth = auth ) # Get app object apps_object$get(id = "<some_id>") }
copy()
This call copies the specified app to the specified project. The app must be in a project you can access. It could be an app uploaded to the Seven Bridges Platform by a project member or a public app copied into the project.
Apps$copy( app, project, name = NULL, strategy = c("clone", "direct", "clone_direct", "transient"), ... )
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.
Copied App
object.
\dontrun{ apps_object <- Apps$new( auth = auth ) # Copy app object to a project apps_object$copy(app = app, project = project) }
create()
This call allows you to add an app using raw CWL.
Apps$create( raw = NULL, from_path = NULL, project, name, raw_format = c("JSON", "YAML"), ... )
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.
App
object.
\dontrun{ apps_object <- Apps$new( auth = auth ) # Create new app object apps_object$create( raw = raw, project = project, name = name, raw_format = "YAML" ) }
clone()
The objects of this class are cloneable with this method.
Apps$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.