Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.webapps.galaxy.api package¶
This module does not contain API routes. It exclusively contains dependencies to be used in FastAPI routes
-
class
galaxy.webapps.galaxy.api.
BaseGalaxyAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶
-
class
galaxy.webapps.galaxy.api.
GalaxyASGIRequest
(request: starlette.requests.Request)[source]¶ Bases:
galaxy.work.context.GalaxyAbstractRequest
Wrapper around Starlette/FastAPI Request object.
Implements the GalaxyAbstractRequest interface to provide access to some properties of the request commonly used.
-
base
¶
-
host
¶
-
-
class
galaxy.webapps.galaxy.api.
GalaxyASGIResponse
(response: starlette.responses.Response)[source]¶ Bases:
galaxy.work.context.GalaxyAbstractResponse
Wrapper around Starlette/FastAPI Response object.
Implements the GalaxyAbstractResponse interface to provide access to some properties of the response object commonly used.
-
headers
¶
-
-
class
galaxy.webapps.galaxy.api.
GalaxyTypeDepends
(callable, dep_type)[source]¶ Bases:
fastapi.params.Depends
Variant of fastapi Depends that can also work on WSGI Galaxy controllers.
-
class
galaxy.webapps.galaxy.api.
Router
(*, prefix: str = '', tags: typing.Optional[typing.List[typing.Union[str, enum.Enum]]] = None, dependencies: typing.Optional[typing.Sequence[fastapi.params.Depends]] = None, default_response_class: typing.Type[starlette.responses.Response] = <fastapi.datastructures.DefaultPlaceholder object>, responses: typing.Optional[typing.Dict[typing.Union[int, str], typing.Dict[str, typing.Any]]] = None, callbacks: typing.Optional[typing.List[starlette.routing.BaseRoute]] = None, routes: typing.Optional[typing.List[starlette.routing.BaseRoute]] = None, redirect_slashes: bool = True, default: typing.Optional[typing.Callable[[typing.MutableMapping[str, typing.Any], typing.Callable[[], typing.Awaitable[typing.MutableMapping[str, typing.Any]]], typing.Callable[[typing.MutableMapping[str, typing.Any]], typing.Awaitable[NoneType]]], typing.Awaitable[NoneType]]] = None, dependency_overrides_provider: typing.Optional[typing.Any] = None, route_class: typing.Type[fastapi.routing.APIRoute] = <class 'fastapi.routing.APIRoute'>, on_startup: typing.Optional[typing.Sequence[typing.Callable[[], typing.Any]]] = None, on_shutdown: typing.Optional[typing.Sequence[typing.Callable[[], typing.Any]]] = None, deprecated: typing.Optional[bool] = None, include_in_schema: bool = True) → None[source]¶ Bases:
fastapi_utils.inferring_router.InferringRouter
A FastAPI Inferring Router tailored to Galaxy.
-
cbv
¶ Short-hand for frequently used Galaxy-pattern of FastAPI class based views.
Creates a class-based view for for this router, for more information see: https://fastapi-utils.davidmontague.xyz/user-guide/class-based-views/
-
-
class
galaxy.webapps.galaxy.api.
UrlBuilder
(request: starlette.requests.Request)[source]¶ Bases:
object
-
galaxy.webapps.galaxy.api.
as_form
(cls: typing.Type[pydantic.main.BaseModel])[source]¶ Adds an as_form class method to decorated models. The as_form class method can be used with FastAPI endpoints.
See https://github.com/tiangolo/fastapi/issues/2387#issuecomment-731662551
-
galaxy.webapps.galaxy.api.
get_admin_user
(trans: galaxy.work.context.SessionRequestContext = Depends(get_trans))[source]¶
-
galaxy.webapps.galaxy.api.
get_api_user
(security: galaxy.security.idencoding.IdEncodingHelper = GalaxyTypeDepends(_do_resolve), user_manager: galaxy.managers.users.UserManager = GalaxyTypeDepends(_do_resolve), key: typing.Optional[str] = Query(None), x_api_key: typing.Optional[str] = Header(None), run_as: typing.Optional[galaxy.schema.fields.EncodedDatabaseIdField] = Header(None)) → typing.Optional[galaxy.model.User][source]¶
-
galaxy.webapps.galaxy.api.
get_app_with_request_session
() → typing.AsyncGenerator[galaxy.structured_app.StructuredApp, NoneType][source]¶
-
galaxy.webapps.galaxy.api.
get_current_history_from_session
(galaxy_session: typing.Optional[galaxy.model.GalaxySession]) → typing.Optional[galaxy.model.History][source]¶
-
galaxy.webapps.galaxy.api.
get_session
(session_manager: galaxy.managers.session.GalaxySessionManager = Depends(get_session_manager), security: galaxy.security.idencoding.IdEncodingHelper = GalaxyTypeDepends(_do_resolve), galaxysession: typing.Optional[str] = Cookie(None)) → typing.Optional[galaxy.model.GalaxySession][source]¶
-
galaxy.webapps.galaxy.api.
get_session_manager
(app: galaxy.structured_app.StructuredApp = Depends(get_app_with_request_session)) → galaxy.managers.session.GalaxySessionManager[source]¶
-
galaxy.webapps.galaxy.api.
get_trans
(request: starlette.requests.Request, response: starlette.responses.Response, app: galaxy.structured_app.StructuredApp = Depends(get_app_with_request_session), user: typing.Optional[galaxy.model.User] = Depends(get_user), galaxy_session: typing.Optional[galaxy.model.GalaxySession] = Depends(get_session)) → galaxy.work.context.SessionRequestContext[source]¶
-
galaxy.webapps.galaxy.api.
get_user
(galaxy_session: typing.Optional[galaxy.model.GalaxySession] = Depends(get_session), api_user: typing.Optional[galaxy.model.User] = Depends(get_api_user)) → typing.Optional[galaxy.model.User][source]¶
-
galaxy.webapps.galaxy.api.
try_get_request_body_as_json
(request: starlette.requests.Request) → typing.Optional[typing.Any][source]¶ Returns the request body as a JSON object if the content type is JSON.
Submodules¶
galaxy.webapps.galaxy.api.annotations module¶
API operations on annotations.
-
class
galaxy.webapps.galaxy.api.annotations.
BaseAnnotationsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesStoredWorkflowMixin
,galaxy.model.item_attrs.UsesAnnotations
-
class
galaxy.webapps.galaxy.api.annotations.
HistoryAnnotationsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.annotations.BaseAnnotationsController
-
controller_name
= 'history_annotations'¶
-
history_manager
= GalaxyTypeDepends(_do_resolve)¶
-
tagged_item_id
= 'history_id'¶
-
-
class
galaxy.webapps.galaxy.api.annotations.
HistoryContentAnnotationsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.annotations.BaseAnnotationsController
-
controller_name
= 'history_content_annotations'¶
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
tagged_item_id
= 'history_content_id'¶
-
-
class
galaxy.webapps.galaxy.api.annotations.
WorkflowAnnotationsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.annotations.BaseAnnotationsController
-
controller_name
= 'workflow_annotations'¶
-
tagged_item_id
= 'workflow_id'¶
-
galaxy.webapps.galaxy.api.authenticate module¶
API key retrieval through BaseAuth
Sample usage
Returns
{
"api_key": "baa4d6e3a156d3033f05736255f195f9"
}
-
class
galaxy.webapps.galaxy.api.authenticate.
AuthenticationController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
options
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwd)[source]¶ A no-op endpoint to return generic OPTIONS for the API. Any OPTIONS request to /api/* maps here. Right now this is solely to inform preflight CORS checks, which are API wide. Might be better placed elsewhere, but for now this is the initial entrypoint for relevant consumers.
-
galaxy.webapps.galaxy.api.cloud module¶
API operations on Cloud-based storages, such as Amazon Simple Storage Service (S3).
-
class
galaxy.webapps.galaxy.api.cloud.
CloudController
(app: galaxy.structured_app.StructuredApp, cloud_manager: galaxy.managers.cloud.CloudManager, datasets_serializer: galaxy.managers.datasets.DatasetSerializer)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTfull controller for interaction with Amazon S3.
-
__init__
(app: galaxy.structured_app.StructuredApp, cloud_manager: galaxy.managers.cloud.CloudManager, datasets_serializer: galaxy.managers.datasets.DatasetSerializer)[source]¶
-
get
(trans, payload, **kwargs)[source]¶ POST /api/cloud/storage/get
gets given objects from a given cloud-based bucket to a Galaxy history.
Parameters: - trans (galaxy.webapps.base.webapp.GalaxyWebTransaction) – Galaxy web transaction
- payload (dict) –
A dictionary structure containing the following keys:
- history_id: the (encoded) id of history to which the object should be received to.
- bucket: the name of a bucket from which data should be fetched from (e.g., a bucket name on AWS S3).
- objects: a list of the names of objects to be fetched.
- authz_id: the encoded ID of CloudAuthz to be used for authorizing access to the resource
- provider. You may get a list of the defined authorizations via /api/cloud/authz. Also, you can use /api/cloud/authz/create to define a new authorization.
- input_args [Optional; default value is an empty dict] a dictionary containing the following keys:
- ** dbkey: [Optional; default value: is ?]
- Sets the genome (e.g., hg19) of the objects being fetched to Galaxy.
- ** file_type: [Optional; default value is auto]
- Sets the Galaxy datatype (e.g., bam) for the objects being fetched to Galaxy. See the following link for a complete list of Galaxy data types: https://galaxyproject.org/learn/datatypes/
- ** space_to_tab: [Optional; default value is False]
- A boolean value (“true” or “false”) that sets if spaces should be converted to tab in the objects being fetched to Galaxy. Applicable only if to_posix_lines is True
- ** to_posix_lines: [Optional; default value is Yes]
- A boolean value (“true” or “false”); if “Yes”, converts universal line endings to POSIX line endings. Set to “False” if you upload a gzip, bz2 or zip archive containing a binary file.
- kwargs –
Return type: dictionary
Returns: a dictionary containing a summary view of the datasets copied from the given cloud-based storage.
-
index
(trans, **kwargs)[source]¶ GET /api/cloud/storage
Lists cloud-based buckets (e.g., S3 bucket, Azure blob) user has defined.
Returns: A list of cloud-based buckets user has defined.
-
send
(trans, payload, **kwargs)[source]¶ POST /api/cloud/storage/send
Sends given dataset(s) in a given history to a given cloud-based bucket. Each dataset is named using the label assigned to the dataset in the given history (see HistoryDatasetAssociation.name). If no dataset ID is given, this API sends all the datasets belonging to a given history to a given cloud-based bucket.
Parameters: - trans (galaxy.webapps.base.webapp.GalaxyWebTransaction) – Galaxy web transaction
- payload (dictionary) –
A dictionary structure containing the following keys:
- history_id the (encoded) id of history from which the object should be downloaed.
- bucket: the name of a bucket to which data should be sent (e.g., a bucket name on AWS S3).
- authz_id: the encoded ID of CloudAuthz to be used for authorizing access to the resource
- provider. You may get a list of the defined authorizations via /api/cloud/authz. Also, you can use /api/cloud/authz/create to define a new authorization.
- dataset_ids: [Optional; default: None]
- A list of encoded dataset IDs belonging to the specified history that should be sent to the given bucket. If not provided, Galaxy sends all the datasets belonging the specified history.
- overwrite_existing: [Optional; default: False]
- A boolean value. If set to “True”, and an object with same name of the dataset to be sent already exist in the bucket, Galaxy replaces the existing object with the dataset to be sent. If set to “False”, Galaxy appends datetime to the dataset name to prevent overwriting an existing object.
Return type: dictionary
Returns: Information about the (un)successfully submitted dataset send jobs, containing the following keys:
- bucket_name: The name of bucket to which the listed datasets are queued
to be sent.
sent_dataset_labels: A list of JSON objects with the following key-value pair: ** object: The name of object is queued to be created. ** job_id: The id of the queued send job.
- failed_dataset_labels: A list of JSON objects with the following key-value pair
representing the datasets Galaxy failed to create (and queue) send job for:
** object: The name of object is queued to be created. ** error: A descriptive error message.
-
galaxy.webapps.galaxy.api.cloudauthz module¶
API operations on defining cloud authorizations.
Through means of cloud authorization a user is able to grant a Galaxy server a secure access to his/her cloud-based resources without sharing his/her long-lasting credentials.
User provides a provider-specific configuration, which Galaxy users to request temporary credentials from the provider to access the user’s resources.
-
class
galaxy.webapps.galaxy.api.cloudauthz.
CloudAuthzController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTfull controller for defining cloud authorizations.
-
create
(trans, payload, **kwargs)[source]¶ - POST /api/cloud/authz
- Request to store the payload as a cloudauthz (cloud authorization) configuration for a user.
Parameters: - trans (galaxy.webapps.base.webapp.GalaxyWebTransaction) – Galaxy web transaction
- payload (dict) –
A dictionary structure containing the following keys: * provider: the cloud-based resource provider to which this configuration belongs to.
- config: a dictionary containing all the configuration required to request temporary credentials
- from the provider. See the following page for details: https://galaxyproject.org/authnz/
- authn_id: the (encoded) ID of a third-party authentication of a user. To have this ID, user must
- have logged-in to this Galaxy server using third-party identity (e.g., Google), or has associated his/her Galaxy account with a third-party OIDC-based identity. See this page: https://galaxyproject.org/authnz/config/
- description: [Optional] a brief description for this configuration.
- kwargs – empty dict
Return type: Returns: a dictionary with the following kvp: * status: HTTP response code * message: A message complementary to the response code.
-
delete
(trans, encoded_authz_id, **kwargs)[source]¶ - DELETE /api/cloud/authz/{encoded_authz_id}
- Deletes the CloudAuthz record with the given
encoded_authz_id
from database.
Parameters: - trans (galaxy.webapps.base.webapp.GalaxyWebTransaction) – Galaxy web transaction
- encoded_authz_id (string) – The encoded ID of the CloudAuthz record to be marked deleted.
:rtype JSON :return The cloudauthz record marked as deleted, serialized as a JSON object.
-
index
(trans, **kwargs)[source]¶ GET /api/cloud/authz
Lists all the cloud authorizations user has defined.
Parameters: - trans (galaxy.webapps.base.webapp.GalaxyWebTransaction) – Galaxy web transaction
- kwargs – empty dict
Return type: list of dict
Returns: a list of cloud authorizations (each represented in key-value pair format) defined for the user.
-
update
(trans, encoded_authz_id, payload, **kwargs)[source]¶ PUT /api/cloud/authz/{encoded_authz_id}
Updates the values for the cloudauthz configuration with the given
encoded_authz_id
.With this API only the following attributes of a cloudauthz configuration can be updated: authn_id, provider, config, deleted.
Parameters: - trans (galaxy.webapps.base.webapp.GalaxyWebTransaction) – Galaxy web transaction
- encoded_authz_id (string) – The encoded ID of the CloudAuthz record to be updated.
- payload (dict) –
A dictionary structure containing the attributes to modified with their new values. It can contain any number of the following attributes:
- provider: the cloud-based resource provider
- to which this configuration belongs to.
- authn_id: the (encoded) ID of a third-party authentication of a user.
- To have this ID, user must have logged-in to this Galaxy server
using third-party identity (e.g., Google), or has associated
their Galaxy account with a third-party OIDC-based identity.
See this page: https://galaxyproject.org/authnz/config/
Note: A user can associate a cloudauthz record with their own authentications only. If the given authentication with authn_id belongs to a different user, Galaxy will throw the ItemAccessibilityException exception.
- config: a dictionary containing all the configuration required to
- request temporary credentials from the provider. See the following page for details: https://galaxyproject.org/authnz/
- deleted: a boolean type marking the specified cloudauthz as (un)deleted.
-
galaxy.webapps.galaxy.api.configuration module¶
API operations allowing clients to determine Galaxy instance’s capabilities and configuration settings.
-
class
galaxy.webapps.galaxy.api.configuration.
ConfigurationController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
configuration_manager
= GalaxyTypeDepends(_do_resolve)¶
-
get_config_dict
(trans, **kwd)[source]¶ Return an object containing exposable configuration settings.
-
index
(trans, **kwd)[source]¶ GET /api/configuration Return an object containing exposable configuration settings.
A more complete list is returned if the user is an admin. Pass in view and a comma-seperated list of keys to control which configuration settings are returned.
-
reload_toolbox
(trans, **kwds)[source]¶ PUT /api/configuration/toolbox Reload the Galaxy toolbox (but not individual tools).
-
user_manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.configuration.
FastAPIConfiguration
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
configuration_manager
= GalaxyTypeDepends(_do_resolve)¶
-
decode_id
(*, encoded_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → typing.Dict[str, int][source]¶ Decode a given id.
-
dynamic_tool_confs
() → typing.List[typing.Dict[str, str]][source]¶ Return dynamic tool configuration files.
-
index
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), view: typing.Optional[str] = Query(None), keys: typing.Optional[str] = Query(None)) → typing.Dict[str, typing.Any][source]¶ Return an object containing exposable configuration settings.
A more complete list is returned if the user is an admin. Pass in view and a comma-seperated list of keys to control which configuration settings are returned.
-
tool_lineages
() → typing.List[typing.Dict[str, typing.Dict]][source]¶ Return tool lineages for tools that have them.
-
galaxy.webapps.galaxy.api.container_resolution module¶
API operations allowing clients to manage container resolution.
-
class
galaxy.webapps.galaxy.api.container_resolution.
ContainerResolutionAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
resolve
(trans, index=None, **kwds)[source]¶ GET /api/container_resolvers/resolve GET /api/container_resolvers/{index}/resolve
Resolve described requirement against specified container resolvers.
Parameters: - tool_id (str) – tool_id to resolve against containers
- requirements_only (boolean) – ignore tool containers, properties - just search based on tool requirements set to True to mimic default behavior of tool dependency API.
- index (int) – index of the container resolver, if unset resolvers searched in order
- container_type (str) – restrict resolution to specified container type (e.g. ‘docker’, ‘singularity’)
- resolver_type (str) – restrict resolution to specified resolver type (e.g. ‘build_mulled’, ‘explicit’)
- install (boolean) – allow installation of new containers (for build_mulled* containers) the way job resolution will operate, defaults to False
Return type: Returns: a dictified description of the container dependency, with attribute
dependency_type: None
if no match was found.
-
resolve_toolbox
(trans, **kwds)[source]¶ GET /api/container_resolvers/toolbox GET /api/container_resolvers/{index}/toolbox
Apply resolve() to each tool in the toolbox and return the results as a list. See documentation for resolve() for a description of parameters that can be consumed and a description of the resulting items.
Parameters: tool_ids (str) – tool_ids to filter toolbox on Return type: list Returns: list of items returned from resolve()
-
resolve_toolbox_with_install
(trans, payload, **kwds)[source]¶ POST /api/container_resolvers/toolbox/install POST /api/container_resolvers/{index}/toolbox/install
Do the resolution of dependencies like resolve_toolbox(), but allow building and installing new containers. payload of POST body maybe contain same parameters as resolve_toolbox query parameters.
Return type: list Returns: list of items returned from resolve()
-
resolve_with_install
(trans, payload, **kwds)[source]¶ POST /api/container_resolvers/resolve/install POST /api/container_resolvers/{index}/resolve/install
Do the resolution of dependencies like resolve(), but allow building and installing new containers during installation. payload of POST body maybe contain same parameters as resolve query parameters.
Return type: dict Returns: a dictified description of the container dependency, with attribute dependency_type: None
if no match was found.
-
galaxy.webapps.galaxy.api.dataset_collections module¶
-
class
galaxy.webapps.galaxy.api.dataset_collections.
DatasetCollectionsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
attributes
(trans: galaxy.managers.context.ProvidesHistoryContext, id, instance_type='history')[source]¶ GET /api/dataset_collections/{hdca_id}/attributes
Returns dbkey/extension for collection elements
-
contents
(trans: galaxy.managers.context.ProvidesHistoryContext, hdca_id, parent_id, instance_type='history', limit=None, offset=None, **kwds)[source]¶ GET /api/dataset_collection/{hdca_id}/contents/{parent_id}?limit=100&offset=0
Shows direct child contents of indicated dataset collection parent id
Parameters: - id – HDCA.id
- parent_id – parent dataset_collection.id for the dataset contents to be viewed
- limit – pagination limit for returned dataset collection elements
- offset – pagination offset for returned dataset collection elements
Return type: Returns: list of dataset collection elements and contents
-
create
(trans: galaxy.managers.context.ProvidesHistoryContext, payload: dict, **kwd)[source]¶ - POST /api/dataset_collections:
- create a new dataset collection instance.
Parameters: payload (dict) – (optional) dictionary structure containing: * collection_type: dataset collection type to create. * instance_type: Instance type - ‘history’ or ‘library’. * name: the new dataset collections’s name * datasets: object describing datasets for collection Return type: dict Returns: element view of new dataset collection
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(trans: galaxy.managers.context.ProvidesHistoryContext, id, instance_type='history', **kwds)[source]¶ GET /api/dataset_collections/{hdca_id} GET /api/dataset_collections/{ldca_id}?instance_type=library
-
suitable_converters
(trans: galaxy.managers.context.ProvidesHistoryContext, id, instance_type='history', **kwds)[source]¶ GET /api/dataset_collections/{hdca_id}/suitable_converters
Returns suitable converters for all datatypes in collection
-
update
(trans: galaxy.managers.context.ProvidesHistoryContext, payload: dict, id)[source]¶ Iterate over all datasets of a collection and copy datasets with new attributes to a new collection. e.g attributes = {‘dbkey’: ‘dm3’}
- POST /api/dataset_collections/{hdca_id}/copy:
- create a new dataset collection instance.
-
-
class
galaxy.webapps.galaxy.api.dataset_collections.
FastAPIDatasetCollections
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
attributes
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = Query(history)) → galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionAttributesResult[source]¶
-
contents
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), hdca_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), parent_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = Query(history), limit: typing.Optional[int] = Query(None), offset: typing.Optional[int] = Query(None)) → galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionContentElements[source]¶
-
copy
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.webapps.galaxy.services.dataset_collections.UpdateCollectionAttributePayload = Body(Ellipsis))[source]¶
-
create
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), payload: galaxy.schema.schema.CreateNewCollectionPayload = Body(Ellipsis)) → galaxy.schema.schema.HDCADetailed[source]¶
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = Query(history)) → typing.Union[galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary][source]¶
-
suitable_converters
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = Query(history)) → galaxy.webapps.galaxy.services.dataset_collections.SuitableConverters[source]¶
-
galaxy.webapps.galaxy.api.datasets module¶
API operations on the contents of a history dataset.
-
class
galaxy.webapps.galaxy.api.datasets.
DatasetsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
converted
(self, trans, dataset_id, ext, **kwargs)[source]¶ - GET /api/datasets/{dataset_id}/converted/{ext}
- return information about datasets made by converting this dataset to a new format
Parameters: If there is no existing converted dataset for the format in ext, one will be created.
If ext is None, a dictionary will be returned of the form { <converted extension> : <converted id>, … } containing all the existing converted datasets.
- ..note: view and keys are also available to control the serialization
- of individual datasets. They have no effect when ext is None.
Return type: dict Returns: dictionary containing detailed HDA information or (if ext is None) an extension->dataset_id map
-
display
(trans, history_content_id, history_id, preview=False, filename=None, to_ext=None, raw=False, **kwd)[source]¶ GET /api/histories/{encoded_history_id}/contents/{encoded_content_id}/display Displays history content (dataset).
The query parameter ‘raw’ should be considered experimental and may be dropped at some point in the future without warning. Generally, data should be processed by its datatype prior to display (the defult if raw is unspecified or explicitly false.
-
extra_files
(trans, history_content_id, history_id, **kwd)[source]¶ GET /api/histories/{encoded_history_id}/contents/{encoded_content_id}/extra_files Generate list of extra files.
-
get_metadata_file
(trans, history_content_id, history_id, metadata_file=None, **kwd)[source]¶ GET /api/histories/{history_id}/contents/{history_content_id}/metadata_file
-
index
(trans, limit=500, offset=0, history_id=None, **kwd)[source]¶ GET /api/datasets/
Search datasets or collections using a query system
Return type: list Returns: dictionaries containing summary of dataset or dataset_collection information The list returned can be filtered by using two optional parameters:
q: string, generally a property name to filter by followed by an (often optional) hyphen and operator string. qv: string, the value to filter by ..example:
To filter the list to only those created after 2015-01-29, the query string would look like: '?q=create_time-gt&qv=2015-01-29' Multiple filters can be sent in using multiple q/qv pairs: '?q=create_time-gt&qv=2015-01-29&q=name-contains&qv=experiment-1'
- The list returned can be paginated using two optional parameters:
- limit: integer, defaults to no value and no limit (return all)
- how many items to return
- offset: integer, defaults to 0 and starts at the beginning
- skip the first ( offset - 1 ) items and begin returning at the Nth item
- ..example:
- limit and offset can be combined. Skip the first two and return five:
- ‘?limit=5&offset=3’
- The list returned can be ordered using the optional parameter:
- order: string containing one of the valid ordering attributes followed
- (optionally) by ‘-asc’ or ‘-dsc’ (default) for ascending and descending order respectively. Orders can be stacked as a comma- separated list of values. Allowed ordering attributes are: ‘create_time’, ‘extension’, ‘hid’, ‘history_id’, ‘name’, ‘update_time’. ‘order’ defaults to ‘create_time’.
- ..example:
- To sort by name descending then create time descending:
- ‘?order=name-dsc,create_time’
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(trans, id, hda_ldda='hda', data_type=None, provider=None, **kwd)[source]¶ GET /api/datasets/{encoded_dataset_id} Displays information about and/or content of a dataset.
-
show_inheritance_chain
(trans, dataset_id, hda_ldda='hda', **kwd)[source]¶ GET /api/datasets/{dataset_id}/inheritance_chain
Display inheritance chain for the given dataset
For internal use, this endpoint may change without warning.
-
-
class
galaxy.webapps.galaxy.api.datasets.
FastAPIDatasets
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
converted
(*, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.webapps.galaxy.services.datasets.ConvertedDatasetsMap[source]¶ Return a map of <converted extension> : <converted id> containing all the existing converted datasets.
-
converted_ext
(*, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), ext: str = Path(Ellipsis), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary][source]¶ Return information about datasets made by converting this dataset to a new format.
If there is no existing converted dataset for the format in ext, one will be created.
Note: view and keys are also available to control the serialization of the dataset.
-
display
(*, request: starlette.requests.Request, trans=Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), history_content_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), preview: bool = Query(False), filename: typing.Optional[str] = Query(None), to_ext: typing.Optional[str] = Query(None), raw: bool = Query(False))[source]¶ Streams the preview contents of a dataset to be displayed in a browser.
-
extra_files
(*, trans=Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), history_content_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis))[source]¶
-
get_content_as_text
(*, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.webapps.galaxy.services.datasets.DatasetTextContentDetails[source]¶
-
get_metadata_file
(*, trans=Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), history_content_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), metadata_file: typing.Optional[str] = Query(None))[source]¶
-
index
(*, trans=Depends(get_trans), history_id: typing.Optional[galaxy.schema.fields.EncodedDatabaseIdField] = Query(None), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), filter_query_params: galaxy.schema.FilterQueryParams = Depends(get_filter_query_params)) → typing.List[typing.Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem]][source]¶
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(*, request: starlette.requests.Request, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), hda_ldda: galaxy.schema.schema.DatasetSourceType = Query(hda), data_type: typing.Optional[galaxy.webapps.galaxy.services.datasets.RequestDataType] = Query(None), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params))[source]¶ Note: Due to the multipurpose nature of this endpoint, which can receive a wild variety of parameters and return different kinds of responses, the documentation here will be limited. To get more information please check the source code.
-
show_inheritance_chain
(*, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), hda_ldda: galaxy.schema.schema.DatasetSourceType = Query(hda)) → galaxy.webapps.galaxy.services.datasets.DatasetInheritanceChain[source]¶
-
show_storage
(*, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), hda_ldda: galaxy.schema.schema.DatasetSourceType = Query(hda)) → galaxy.webapps.galaxy.services.datasets.DatasetStorageDetails[source]¶
-
update_permissions
(*, trans=Depends(get_trans), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: typing.Dict[str, typing.Any] = Body(Ellipsis)) → galaxy.schema.schema.DatasetAssociationRoles[source]¶ Set permissions of the given history dataset to the given role ids.
-
galaxy.webapps.galaxy.api.datatypes module¶
API operations allowing clients to determine datatype supported by Galaxy.
-
class
galaxy.webapps.galaxy.api.datatypes.
DatatypesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
datatypes_registry
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.datatypes.
FastAPIDatatypes
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
converters
() → galaxy.datatypes._schema.DatatypeConverterList[source]¶ Gets the list of all installed converters.
-
datatypes_registry
= GalaxyTypeDepends(_do_resolve)¶
-
edam_data
() → typing.Dict[str, str][source]¶ Gets a map of datatypes and their corresponding EDAM data.
-
edam_formats
() → typing.Dict[str, str][source]¶ Gets a map of datatypes and their corresponding EDAM formats.
-
index
(*, extension_only: typing.Optional[bool] = Query(True), upload_only: typing.Optional[bool] = Query(True)) → typing.Union[typing.List[galaxy.datatypes._schema.DatatypeDetails], typing.List[str]][source]¶ Gets the list of all available data types.
-
types_and_mapping
(*, extension_only: typing.Optional[bool] = Query(True), upload_only: typing.Optional[bool] = Query(True)) → galaxy.datatypes._schema.DatatypesCombinedMap[source]¶ Combines the datatype information from (/api/datatypes) and the mapping information from (/api/datatypes/mapping) into a single response.
-
galaxy.webapps.galaxy.api.display_applications module¶
API operations on annotations.
-
class
galaxy.webapps.galaxy.api.display_applications.
DisplayApplicationsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.dynamic_tools module¶
-
class
galaxy.webapps.galaxy.api.dynamic_tools.
DynamicToolsController
(app)[source]¶ Bases:
galaxy.webapps.base.controller.BaseAPIController
RESTful controller for interactions with dynamic tools.
Dynamic tools are tools defined in the database. Use the tools controller to run these tools and view functional information.
-
index
(trans, **kwds)[source]¶ GET /api/dynamic_tools
This returns meta-information about the dynamic tool, such as tool_uuid. To use the tool or view funtional information such as inputs and outputs, use the standard tools API indexed by the ID (and optionally version) returned from this endpoint.
-
galaxy.webapps.galaxy.api.extended_metadata module¶
API operations on annotations.
-
class
galaxy.webapps.galaxy.api.extended_metadata.
BaseExtendedMetadataController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesExtendedMetadataMixin
,galaxy.webapps.base.controller.UsesLibraryMixinItems
,galaxy.webapps.base.controller.UsesStoredWorkflowMixin
,typing.Generic
-
class
galaxy.webapps.galaxy.api.extended_metadata.
HistoryDatasetExtendMetadataController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.extended_metadata.BaseExtendedMetadataController
-
controller_name
= 'history_dataset_extended_metadata'¶
-
exmeta_item_id
= 'history_content_id'¶
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.extended_metadata.
LibraryDatasetExtendMetadataController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.extended_metadata.BaseExtendedMetadataController
-
controller_name
= 'library_dataset_extended_metadata'¶
-
exmeta_item_id
= 'library_content_id'¶
-
galaxy.webapps.galaxy.api.folder_contents module¶
API operations on the contents of a library folder.
-
class
galaxy.webapps.galaxy.api.folder_contents.
FolderContentsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
Class controls retrieval, creation and updating of folder contents.
-
create
(trans, encoded_folder_id, payload, **kwd)[source]¶ POST /api/folders/{encoded_id}/contents
Create a new library file from an HDA.
Parameters: - encoded_folder_id (an encoded id string) – the encoded id of the folder to import dataset(s) to
- payload (dict) – dictionary structure containing: :param from_hda_id: (optional) the id of an accessible HDA to copy into the library :type from_hda_id: encoded id :param from_hdca_id: (optional) the id of an accessible HDCA to copy into the library :type from_hdca_id: encoded id :param ldda_message: (optional) the new message attribute of the LDDA created :type ldda_message: str :param extended_metadata: (optional) dub-dictionary containing any extended metadata to associate with the item :type extended_metadata: dict
Returns: a dictionary describing the new item if
from_hda_id
is supplied or a list of such dictionaries describing the new items iffrom_hdca_id
is supplied.Return type: Raises: ObjectAttributeInvalidException, InsufficientPermissionsException, ItemAccessibilityException, InternalServerError
-
index
(trans, folder_id, limit=None, offset=None, search_text=None, **kwd)[source]¶ GET /api/folders/{encoded_folder_id}/contents?limit={limit}&offset={offset}
Displays a collection (list) of a folder’s contents (files and folders). Encoded folder ID is prepended with ‘F’ if it is a folder as opposed to a data set which does not have it. Full path is provided in response as a separate object providing data for breadcrumb path building.
- ..example:
- limit and offset can be combined. Skip the first two and return five:
- ‘?limit=3&offset=5’
Parameters: - folder_id (encoded string) – encoded ID of the folder which contents should be library_dataset_dict
- offset – offset for returned library folder datasets
- limit – limit for returned library folder datasets contents should be library_dataset_dict
- kwd (dict) – keyword dictionary with other params
Returns: dictionary containing all items and metadata
Type: dict
Raises: MalformedId, InconsistentDatabase, ObjectNotFound, InternalServerError
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.folders module¶
API operations on library folders.
-
class
galaxy.webapps.galaxy.api.folders.
FastAPILibraryFolders
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
create
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.schema.schema.CreateLibraryFolderPayload = Body(Ellipsis)) → galaxy.schema.schema.LibraryFolderDetails[source]¶ Returns detailed information about the newly created library folder.
-
delete
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), undelete: typing.Optional[bool] = Query(None)) → galaxy.schema.schema.LibraryFolderDetails[source]¶ Marks the specified library folder as deleted (or undeleted).
-
get_permissions
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), scope: typing.Optional[galaxy.schema.schema.LibraryPermissionScope] = Query(None), page: typing.Optional[int] = Query(1), page_limit: typing.Optional[int] = Query(10), q: typing.Optional[str] = Query(None)) → typing.Union[galaxy.schema.schema.LibraryFolderCurrentPermissions, galaxy.schema.schema.LibraryAvailablePermissions][source]¶ Gets the current or available permissions of a particular library. The results can be paginated and additionally filtered by a query.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_permissions
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), action: typing.Optional[galaxy.schema.schema.LibraryFolderPermissionAction] = Query(None), payload: galaxy.schema.schema.LibraryFolderPermissionsPayload = Body(Ellipsis)) → galaxy.schema.schema.LibraryFolderCurrentPermissions[source]¶ Sets the permissions to manage a library folder.
-
show
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.LibraryFolderDetails[source]¶ Returns detailed information about the library folder with the given ID.
-
update
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.schema.schema.UpdateLibraryFolderPayload = Body(Ellipsis)) → galaxy.schema.schema.LibraryFolderDetails[source]¶ Updates the information of an existing library folder.
-
-
class
galaxy.webapps.galaxy.api.folders.
FoldersController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
create
(trans, encoded_parent_folder_id, payload, **kwd)[source]¶ POST /api/folders/{encoded_parent_folder_id}
Create a new folder object underneath the one specified in the parameters.
Parameters: - encoded_parent_folder_id (an encoded id string (should be prefixed by 'F')) – (required) the parent folder’s id
- payload –
dictionary structure containing:
param name: (required) the name of the new folder type name: str param description: the description of the new folder type description: str
:type dictionary :returns: information about newly created folder, notably including ID :rtype: dictionary :raises: RequestParameterMissingException
-
delete
(trans, encoded_folder_id, **kwd)[source]¶ DELETE /api/folders/{encoded_folder_id}
Mark the folder with the given
encoded_folder_id
as deleted (or remove the deleted mark if the undelete param is true).Note
Currently, only admin users can un/delete folders.
Parameters: - encoded_folder_id (an encoded id string) – the encoded id of the folder to un/delete
- undelete (bool) – (optional) flag specifying whether the item should be deleted or undeleted, defaults to false:
Returns: detailed folder information
Return type: dictionary
-
get_permissions
(trans, encoded_folder_id, **kwd)[source]¶ GET /api/folders/{id}/permissions
Load all permissions for the given folder id and return it.
Parameters: - encoded_folder_id (an encoded id string) – the encoded id of the folder
- scope (string) – either ‘current’ or ‘available’
Returns: dictionary with all applicable permissions’ values
Return type: dictionary
Raises: InsufficientPermissionsException
-
index
(trans, **kwd)[source]¶ GET /api/folders/
This would normally display a list of folders. However, that would be across multiple libraries, so it’s not implemented.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_permissions
(trans, encoded_folder_id, payload: dict, **kwd)[source]¶ POST /api/folders/{encoded_folder_id}/permissions
Set permissions of the given folder to the given role ids.
Parameters: - encoded_folder_id (an encoded id string) – the encoded id of the folder to set the permissions of
- payload –
dictionary structure containing:
param action: (required) describes what action should be performed type action: string param add_ids[]: list of Role.id defining roles that should have add item permission on the folder type add_ids[]: string or list param manage_ids[]: list of Role.id defining roles that should have manage permission on the folder type manage_ids[]: string or list param modify_ids[]: list of Role.id defining roles that should have modify permission on the folder type modify_ids[]: string or list
:type dictionary :returns: dict of current roles for all available permission types. :rtype: dictionary :raises: RequestParameterInvalidException, InsufficientPermissionsException, RequestParameterMissingException
-
show
(trans, id, **kwd)[source]¶ GET /api/folders/{encoded_folder_id}
Displays information about a folder.
Parameters: id (an encoded id string (has to be prefixed by 'F')) – the folder’s encoded id (required) Returns: dictionary including details of the folder Return type: dict
-
update
(trans, encoded_folder_id, payload, **kwd)[source]¶ PATCH /api/folders/{encoded_folder_id}
Update the folder defined by an
encoded_folder_id
with the data in the payload.Note
Currently, only admin users can update library folders. Also the folder must not be deleted.
param id: the encoded id of the folder type id: an encoded id string param payload: (required) dictionary structure containing:: ‘name’: new folder’s name, cannot be empty ‘description’: new folder’s description type payload: dict returns: detailed folder information rtype: dict raises: RequestParameterMissingException
-
galaxy.webapps.galaxy.api.forms module¶
API operations on FormDefinition objects.
galaxy.webapps.galaxy.api.genomes module¶
-
class
galaxy.webapps.galaxy.api.genomes.
FastAPIGenomes
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
index
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), chrom_info: bool = Query(None)) → typing.List[typing.List[str]][source]¶
-
indexes
(*, id: str = Path(Ellipsis), type: str = Query(fasta_indexes), format: str = Query(None)) → typing.Any[source]¶
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.genomes.
GenomesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTful controller for interactions with genome data.
-
indexes
(trans, id, **kwd)[source]¶ GET /api/genomes/{id}/indexes?type={table name}
Returns all available indexes for a genome id for type={table name} For instance, /api/genomes/hg19/indexes?type=fasta_indexes
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.group_roles module¶
API operations on Group objects.
-
class
galaxy.webapps.galaxy.api.group_roles.
FastAPIGroupRoles
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
delete
(*, trans: galaxy.managers.context.ProvidesAppContext = Depends(get_trans), group_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), role_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.GroupRoleModel[source]¶
-
index
(*, trans: galaxy.managers.context.ProvidesAppContext = Depends(get_trans), group_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.GroupRoleListModel[source]¶
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.group_roles.
GroupRolesAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
delete
(trans: galaxy.managers.context.ProvidesAppContext, id: galaxy.schema.fields.EncodedDatabaseIdField, group_id: galaxy.schema.fields.EncodedDatabaseIdField, **kwd)[source]¶ DELETE /api/groups/{encoded_group_id}/roles/{encoded_role_id} Removes a role from a group
-
index
(trans: galaxy.managers.context.ProvidesAppContext, group_id: galaxy.schema.fields.EncodedDatabaseIdField, **kwd)[source]¶ GET /api/groups/{encoded_group_id}/roles Displays a collection (list) of groups.
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.group_users module¶
API operations on Group objects.
-
class
galaxy.webapps.galaxy.api.group_users.
GroupUsersAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
index
(trans: galaxy.managers.context.ProvidesAppContext, group_id: galaxy.schema.fields.EncodedDatabaseIdField, **kwd)[source]¶ GET /api/groups/{encoded_group_id}/users Displays a collection (list) of groups.
-
show
(trans: galaxy.managers.context.ProvidesAppContext, id: galaxy.schema.fields.EncodedDatabaseIdField, group_id: galaxy.schema.fields.EncodedDatabaseIdField, **kwd)[source]¶ GET /api/groups/{encoded_group_id}/users/{encoded_user_id} Displays information about a group user.
-
galaxy.webapps.galaxy.api.groups module¶
API operations on Group objects.
-
class
galaxy.webapps.galaxy.api.groups.
GroupAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
index
(trans: galaxy.managers.context.ProvidesAppContext, **kwd)[source]¶ GET /api/groups Displays a collection (list) of groups.
-
create
(trans: galaxy.managers.context.ProvidesAppContext, payload: typing.Dict[str, typing.Any], **kwd)[source]¶ POST /api/groups Creates a new group.
-
galaxy.webapps.galaxy.api.histories module¶
API operations on a history.
See also
-
class
galaxy.webapps.galaxy.api.histories.
CreateHistoryFormData
[source]¶ Bases:
galaxy.schema.schema.CreateHistoryPayload
Uses Form data instead of JSON
-
as_form
(name, history_id, all_datasets, archive_source, archive_type, archive_file)¶
-
-
class
galaxy.webapps.galaxy.api.histories.
DeleteHistoryPayload
[source]¶ Bases:
pydantic.main.BaseModel
-
class
galaxy.webapps.galaxy.api.histories.
FastAPIHistories
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
archive_download
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), jeha_id: typing.Union[galaxy.schema.fields.EncodedDatabaseIdField, typing.Literal['latest']] = Path(Ellipsis))[source]¶ See
PUT /api/histories/{id}/exports
to initiate the creation of the history export - when ready, that route will return 200 status code (instead of 202) and this route can be used to download the archive.
-
archive_export
(*, response: starlette.responses.Response, trans=Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: typing.Optional[galaxy.schema.schema.ExportHistoryArchivePayload] = Body(None)) → typing.Union[galaxy.schema.schema.JobExportHistoryArchiveModel, galaxy.schema.schema.JobIdResponse][source]¶ This will start a job to create a history export archive.
Calling this endpoint multiple times will return the 202 status code until the archive has been completely generated and is ready to download. When ready, it will return the 200 status code along with the download link information.
If the history will be exported to a directory_uri, instead of returning the download link information, the Job ID will be returned so it can be queried to determine when the file has been written.
-
citations
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → typing.List[typing.Any][source]¶
-
create
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), payload: galaxy.schema.schema.CreateHistoryPayload = Depends(_as_form), payload_as_json: typing.Optional[typing.Any] = Depends(try_get_request_body_as_json), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.JobImportHistoryResponse, galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any][source]¶ The new history can also be copied form a existing history or imported from an archive or URL.
-
delete
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), purge: bool = Query(False), payload: typing.Optional[galaxy.webapps.galaxy.api.histories.DeleteHistoryPayload] = Body(None)) → typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any][source]¶
-
disable_link_access
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item inaccessible by a URL link and return the current sharing status.
-
enable_link_access
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item accessible by a URL link and return the current sharing status.
-
get_custom_builds_metadata
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.CustomBuildsMetadataResponse[source]¶
-
index
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), params: galaxy.webapps.galaxy.api.histories.HistoryIndexParams = Depends(HistoryIndexParams), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), deleted: bool = Query(False)) → typing.List[typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any]][source]¶
-
index_deleted
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), params: galaxy.webapps.galaxy.api.histories.HistoryIndexParams = Depends(HistoryIndexParams), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.List[typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any]][source]¶
-
index_exports
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.JobExportHistoryArchiveCollection[source]¶
-
publish
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item publicly available by a URL link and return the current sharing status.
-
published
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), filter_params: galaxy.webapps.galaxy.api.histories.HistoryFilterQueryParams = Depends(HistoryFilterQueryParams)) → typing.List[typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any]][source]¶
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_slug
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.schema.schema.SetSlugPayload = Body(Ellipsis))[source]¶ Sets a new slug to access this item by URL. The new slug must be unique.
Shares this item with specific users and return the current sharing status.
-
sharing
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Return the sharing status of the item.
-
show
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any][source]¶
-
show_recent
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any][source]¶
-
undelete
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any][source]¶
-
unpublish
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Removes this item from the published list and return the current sharing status.
-
update
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: typing.Any = Body(Ellipsis), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.HistoryBeta, galaxy.schema.schema.HistoryDetailed, galaxy.schema.schema.HistorySummary, typing.Any][source]¶
-
-
class
galaxy.webapps.galaxy.api.histories.
HistoriesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
archive_download
(trans, id, jeha_id, **kwds)[source]¶ GET /api/histories/{id}/exports/{jeha_id}
If ready and available, return raw contents of exported history. Use/poll
PUT /api/histories/{id}/exports
to initiate the creation of such an export - when ready that route will return 200 status code (instead of 202) with a JSON dictionary containing adownload_url
.
-
archive_export
(trans, id, payload=None, **kwds)[source]¶ PUT /api/histories/{id}/exports
start job (if needed) to create history export for corresponding history.
Parameters: id (str) – the encoded id of the history to export Return type: dict Returns: object containing url to fetch export from.
-
citations
(trans, history_id, **kwd)[source]¶ GET /api/histories/{id}/citations Return all the citations for the tools used to produce the datasets in the history.
-
create
(trans, payload)[source]¶ - POST /api/histories:
- create a new history
Parameters: - payload (dict) – (optional) dictionary structure containing: * name: the new history’s name * history_id: the id of the history to copy * all_datasets: copy deleted hdas/hdcas? ‘True’ or ‘False’, defaults to True * archive_source: the url that will generate the archive to import * archive_type: ‘url’ (default)
- keys – same as the use of keys in the index function above
- view – same as the use of view in the index function above
Return type: Returns: element view of new history
-
delete
(trans, id, **kwd)[source]¶ DELETE /api/histories/{id}
delete the history with the given
id
Note
Stops all active jobs in the history if purge is set.
Parameters: You can purge a history, removing all it’s datasets from disk (if unshared), by passing in
purge=True
in the url.Parameters: - keys – same as the use of keys in the index function above
- view – same as the use of view in the index function above
Return type: Returns: the deleted or purged history
-
get_custom_builds_metadata
(trans, id, payload=None, **kwd)[source]¶ GET /api/histories/{id}/custom_builds_metadata Returns meta data for custom builds.
Parameters: id (str) – the encoded history id
-
index
(trans, deleted='False', **kwd)[source]¶ GET /api/histories
return undeleted histories for the current user
GET /api/histories/deleted
return deleted histories for the current user
Note
Anonymous users are allowed to get their current history
Parameters: deleted (boolean) – if True, show only deleted histories, if False, non-deleted Return type: list Returns: list of dictionaries containing summary history information The following are optional parameters:
- view: string, one of (‘summary’,’detailed’), defaults to ‘summary’
- controls which set of properties to return
- keys: comma separated strings, unused by default
- keys/names of individual properties to return
- all: boolean, defaults to ‘false’, admin-only
- returns all histories, not just current user’s
If neither keys or views are sent, the default view (set of keys) is returned. If both a view and keys are sent, the key list and the view’s keys are combined.
If keys are send and no view, only those properties in keys are returned.
For which properties are available see
galaxy/managers/histories/HistorySerializerThe list returned can be filtered by using two optional parameters:
q: string, generally a property name to filter by followed by an (often optional) hyphen and operator string. qv: string, the value to filter by ..example:
To filter the list to only those created after 2015-01-29, the query string would look like: '?q=create_time-gt&qv=2015-01-29' Multiple filters can be sent in using multiple q/qv pairs: '?q=create_time-gt&qv=2015-01-29&q=tag-has&qv=experiment-1'
The list returned can be paginated using two optional parameters:
- limit: integer, defaults to no value and no limit (return all)
- how many items to return
- offset: integer, defaults to 0 and starts at the beginning
- skip the first ( offset - 1 ) items and begin returning at the Nth item
..example:
- limit and offset can be combined. Skip the first two and return five:
- ‘?limit=5&offset=3’
The list returned can be ordered using the optional parameter:
- order: string containing one of the valid ordering attributes followed
- (optionally) by ‘-asc’ or ‘-dsc’ for ascending and descending order respectively. Orders can be stacked as a comma- separated list of values.
- ..example:
- To sort by name descending then create time descending:
- ‘?order=name-dsc,create_time’
The ordering attributes and their default orders are:
create_time defaults to ‘create_time-dsc’ update_time defaults to ‘update_time-dsc’ name defaults to ‘name-asc’‘order’ defaults to ‘create_time-dsc’
-
index_exports
(trans, id)[source]¶ GET /api/histories/{id}/exports
Get previous history exports (to links). Effectively returns serialized JEHA objects.
-
published
(trans, **kwd)[source]¶ GET /api/histories/published
return all histories that are published
Return type: list Returns: list of dictionaries containing summary history information Follows the same filtering logic as the index() method above.
-
service
= GalaxyTypeDepends(_do_resolve)¶
- PUT /api/histories/{id}/share_with_users
- GET /api/histories/shared_with_me:
- return all histories that are shared with the current user
Return type: list Returns: list of dictionaries containing summary history information Follows the same filtering logic as the index() method above.
-
show
(trans, id, deleted='False')[source]¶ - GET /api/histories/{id}:
- return the history with
id
- GET /api/histories/deleted/{id}:
- return the deleted history with
id
- GET /api/histories/most_recently_used:
- return the most recently used history
Parameters: - id (an encoded id string) – the encoded id of the history to query or the string ‘most_recently_used’
- deleted (boolean) – if True, allow information on a deleted history to be shown.
- keys – same as the use of keys in the index function above
- view – same as the use of view in the index function above
Return type: dictionary
Returns: detailed history information
-
undelete
(self, trans, id, **kwd)[source]¶ - POST /api/histories/deleted/{id}/undelete:
- undelete history (that hasn’t been purged) with the given
id
Parameters: - id (str) – the encoded id of the history to undelete
- keys – same as the use of keys in the index function above
- view – same as the use of view in the index function above
Return type: Returns: ‘OK’ if the history was undeleted
-
update
(self, trans, id, payload, **kwd)[source]¶ - PUT /api/histories/{id}
- updates the values for the history with the given
id
Parameters: - id (str) – the encoded id of the history to update
- payload (dict) –
a dictionary containing any or all the fields in
galaxy.model.History.to_dict()
and/or the following:- annotation: an annotation for the history
- keys – same as the use of keys in the index function above
- view – same as the use of view in the index function above
Return type: Returns: an error object if an error occurred or a dictionary containing any values that were different from the original and, therefore, updated
-
-
class
galaxy.webapps.galaxy.api.histories.
HistoryIndexParams
[source]¶ Bases:
galaxy.webapps.galaxy.api.histories.HistoryFilterQueryParams
galaxy.webapps.galaxy.api.history_contents module¶
API operations on the contents of a history.
-
class
galaxy.webapps.galaxy.api.history_contents.
FastAPIHistoryContents
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
archive
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), filename: typing.Optional[str] = Query(None), format: typing.Optional[str] = Query(zip), dry_run: typing.Optional[bool] = Query(True), filter_query_params: galaxy.schema.FilterQueryParams = Depends(get_filter_query_params))[source]¶ Build and return a compressed archive of the selected history contents.
Note: this is a volatile endpoint and settings and behavior may change.
-
contents_near
(*, request: starlette.requests.Request, response: starlette.responses.Response, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), hid: int = Path(Ellipsis), direction: galaxy.webapps.galaxy.services.history_contents.DirectionOptions = Path(Ellipsis), limit: int = Path(Ellipsis), since: typing.Optional[datetime.datetime] = Query(None), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → galaxy.schema.schema.HistoryContentsResult[source]¶ Warning: For internal use to support the scroller functionality.
This endpoint provides random access to a large history without having to know exactly how many pages are in the final query. Pick a target HID and filters, and the endpoint will get a maximum of limit history items “around” the hid.
Additional counts are provided in the HTTP headers.
The direction determines what items are selected:
a) item counts: - total matches-up: hid < {hid} - total matches-down: hid > {hid} - total matches: total matches-up + total matches-down + 1 (+1 for hid == {hid}) - displayed matches-up: hid <= {hid} (hid == {hid} is included) - displayed matches-down: hid > {hid} - displayed matches: displayed matches-up + displayed matches-down
b) {limit} history items: - if direction == before: hid <= {hid} - if direction == after: hid > {hid} - if direction == near: “near” {hid}, so that |before| <= limit // 2, |after| <= limit // 2 + 1.
- Note: This endpoint uses slightly different filter params syntax. Instead of using q/qv parameters
- it uses the following syntax for query parameters:
- ?[field]-[operator]=[value]
- Example:
- ?update_time-gt=2015-01-29
-
create
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), type: typing.Optional[galaxy.schema.schema.HistoryContentType] = Query(None), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), payload: galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayload = Body(Ellipsis)) → typing.Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem][source]¶ Create a new HDA or HDCA in the given History.
-
delete
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), type: galaxy.schema.schema.HistoryContentType = Query(dataset), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), purge: typing.Optional[bool] = Query(False), recursive: typing.Optional[bool] = Query(False), payload: galaxy.schema.schema.DeleteHistoryContentPayload = Body(None)) → galaxy.schema.schema.DeleteHistoryContentResult[source]¶ Delete the history content with the given
ID
and specified type (defaults to dataset).Note: Currently does not stop any active jobs for which this dataset is an output.
-
download_dataset_collection
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis))[source]¶ Download the content of a history dataset collection as a zip archive while maintaining approximate collection structure.
-
index
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), index_params: galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexParams = Depends(get_index_query_params), legacy_params: galaxy.webapps.galaxy.services.history_contents.LegacyHistoryContentsIndexParams = Depends(get_legacy_index_query_params), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), filter_query_params: galaxy.schema.FilterQueryParams = Depends(get_filter_query_params))[source]¶ Return a list of HDA/HDCA data for the history with the given
ID
.- The contents can be filtered and queried using the appropriate parameters.
- The amount of information returned for each item can be customized.
Note: Anonymous users are allowed to get their current history contents.
-
index_jobs_summary
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), params: galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexJobsSummaryParams = Depends(get_index_jobs_summary_params)) → typing.List[typing.Union[galaxy.schema.schema.JobStateSummary, galaxy.schema.schema.ImplicitCollectionJobsStateSummary, galaxy.schema.schema.WorkflowInvocationStateSummary]][source]¶ Return job state summary info for jobs, implicit groups jobs for collections or workflow invocations.
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), type: galaxy.schema.schema.HistoryContentType = Query(dataset), fuzzy_count: typing.Optional[int] = Query(None), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params)) → typing.Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem][source]¶ Return detailed information about an HDA or HDCA within a history.
Note: Anonymous users are allowed to get their current history contents.
-
show_jobs_summary
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), type: galaxy.schema.schema.HistoryContentType = Query(dataset)) → typing.Union[galaxy.schema.schema.JobStateSummary, galaxy.schema.schema.ImplicitCollectionJobsStateSummary, galaxy.schema.schema.WorkflowInvocationStateSummary][source]¶ Return detailed information about an HDA or HDCAs jobs.
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
-
update
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), type: galaxy.schema.schema.HistoryContentType = Query(dataset), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), payload: galaxy.schema.schema.UpdateHistoryContentsPayload = Body(Ellipsis)) → typing.Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem][source]¶ Updates the values for the history content item with the given
ID
.
-
update_batch
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), serialization_params: galaxy.schema.SerializationParams = Depends(query_serialization_params), payload: galaxy.schema.schema.UpdateHistoryContentsBatchPayload = Body(Ellipsis)) → galaxy.schema.schema.HistoryContentsResult[source]¶ Batch update specific properties of a set items contained in the given History.
If you provide an invalid/unknown property key the request will not fail, but no changes will be made to the items.
-
update_permissions
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), dataset_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: typing.Dict[str, typing.Any] = Body(Ellipsis)) → galaxy.schema.schema.DatasetAssociationRoles[source]¶ Set permissions of the given history dataset to the given role ids.
-
validate
(*, trans: galaxy.managers.context.ProvidesHistoryContext = Depends(get_trans), history_id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → dict[source]¶ Validates the metadata associated with a dataset within a History.
-
-
class
galaxy.webapps.galaxy.api.history_contents.
HistoryContentsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesLibraryMixinItems
,galaxy.webapps.base.controller.UsesTagsMixin
-
archive
(self, trans, history_id, filename='', format='zip', dry_run=True, **kwd)[source]¶ - GET /api/histories/{history_id}/contents/archive/{id}
- GET /api/histories/{history_id}/contents/archive/{filename}.{format}
- build and return a compressed archive of the selected history contents
Parameters: - filename (string) – (optional) archive name (defaults to history name)
- dry_run (boolean) – (optional) if True, return the archive and file paths only as json and not an archive file
Returns: archive file for download
Note
this is a volatile endpoint and settings and behavior may change.
-
contents_near
(trans, history_id, direction, hid, limit, **kwd)[source]¶ Returns the following data:
a) item counts: - total matches-up: hid < {hid} - total matches-down: hid > {hid} - total matches: total matches-up + total matches-down + 1 (+1 for hid == {hid}) - displayed matches-up: hid <= {hid} (hid == {hid} is included) - displayed matches-down: hid > {hid} - displayed matches: displayed matches-up + displayed matches-down
b) {limit} history items: - if direction == before: hid <= {hid} - if direction == after: hid > {hid} - if direction == near: “near” {hid}, so that |before| <= limit // 2, |after| <= limit // 2 + 1.
Intended purpose: supports scroller functionality.
GET /api/histories/{history_id}/contents/{direction:near|before|after}/{hid}/{limit}
-
create
(trans, history_id, payload, **kwd)[source]¶ POST /api/histories/{history_id}/contents/{type}s POST /api/histories/{history_id}/contents
create a new HDA or HDCA
Parameters: - history_id (str) – encoded id string of the new HDA’s History
- type (str) – Type of history content - ‘dataset’ (default) or ‘dataset_collection’. This can be passed in via payload or parsed from the route.
- payload (dict) –
dictionary structure containing:
copy from library (for type ‘dataset’): ‘source’ = ‘library’ ‘content’ = [the encoded id from the library dataset]
copy from library folder ‘source’ = ‘library_folder’ ‘content’ = [the encoded id from the library folder]
copy from history dataset (for type ‘dataset’): ‘source’ = ‘hda’ ‘content’ = [the encoded id from the HDA]
copy from history dataset collection (for type ‘dataset_collection’) ‘source’ = ‘hdca’ ‘content’ = [the encoded id from the HDCA] ‘copy_elements’
Copy child HDAs into the target history as well, defaults to False but this is less than ideal and may be changed in future releases.create new history dataset collection (for type ‘dataset_collection’)
- ’source’
- ’new_collection’ (default ‘source’ if type is ‘dataset_collection’ - no need to specify this)
’collection_type’
For example, “list”, “paired”, “list:paired”.’copy_elements’
Copy child HDAs when creating new collection, defaults to False in the API but is set to True in the UI, so that we can modify HDAs with tags when creating collections.’name’
Name of new dataset collection.’element_identifiers’
Recursive list structure defining collection. Each element must have ‘src’ which can be ‘hda’, ‘ldda’, ‘hdca’, or ‘new_collection’, as well as a ‘name’ which is the name of element (e.g. “forward” or “reverse” for paired datasets, or arbitrary sample names for instance for lists). For all src’s except ‘new_collection’ - a encoded ‘id’ attribute must be included wiht element as well. ‘new_collection’ sources must defined a ‘collection_type’ and their own list of (potentially) nested ‘element_identifiers’.
- ..note:
- Currently, a user can only copy an HDA from a history that the user owns.
Return type: dict Returns: dictionary containing detailed information for the new HDA
-
delete
(trans, history_id, id, purge=False, recursive=False, **kwd)[source]¶ DELETE /api/histories/{history_id}/contents/{id} DELETE /api/histories/{history_id}/contents/{type}s/{id}
delete the history content with the given
id
and specified type (defaults to dataset)Note
Currently does not stop any active jobs for which this dataset is an output.
Parameters: - id (str) – the encoded id of the history to delete
- recursive (bool) – if True, and deleted an HDCA also delete containing HDAs
- purge (bool) – if True, purge the target HDA or child HDAs of the target HDCA
- kwd (dict) –
(optional) dictionary structure containing:
- payload: a dictionary itself containing:
- purge: if True, purge the HDA
- recursive: if True, see above.
Note
that payload optionally can be placed in the query string of the request. This allows clients that strip the request body to still purge the dataset.
Return type: dict Returns: an error object if an error occurred or a dictionary containing: * id: the encoded id of the history, * deleted: if the history content was marked as deleted, * purged: if the history content was purged
-
download_dataset_collection
(trans, id, history_id=None, **kwd)[source]¶ GET /api/histories/{history_id}/contents/dataset_collections/{id}/download GET /api/dataset_collection/{id}/download
Download the content of a HistoryDatasetCollection as a tgz archive while maintaining approximate collection structure.
Parameters: - id – encoded HistoryDatasetCollectionAssociation (HDCA) id
- history_id – encoded id string of the HDCA’s History
-
index
(trans, history_id, **kwd)[source]¶ GET /api/histories/{history_id}/contents
return a list of HDA data for the history with the given
id
Note
Anonymous users are allowed to get their current history contents
If Ids is not given, index returns a list of summary objects for every HDA associated with the given history_id.
If ids is given, index returns a more complete json object for each HDA in the ids list.
Parameters: Return type: Returns: dictionaries containing summary or detailed HDA information
-
index_jobs_summary
(trans, history_id, **kwd)[source]¶ - GET /api/histories/{history_id}/jobs_summary
- return job state summary info for jobs, implicit groups jobs for collections or workflow invocations
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
Parameters: - history_id (str) – encoded id string of the target history
- ids (str[]) – the encoded ids of job summary objects to return - if ids is specified types must also be specified and have same length.
- types (str[]) – type of object represented by elements in the ids array - any of Job, ImplicitCollectionJob, or WorkflowInvocation.
Return type: dict[]
Returns: an array of job summary object dictionaries.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(trans, id, history_id, **kwd)[source]¶ GET /api/histories/{history_id}/contents/{id} GET /api/histories/{history_id}/contents/{type}/{id}
return detailed information about an HDA or HDCA within a history
Note
Anonymous users are allowed to get their current history contents
Parameters: - id (str) – the encoded id of the HDA or HDCA to return
- id – ‘dataset’ or ‘dataset_collection’
- history_id (str) – encoded id string of the HDA’s or HDCA’s History
- view (str) – if fetching a dataset collection - the view style of the dataset collection to produce. ‘collection’ returns no element information, ‘element’ returns detailed element information for all datasets, ‘element-reference’ returns a minimal set of information about datasets (for instance id, type, and state but not metadata, peek, info, or name). The default is ‘element’.
- fuzzy_count (int) – this value can be used to broadly restrict the magnitude of the number of elements returned via the API for large collections. The number of actual elements returned may be “a bit” more than this number or “a lot” less - varying on the depth of nesting, balance of nesting at each level, and size of target collection. The consumer of this API should not expect a stable number or pre-calculable number of elements to be produced given this parameter - the only promise is that this API will not respond with an order of magnitude more elements estimated with this value. The UI uses this parameter to fetch a “balanced” concept of the “start” of large collections at every depth of the collection.
Return type: Returns: dictionary containing detailed HDA or HDCA information
-
show_jobs_summary
(trans, id, history_id, **kwd)[source]¶ - GET /api/histories/{history_id}/contents/{type}/{id}/jobs_summary
- return detailed information about an HDA or HDCAs jobs
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
Parameters: Return type: Returns: dictionary containing jobs summary object
-
show_roles
(trans, encoded_dataset_id, **kwd)[source]¶ Display information about current or available roles for a given dataset permission.
- GET /api/histories/{history_id}/contents/datasets/{encoded_dataset_id}/permissions
Parameters: encoded_dataset_id (an encoded id string) – the encoded id of the dataset to query Returns: either dict of current roles for all permission types or dict of available roles to choose from (is the same for any permission type) Return type: dictionary Raises: InsufficientPermissionsException
-
update
(self, trans, history_id, id, payload, **kwd)[source]¶ - PUT /api/histories/{history_id}/contents/{id}
- updates the values for the history content item with the given
id
Parameters: - history_id (str) – encoded id string of the items’s History
- id (str) – the encoded id of the history item to update
- payload (dict) –
a dictionary containing any or all the fields in
galaxy.model.HistoryDatasetAssociation.to_dict()
and/or the following:- annotation: an annotation for the HDA
Return type: Returns: an error object if an error occurred or a dictionary containing any values that were different from the original and, therefore, updated
-
update_batch
(trans, history_id, payload, **kwd)[source]¶ PUT /api/histories/{history_id}/contents
Parameters: Return type: Returns: an error object if an error occurred or a dictionary containing any values that were different from the original and, therefore, updated
-
update_permissions
(trans, history_id, history_content_id, payload: typing.Dict[str, typing.Any] = None, **kwd)[source]¶ Set permissions of the given library dataset to the given role ids.
PUT /api/histories/{history_id}/contents/datasets/{encoded_dataset_id}/permissions
Parameters: - encoded_dataset_id (an encoded id string) – the encoded id of the dataset to update permissions of
- payload –
dictionary structure containing:
param action: (required) describes what action should be performed available actions: make_private, remove_restrictions, set_permissions type action: string param access_ids[]: list of Role.id defining roles that should have access permission on the dataset type access_ids[]: string or list param manage_ids[]: list of Role.id defining roles that should have manage permission on the dataset type manage_ids[]: string or list param modify_ids[]: list of Role.id defining roles that should have modify permission on the library dataset item type modify_ids[]: string or list
Type: dictionary
Returns: dict of current roles for all available permission types
Return type: dictionary
Raises: RequestParameterInvalidException, ObjectNotFound, InsufficientPermissionsException, InternalServerError RequestParameterMissingException
-
-
galaxy.webapps.galaxy.api.history_contents.
get_index_jobs_summary_params
(ids: typing.Optional[str] = Query(None), types: typing.Optional[str] = Query(None)) → galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexJobsSummaryParams[source]¶ This function is meant to be used as a dependency to render the OpenAPI documentation correctly
-
galaxy.webapps.galaxy.api.history_contents.
get_index_query_params
(v: typing.Optional[str] = Query(None), dataset_details: typing.Optional[str] = Query(None)) → galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexParams[source]¶ This function is meant to be used as a dependency to render the OpenAPI documentation correctly
-
galaxy.webapps.galaxy.api.history_contents.
get_legacy_index_query_params
(ids: typing.Optional[str] = Query(None), types: typing.Optional[str] = Query(None), type: typing.Optional[str] = Query(None), details: typing.Optional[str] = Query(None), deleted: typing.Optional[bool] = Query(None), visible: typing.Optional[bool] = Query(None)) → galaxy.webapps.galaxy.services.history_contents.LegacyHistoryContentsIndexParams[source]¶ This function is meant to be used as a dependency to render the OpenAPI documentation correctly
-
galaxy.webapps.galaxy.api.history_contents.
parse_content_filter_params
(params: typing.Dict[str, typing.Any], exclude: typing.Optional[typing.Set[str]] = None) → typing.List[typing.List[typing.Any]][source]¶ Alternative way of parsing query parameter for filtering history contents.
- Parses parameters like: ?[field]-[operator]=[value]
- Example: ?update_time-gt=2015-01-29
Currently used by the contents_near endpoint. The exclude set can contain names of parameters that will be ignored and not added to the filters.
-
galaxy.webapps.galaxy.api.history_contents.
parse_dataset_details
(details: typing.Optional[str])[source]¶ Parses the different values that the dataset_details parameter can have from a string.
-
galaxy.webapps.galaxy.api.history_contents.
parse_index_jobs_summary_params
(ids: typing.Optional[str] = None, types: typing.Optional[str] = None, **_) → galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexJobsSummaryParams[source]¶ Parses query parameters for the history contents index_jobs_summary operation and returns a model containing the values in the correct type.
-
galaxy.webapps.galaxy.api.history_contents.
parse_index_query_params
(v: typing.Optional[str] = None, dataset_details: typing.Optional[str] = None, **_) → galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexParams[source]¶ Parses query parameters for the history contents index operation and returns a model containing the values in the correct type.
-
galaxy.webapps.galaxy.api.history_contents.
parse_legacy_index_query_params
(ids: typing.Optional[str] = None, types: typing.Optional[str] = None, type: typing.Optional[str] = None, details: typing.Optional[str] = None, deleted: typing.Optional[bool] = None, visible: typing.Optional[bool] = None, **_) → galaxy.webapps.galaxy.services.history_contents.LegacyHistoryContentsIndexParams[source]¶ Parses (legacy) query parameters for the history contents index operation and returns a model containing the values in the correct type.
galaxy.webapps.galaxy.api.item_tags module¶
API operations related to tagging items.
galaxy.webapps.galaxy.api.job_files module¶
API for asynchronous job running mechanisms can use to fetch or put files related to running and queued jobs.
-
class
galaxy.webapps.galaxy.api.job_files.
JobFilesAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
This job files controller allows remote job running mechanisms to read and modify the current state of files for queued and running jobs. It is certainly not meant to represent part of Galaxy’s stable, user facing API.
Furthermore, even if a user key corresponds to the user running the job, it should not be accepted for authorization - this API allows access to low-level unfiltered files and such authorization would break Galaxy’s security model for tool execution.
-
create
(self, trans, job_id, payload, **kwargs)[source]¶ - POST /api/jobs/{job_id}/files
- Populate an output file (formal dataset, task split part, working directory file (such as those related to metadata)). This should be a multipart post with a ‘file’ parameter containing the contents of the actual file to create.
Parameters: - ..note:
- This API method is intended only for consumption by job runners, not end users.
Return type: dict Returns: an okay message
-
index
(trans, job_id, **kwargs)[source]¶ GET /api/jobs/{job_id}/files
Get a file required to staging a job (proper datasets, extra inputs, task-split inputs, working directory files).
Parameters: - ..note:
- This API method is intended only for consumption by job runners, not end users.
Return type: binary Returns: contents of file
-
galaxy.webapps.galaxy.api.job_lock module¶
galaxy.webapps.galaxy.api.job_ports module¶
API for asynchronous job running mechanisms can use to fetch or put files related to running and queued jobs.
-
class
galaxy.webapps.galaxy.api.job_ports.
JobPortsAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
This job files controller allows remote job running mechanisms to modify the current state of ports for queued and running jobs. It is certainly not meant to represent part of Galaxy’s stable, user facing API.
See the JobFiles API for information about per-job API keys.
galaxy.webapps.galaxy.api.jobs module¶
API operations on a jobs.
See also
galaxy.model.Jobs
-
class
galaxy.webapps.galaxy.api.jobs.
FastAPIJobs
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
job_manager
= GalaxyTypeDepends(_do_resolve)¶
-
job_search
= GalaxyTypeDepends(_do_resolve)¶
-
show
(*, id: galaxy.schema.fields.EncodedDatabaseIdField, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), full: typing.Optional[bool] = False) → typing.Dict[source]¶ Return dictionary containing description of job data
Parameters - id: ID of job to return - full: Return extra information ?
-
-
class
galaxy.webapps.galaxy.api.jobs.
JobController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesVisualizationMixin
-
build_for_rerun
(trans: galaxy.managers.context.ProvidesHistoryContext, id, **kwd)[source]¶ - GET /api/jobs/{id}/build_for_rerun
- returns a tool input/param template prepopulated with this job’s information, suitable for rerunning or rendering parameters of the job.
Parameters: id (string) – Encoded job id Return type: dictionary Returns: dictionary containing output dataset associations
-
common_problems
(trans: galaxy.managers.context.ProvidesUserContext, id, **kwd)[source]¶ - GET /api/jobs/{id}/common_problems
- check inputs and job for common potential problems to aid in error reporting
-
create
(trans: galaxy.managers.context.ProvidesUserContext, payload, **kwd)[source]¶ See the create method in tools.py in order to submit a job.
-
destination_params
(trans: galaxy.managers.context.ProvidesUserContext, **kwd)[source]¶ - GET /api/jobs/{job_id}/destination_params
- Return destination parameters for specified job.
Parameters: job_id (string) – Encoded job id Return type: list Returns: list containing job destination parameters
-
error
(trans, id)[source]¶ - POST /api/jobs/{id}/error
- submits a bug report via the API.
Parameters: id (string) – Encoded job id Return type: dictionary Returns: dictionary containing information regarding where the error report was sent.
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
index
(trans: galaxy.managers.context.ProvidesUserContext, limit=500, offset=0, **kwd)[source]¶ GET /api/jobs
return jobs for current user
if user is admin and user_details is True, then return jobs for all galaxy users based on filtering - this is an extended service
Parameters: - state (string or list) – limit listing of jobs to those that match one of the included states. If none, all are returned.
- tool_id (string or list) – limit listing of jobs to those that match one of the included tool_ids. If none, all are returned.
- user_details (boolean) – if true, and requestor is an admin, will return external job id and user email.
- user_id (str) – an encoded user id to restrict query to, must be own id if not admin user
- limit (int) – Maximum number of jobs to return.
- offset (int) – Return jobs starting from this specified position.
For example, if
limit
is set to 100 andoffset
to 200, jobs 200-299 will be returned. - date_range_min (string '2014-01-01') – limit the listing of jobs to those updated on or after requested date
- date_range_max (string '2014-12-31') – limit the listing of jobs to those updated on or before requested date
- history_id (string) – limit listing of jobs to those that match the history_id. If none, all are returned.
- workflow_id (string) – limit listing of jobs to those that match the workflow_id. If none, all are returned.
- invocation_id (string) – limit listing of jobs to those that match the invocation_id. If none, all are returned.
- view (string) – Determines columns to return. Defaults to ‘collection’.
Return type: Returns: list of dictionaries containing summary job information
-
inputs
(trans: galaxy.managers.context.ProvidesUserContext, id, **kwd)[source]¶ GET /api/jobs/{id}/inputs
returns input datasets created by job
Parameters: id (string) – Encoded job id Return type: dictionary Returns: dictionary containing input dataset associations
-
job_manager
= GalaxyTypeDepends(_do_resolve)¶
-
job_search
= GalaxyTypeDepends(_do_resolve)¶
-
metrics
(trans: galaxy.managers.context.ProvidesUserContext, **kwd)[source]¶ - GET /api/jobs/{job_id}/metrics
- GET /api/datasets/{dataset_id}/metrics
- Return job metrics for specified job. Job accessibility checks are slightly different than dataset checks, so both methods are available.
Parameters: Return type: Returns: list containing job metrics
-
outputs
(trans, id)[source]¶ - GET /api/jobs/{id}/outputs
- returns output datasets created by job
Parameters: id (string) – Encoded job id Return type: dictionary Returns: dictionary containing output dataset associations
-
parameters_display
(trans: galaxy.managers.context.ProvidesUserContext, **kwd)[source]¶ GET /api/jobs/{job_id}/parameters_display
GET /api/datasets/{dataset_id}/parameters_display
Resolve parameters as a list for nested display. More client logic here than is ideal but it is hard to reason about tool parameter types on the client relative to the server. Job accessibility checks are slightly different than dataset checks, so both methods are available.
This API endpoint is unstable and tied heavily to Galaxy’s JS client code, this endpoint will change frequently.
Parameters: Return type: Returns: job parameters for for display
-
resume
(trans: galaxy.managers.context.ProvidesUserContext, id, **kwd)[source]¶ - PUT /api/jobs/{id}/resume
- Resumes a paused job
Parameters: id (string) – Encoded job id Return type: dictionary Returns: dictionary containing output dataset associations
-
search
(trans, payload)[source]¶ - POST /api/jobs/search:
- return jobs for current user
Parameters: payload (dict) – Dictionary containing description of requested job. This is in the same format as a request to POST /apt/tools would take to initiate a job Return type: list Returns: list of dictionaries containing summary job information of the jobs that match the requested job run This method is designed to scan the list of previously run jobs and find records of jobs that had the exact some input parameters and datasets. This can be used to minimize the amount of repeated work, and simply recycle the old results.
-
show
(trans, id)[source]¶ - GET /api/jobs/{id}:
- return jobs for current user
Parameters: - id (string) – Specific job id
- full (boolean) – whether to return extra information
Return type: dictionary
Returns: dictionary containing full description of job data
-
galaxy.webapps.galaxy.api.libraries module¶
API operations on a data library.
-
class
galaxy.webapps.galaxy.api.libraries.
FastAPILibraries
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
create
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), payload: galaxy.schema.schema.CreateLibraryPayload = Body(Ellipsis)) → galaxy.schema.schema.LibrarySummary[source]¶ Creates a new library and returns its summary information. Currently, only admin users can create libraries.
-
delete
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), undelete: typing.Optional[bool] = Query(None), payload: typing.Optional[galaxy.schema.schema.DeleteLibraryPayload] = Body(None)) → galaxy.schema.schema.LibrarySummary[source]¶ Marks the specified library as deleted (or undeleted). Currently, only admin users can delete or restore libraries.
-
get_permissions
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), scope: typing.Optional[galaxy.schema.schema.LibraryPermissionScope] = Query(None), is_library_access: typing.Optional[bool] = Query(None), page: typing.Optional[int] = Query(1), page_limit: typing.Optional[int] = Query(10), q: typing.Optional[str] = Query(None)) → typing.Union[galaxy.schema.schema.LibraryCurrentPermissions, galaxy.schema.schema.LibraryAvailablePermissions][source]¶ Gets the current or available permissions of a particular library. The results can be paginated and additionally filtered by a query.
-
index
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), deleted: typing.Optional[bool] = Query(None)) → galaxy.schema.schema.LibrarySummaryList[source]¶ Returns a list of summary data for all libraries.
-
index_deleted
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans)) → galaxy.schema.schema.LibrarySummaryList[source]¶ Returns a list of summary data for all libraries marked as deleted.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_permissions
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), action: typing.Optional[galaxy.schema.schema.LibraryPermissionAction] = Query(None), payload: typing.Union[galaxy.schema.schema.LibraryPermissionsPayload, galaxy.schema.schema.LegacyLibraryPermissionsPayload] = Body(Ellipsis)) → typing.Union[galaxy.schema.schema.LibraryLegacySummary, galaxy.schema.schema.LibraryCurrentPermissions][source]¶ Sets the permissions to access and manipulate a library.
-
show
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.LibrarySummary[source]¶ Returns summary information about a particular library.
-
update
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.schema.schema.UpdateLibraryPayload = Body(Ellipsis)) → galaxy.schema.schema.LibrarySummary[source]¶ Updates the information of an existing library. Currently, only admin users can update libraries.
-
-
class
galaxy.webapps.galaxy.api.libraries.
LibrariesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
create
(trans: galaxy.managers.context.ProvidesUserContext, payload: typing.Dict[str, str], **kwd)[source]¶ - POST /api/libraries:
- Creates a new library.
Note
Currently, only admin users can create libraries.
Parameters: payload (dict) – dictionary structure containing:: :param name: (required) the new library’s name :type name: str :param description: the new library’s description :type description: str :param synopsis: the new library’s synopsis :type synopsis: str Returns: detailed library information Return type: dict Raises: RequestParameterMissingException
-
delete
(trans: galaxy.managers.context.ProvidesUserContext, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: typing.Dict[str, typing.Any] = None, **kwd)[source]¶ - DELETE /api/libraries/{id}
- marks the library with the given
id
as deleted (or removes the deleted mark if the undelete param is true)
Note
Currently, only admin users can un/delete libraries.
Parameters: - id (an encoded id string) – the encoded id of the library to un/delete
- payload – dictionary structure containing: :param undelete: (optional) flag specifying whether the item should be deleted or undeleted, defaults to false: :type undelete: bool
Type: dictionary
Returns: detailed library information
Return type: dictionary
-
get_permissions
(trans: galaxy.managers.context.ProvidesUserContext, encoded_library_id: galaxy.schema.fields.EncodedDatabaseIdField, **kwd)[source]¶ - GET /api/libraries/{encoded_library_id}/permissions
Load all permissions for the given library id and return it.
Parameters: Returns: dictionary with all applicable permissions’ values
Return type: dictionary
Raises: InsufficientPermissionsException
-
index
(self, trans, **kwd)[source]¶ - GET /api/libraries:
- Returns a list of summary data for all libraries.
Parameters: deleted (boolean (optional)) – if True, show only deleted
libraries, if False show onlynon-deleted
Returns: list of dictionaries containing library information Return type: list
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_permissions
(trans: galaxy.managers.context.ProvidesUserContext, encoded_library_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: typing.Dict[str, typing.Any], **kwd)[source]¶ POST /api/libraries/{encoded_library_id}/permissions
Set permissions of the given library to the given role ids.
Parameters: - encoded_library_id (an encoded id string) – the encoded id of the library to set the permissions of
- payload –
dictionary structure containing:
param action: (required) describes what action should be performed available actions: remove_restrictions, set_permissions type action: str param access_ids[]: list of Role.id defining roles that should have access permission on the library type access_ids[]: string or list param add_ids[]: list of Role.id defining roles that should have add item permission on the library type add_ids[]: string or list param manage_ids[]: list of Role.id defining roles that should have manage permission on the library type manage_ids[]: string or list param modify_ids[]: list of Role.id defining roles that should have modify permission on the library type modify_ids[]: string or list
Type: dictionary
Returns: dict of current roles for all available permission types
Return type: dictionary
Raises: RequestParameterInvalidException, InsufficientPermissionsException, InternalServerError RequestParameterMissingException
-
show
(self, trans, id, deleted='False', **kwd)[source]¶ - GET /api/libraries/{encoded_id}:
- returns detailed information about a library
- GET /api/libraries/deleted/{encoded_id}:
- returns detailed information about a
deleted
library
Parameters: id (an encoded id string) – the encoded id of the library Returns: detailed library information Return type: dictionary Raises: MalformedId, ObjectNotFound
-
update
(trans: galaxy.managers.context.ProvidesUserContext, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: typing.Dict[str, str], **kwd)[source]¶ - PATCH /api/libraries/{encoded_id}
- Updates the library defined by an
encoded_id
with the data in the payload.
Note
Currently, only admin users can update libraries. Also the library must not be deleted.
param id: the encoded id of the library type id: an encoded id string param payload: dictionary structure containing:: :param name: new library’s name, cannot be empty :type name: str :param description: new library’s description :type description: str :param synopsis: new library’s synopsis :type synopsis: str type payload: dict returns: detailed library information rtype: dict raises: RequestParameterMissingException
-
galaxy.webapps.galaxy.api.library_contents module¶
API operations on the contents of a data library.
-
class
galaxy.webapps.galaxy.api.library_contents.
LibraryContentsController
(app: galaxy.structured_app.StructuredApp, hda_manager: galaxy.managers.hdas.HDAManager)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesLibraryMixinItems
,galaxy.webapps.base.controller.UsesFormDefinitionsMixin
,galaxy.actions.library.LibraryActions
-
__init__
(app: galaxy.structured_app.StructuredApp, hda_manager: galaxy.managers.hdas.HDAManager)[source]¶
-
create
(trans, library_id, payload, **kwd)[source]¶ POST /api/libraries/{library_id}/contents:
Create a new library file or folder.
To copy an HDA into a library send
create_type
of ‘file’ and the HDA’s encoded id infrom_hda_id
(and optionallyldda_message
).To copy an HDCA into a library send
create_type
of ‘file’ and the HDCA’s encoded id infrom_hdca_id
(and optionallyldda_message
).Parameters: - library_id (str) – the encoded id of the library where to create the new item
- payload (dict) –
dictionary structure containing:
- folder_id: the encoded id of the parent folder of the new item
- create_type: the type of item to create (‘file’, ‘folder’ or ‘collection’)
- from_hda_id: (optional, only if create_type is ‘file’) the
- encoded id of an accessible HDA to copy into the library
- ldda_message: (optional) the new message attribute of the LDDA created
- extended_metadata: (optional) sub-dictionary containing any extended
- metadata to associate with the item
- upload_option: (optional) one of ‘upload_file’ (default), ‘upload_directory’ or ‘upload_paths’
- server_dir: (optional, only if upload_option is
- ’upload_directory’) relative path of the subdirectory of Galaxy
library_import_dir
(if admin) oruser_library_import_dir
(if non-admin) to upload. All and only the files (i.e. no subdirectories) contained in the specified directory will be uploaded.
- filesystem_paths: (optional, only if upload_option is
- ’upload_paths’ and the user is an admin) file paths on the Galaxy server to upload to the library, one file per line
- link_data_only: (optional, only when upload_option is
- ’upload_directory’ or ‘upload_paths’) either ‘copy_files’ (default) or ‘link_to_files’. Setting to ‘link_to_files’ symlinks instead of copying the files
- name: (optional, only if create_type is ‘folder’) name of the
- folder to create
- description: (optional, only if create_type is ‘folder’)
- description of the folder to create
- tag_using_filenames: (optional)
- create tags on datasets using the file’s original name
- tags: (optional)
- create the given list of tags on datasets
Returns: a dictionary describing the new item unless
from_hdca_id
is supplied, in that case a list of such dictionaries is returned.Return type:
-
delete
(trans, library_id, id, **kwd)[source]¶ DELETE /api/libraries/{library_id}/contents/{id}
Delete the LibraryDataset with the given
id
.Parameters: Return type: Returns: an error object if an error occurred or a dictionary containing: * id: the encoded id of the library dataset, * deleted: if the library dataset was marked as deleted, * purged: if the library dataset was purged
-
index
(trans, library_id, **kwd)[source]¶ GET /api/libraries/{library_id}/contents:
Return a list of library files and folders.
Note
This endpoint is slow for large libraries. Returns all content traversing recursively through all folders.
See also
galaxy.webapps.galaxy.api.FolderContentsController.index
for a faster non-recursive solutionParameters: library_id (str) – the encoded id of the library Returns: list of dictionaries of the form: - id: the encoded id of the library item
- name: the ‘library path’
- or relationship of the library item to the root
- type: ‘file’ or ‘folder’
- url: the url to get detailed information on the library item
Return type: list Raises: MalformedId, InconsistentDatabase, RequestParameterInvalidException, InternalServerError
-
show
(trans, id, library_id, **kwd)[source]¶ GET /api/libraries/{library_id}/contents/{id}
Returns information about library file or folder.
Parameters: Returns: detailed library item information
Return type:
-
galaxy.webapps.galaxy.api.library_datasets module¶
API operations on the library datasets.
-
class
galaxy.webapps.galaxy.api.library_datasets.
LibraryDatasetsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesVisualizationMixin
,galaxy.actions.library.LibraryActions
-
delete
(trans, encoded_dataset_id, **kwd)[source]¶ DELETE /api/libraries/datasets/{encoded_dataset_id}
Mark the dataset deleted or undeleted.
Parameters: - encoded_dataset_id (an encoded id string) – the encoded id of the dataset to change
- undelete (bool) – flag whether to undeleted instead of deleting
Returns: dict containing information about the dataset
Return type: dictionary
-
download
(trans, archive_format, **kwd)[source]¶ GET /api/libraries/datasets/download/{archive_format} POST /api/libraries/datasets/download/{archive_format}
Download requested datasets (identified by encoded IDs) in requested archive_format.
example:
GET localhost:8080/api/libraries/datasets/download/tbz?ld_ids%255B%255D=a0d84b45643a2678&ld_ids%255B%255D=fe38c84dcd46c828
Note
supported archive_format values are: ‘zip’, ‘tgz’, ‘tbz’, ‘uncompressed’
Parameters: - archive_format (string) – string representing requested archive archive_format
- ld_ids[] (an array) – an array of encoded dataset ids
- folder_ids[] (an array) – an array of encoded folder ids
Returns: either archive with the requested datasets packed inside or a single uncompressed dataset
Return type: Raises: MessageException, ItemDeletionException, ItemAccessibilityException, HTTPBadRequest, OSError, IOError, ObjectNotFound
-
load
(trans, payload=None, **kwd)[source]¶ POST /api/libraries/datasets
Load dataset(s) from the given source into the library.
Parameters: payload – dictionary structure containing: :param encoded_folder_id: the encoded id of the folder to import dataset(s) to :type encoded_folder_id: an encoded id string :param source:
source the datasets should be loaded from. Source can be:- user directoryroot folder specified in galaxy.ini as “$user_library_import_dir” example path: path/to/galaxy/$user_library_import_dir/user@example.com/{user can browse everything here} the folder with the user login has to be created beforehand
- (admin)import directoryroot folder specified in galaxy ini as “$library_import_dir” example path: path/to/galaxy/$library_import_dir/{admin can browse everything here}
- (admin)any absolute or relative pathoption allowed with “allow_library_path_paste” in galaxy.ini
type source: str param link_data: flag whether to link the dataset to data or copy it to Galaxy, defaults to copy while linking is set to True all symlinks will be resolved _once_ type link_data: bool param preserve_dirs: flag whether to preserve the directory structure when importing dir if False only datasets will be imported type preserve_dirs: bool param file_type: file type of the loaded datasets, defaults to ‘auto’ (autodetect) type file_type: str param dbkey: dbkey of the loaded genome, defaults to ‘?’ (unknown) type dbkey: str param tag_using_filenames: flag whether to generate dataset tags from filenames type tag_using_filenames: bool :type dictionary
Returns: dict containing information about the created upload job Return type: dictionary Raises: RequestParameterMissingException, AdminRequiredException, ConfigDoesNotAllowException, RequestParameterInvalidException InsufficientPermissionsException, ObjectNotFound - user directory
-
show
(trans, id, **kwd)[source]¶ GET /api/libraries/datasets/{encoded_dataset_id}
Show the details of a library dataset.
Parameters: id (an encoded id string) – the encoded id of the library dataset to query Returns: detailed library dataset information Return type: dictionary
-
show_roles
(trans, encoded_dataset_id, **kwd)[source]¶ GET /api/libraries/datasets/{encoded_dataset_id}/permissions
Display information about current or available roles for a given dataset permission.
Parameters: - encoded_dataset_id (an encoded id string) – the encoded id of the dataset to query
- scope (string) – either ‘current’ or ‘available’
Returns: either dict of current roles for all permission types or dict of available roles to choose from (is the same for any permission type)
Return type: dictionary
Raises: InsufficientPermissionsException
-
show_version
(trans, encoded_dataset_id, encoded_ldda_id, **kwd)[source]¶ GET /api/libraries/datasets/{encoded_dataset_id}/versions/{encoded_ldda_id}
Display a specific version of a library dataset (i.e. ldda).
Parameters: - encoded_dataset_id (an encoded id string) – the encoded id of the related library dataset
- encoded_ldda_id (an encoded id string) – the encoded id of the ldda to query
Returns: dict of ldda’s details
Return type: dictionary
Raises: ObjectNotFound
-
update
(trans, encoded_dataset_id, payload=None, **kwd)[source]¶ PATCH /api/libraries/datasets/{encoded_dataset_id}
Update the given library dataset (the latest linked ldda).
Parameters: - encoded_dataset_id (an encoded id string) – the encoded id of the library dataset to update
- payload (dict) – dictionary structure containing:: :param name: new ld’s name, must be longer than 0 :type name: str :param misc_info: new ld’s misc info :type misc_info: str :param file_ext: new ld’s extension, must exist in the Galaxy registry :type file_ext: str :param genome_build: new ld’s genome build :type genome_build: str :param tags: list of dataset tags :type tags: list
Returns: detailed library dataset information
Return type: dictionary
-
update_permissions
(trans, encoded_dataset_id, payload=None, **kwd)[source]¶ POST /api/libraries/datasets/{encoded_dataset_id}/permissions
Set permissions of the given library dataset to the given role ids.
Parameters: - encoded_dataset_id (an encoded id string) – the encoded id of the dataset to update permissions of
- payload –
dictionary structure containing:
param action: (required) describes what action should be performed available actions: make_private, remove_restrictions, set_permissions type action: string param access_ids[]: list of Role.id defining roles that should have access permission on the dataset type access_ids[]: string or list param manage_ids[]: list of Role.id defining roles that should have manage permission on the dataset type manage_ids[]: string or list param modify_ids[]: list of Role.id defining roles that should have modify permission on the library dataset item type modify_ids[]: string or list
Type: dictionary
Returns: dict of current roles for all available permission types
Return type: dictionary
Raises: RequestParameterInvalidException, ObjectNotFound, InsufficientPermissionsException, InternalServerError RequestParameterMissingException
-
galaxy.webapps.galaxy.api.licenses module¶
-
class
galaxy.webapps.galaxy.api.licenses.
FastAPILicenses
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
get
(*, id=Path(Ellipsis)) → galaxy.managers.licenses.LicenseMetadataModel[source]¶ Returns the license metadata associated with the given [SPDX license short ID](https://spdx.github.io/spdx-spec/appendix-I-SPDX-license-list/).
-
index
() → typing.List[galaxy.managers.licenses.LicenseMetadataModel][source]¶ Returns an index with all the available [SPDX licenses](https://spdx.org/licenses/).
-
licenses_manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.licenses.
LicensesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
get
(trans, id, **kwd)[source]¶ GET /api/licenses/<license_id>
Return license metadata by URI or SPDX id.
-
licenses_manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.metrics module¶
API operations for for querying and recording user metrics from some client (typically a user’s browser).
-
class
galaxy.webapps.galaxy.api.metrics.
FastAPIMetrics
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
create
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), payload: galaxy.managers.metrics.CreateMetricsPayload = Body(Ellipsis)) → typing.Any[source]¶ Record any metrics sent and return some status object.
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.metrics.
MetricsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
create
(trans, payload, **kwd)[source]¶ POST /api/metrics
Record any metrics sent and return some status object.
Note
Anonymous users can post metrics
Parameters: payload (dict) – (optional) dictionary structure containing: * metrics: a list containing dictionaries of the form
namespace: label indicating the source of the metric time: isoformat datetime when the metric was recorded level: an integer representing the metric’s log level args: a json string containing an array of extra dataReturn type: dict Returns: status object
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.page_revisions module¶
API for updating Galaxy Pages
-
class
galaxy.webapps.galaxy.api.page_revisions.
PageRevisionsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
create
(self, trans, page_id, payload **kwd)[source]¶ - POST /api/pages/{page_id}/revisions
- Create a new revision for a page
Parameters: - page_id – Add revision to Page with ID=page_id
- payload – A dictionary containing:: ‘content’ = New content of new page revision
Return type: dictionary
Returns: Dictionary with ‘success’ or ‘error’ element to indicate the result of the request
-
index
(self, trans, page_id, **kwd)[source]¶ - GET /api/pages/{page_id}/revisions
- return a list of Page revisions
Parameters: page_id – Display the revisions of Page with ID=page_id Return type: list Returns: dictionaries containing different revisions of the page
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.pages module¶
API for updating Galaxy Pages
-
class
galaxy.webapps.galaxy.api.pages.
FastAPIPages
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
create
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), payload: galaxy.schema.schema.CreatePagePayload = Body(Ellipsis)) → galaxy.schema.schema.PageSummary[source]¶ Get a list with details of all Pages available to the user.
-
delete
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis))[source]¶ Marks the Page with the given ID as deleted.
-
disable_link_access
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item inaccessible by a URL link and return the current sharing status.
-
enable_link_access
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item accessible by a URL link and return the current sharing status.
-
index
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), deleted: bool = Query(False)) → galaxy.schema.schema.PageSummaryList[source]¶ Get a list with summary information of all Pages available to the user.
-
publish
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item publicly available by a URL link and return the current sharing status.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_slug
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.schema.schema.SetSlugPayload = Body(Ellipsis))[source]¶ Sets a new slug to access this item by URL. The new slug must be unique.
Shares this item with specific users and return the current sharing status.
-
sharing
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Return the sharing status of the item.
-
show
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.PageDetails[source]¶ Return summary information about a specific Page and the content of the last revision.
-
-
class
galaxy.webapps.galaxy.api.pages.
PagesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTful controller for interactions with pages.
-
create
(self, trans, payload, **kwd)[source]¶ - POST /api/pages
- Create a page and return dictionary containing Page summary
Parameters: payload – dictionary structure containing:: ‘slug’ = The title slug for the page URL, must be unique ‘title’ = Title of the page ‘content’ = contents of the first page revision (type dependent on content_format) ‘content_format’ = ‘html’ or ‘markdown’ ‘annotation’ = Annotation that will be attached to the page Return type: dict Returns: Dictionary return of the Page.to_dict call
-
delete
(self, trans, id, **kwd)[source]¶ - DELETE /api/pages/{id}
- Create a page and return dictionary containing Page summary
Parameters: id – ID of page to be deleted Return type: dict Returns: Dictionary with ‘success’ or ‘error’ element to indicate the result of the request
-
index
(self, trans, deleted=False, **kwd)[source]¶ - GET /api/pages
- return a list of Pages viewable by the user
Parameters: deleted – Display deleted pages Return type: list Returns: dictionaries containing summary or detailed Page information
-
service
= GalaxyTypeDepends(_do_resolve)¶
- PUT /api/pages/{id}/share_with_users
-
show
(self, trans, id, **kwd)[source]¶ - GET /api/pages/{id}
- View a page summary and the content of the latest revision
Parameters: id – ID of page to be displayed Return type: dict Returns: Dictionary return of the Page.to_dict call with the ‘content’ field populated by the most recent revision
-
show_pdf
(trans, id, **kwd)[source]¶ GET /api/pages/{id}.pdf
View a page summary and the content of the latest revision as PDF.
Parameters: id – ID of page to be displayed Return type: dict Returns: Dictionary return of the Page.to_dict call with the ‘content’ field populated by the most recent revision
-
galaxy.webapps.galaxy.api.plugins module¶
Plugins resource control over the API.
-
class
galaxy.webapps.galaxy.api.plugins.
PluginsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTful controller for interactions with plugins.
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
history_manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.provenance module¶
API operations provenance
-
class
galaxy.webapps.galaxy.api.provenance.
BaseProvenanceController
(app: galaxy.structured_app.StructuredApp)[source]¶
-
class
galaxy.webapps.galaxy.api.provenance.
HDAProvenanceController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.provenance.BaseProvenanceController
-
controller_name
= 'history_content_provenance'¶
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
provenance_item_class
= 'HistoryDatasetAssociation'¶
-
provenance_item_id
= 'history_content_id'¶
-
-
class
galaxy.webapps.galaxy.api.provenance.
LDDAProvenanceController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.provenance.BaseProvenanceController
-
controller_name
= 'ldda_provenance'¶
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
provenance_item_class
= 'LibraryDatasetDatasetAssociation'¶
-
provenance_item_id
= 'library_content_id'¶
-
galaxy.webapps.galaxy.api.quotas module¶
API operations on Quota objects.
-
class
galaxy.webapps.galaxy.api.quotas.
FastAPIQuota
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
create
(*, payload: galaxy.quota._schema.CreateQuotaParams, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans)) → galaxy.quota._schema.CreateQuotaResult[source]¶ Creates a new quota.
-
delete
(*, id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), payload: galaxy.quota._schema.DeleteQuotaPayload = Body(None)) → str[source]¶ Deletes an existing quota.
-
index
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans)) → galaxy.quota._schema.QuotaSummaryList[source]¶ Displays a list with information of quotas that are currently active.
-
index_deleted
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans)) → galaxy.quota._schema.QuotaSummaryList[source]¶ Displays a list with information of quotas that have been deleted.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.quota._schema.QuotaDetails[source]¶ Displays details on a particular active quota.
-
show_deleted
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.quota._schema.QuotaDetails[source]¶ Displays details on a particular quota that has been deleted.
-
-
class
galaxy.webapps.galaxy.api.quotas.
QuotaAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
index
(trans, deleted='False', **kwd)[source]¶ GET /api/quotas GET /api/quotas/deleted Displays a collection (list) of quotas.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
show
(trans, id, deleted='False', **kwd)[source]¶ GET /api/quotas/{encoded_quota_id} GET /api/quotas/deleted/{encoded_quota_id} Displays information about a quota.
-
galaxy.webapps.galaxy.api.remote_files module¶
API operations on remote files.
-
class
galaxy.webapps.galaxy.api.remote_files.
FastAPIRemoteFiles
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
index
(*, user_ctx: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), target: str = Query(ftpdir), format: typing.Optional[galaxy.schema.remote_files.RemoteFilesFormat] = Query(uri), recursive: typing.Optional[bool] = Query(None), disable: typing.Optional[galaxy.schema.remote_files.RemoteFilesDisableMode] = Query(None)) → typing.List[typing.Dict[str, typing.Any]][source]¶ Lists all remote files available to the user from different sources.
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.remote_files.
RemoteFilesAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
index
(trans: galaxy.managers.context.ProvidesUserContext, **kwd)[source]¶ GET /api/remote_files/
Displays remote files.
Parameters: - target (str) – target to load available datasets from, defaults to ftpdir possible values: ftpdir, userdir, importdir
- format – requested format of data, defaults to flat possible values: flat, jstree
Returns: list of available files
Return type:
-
manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.roles module¶
API operations on Role objects.
-
class
galaxy.webapps.galaxy.api.roles.
FastAPIRoles
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
create
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), role_definition_model: galaxy.schema.schema.RoleDefinitionModel = Body(Ellipsis)) → galaxy.schema.schema.RoleModel[source]¶
-
index
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans)) → galaxy.schema.schema.RoleListModel[source]¶
-
role_manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.roles.
RoleAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
create
(trans: galaxy.managers.context.ProvidesUserContext, payload, **kwd)[source]¶ POST /api/roles Creates a new role.
-
index
(trans: galaxy.managers.context.ProvidesUserContext, **kwd)[source]¶ GET /api/roles Displays a collection (list) of roles.
-
role_manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.search module¶
API for searching Galaxy Datasets
-
class
galaxy.webapps.galaxy.api.search.
SearchController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.SharableItemSecurityMixin
galaxy.webapps.galaxy.api.tags module¶
API Controller providing Galaxy Tags
Bases:
object
Replaces the tags associated with an item with the new ones specified in the payload.
- The previous tags will be __deleted__.
- If no tags are provided in the request body, the currently associated tags will also be __deleted__.
Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
PUT /api/tags/
Apply a new set of tags to an item; previous tags are deleted.
galaxy.webapps.galaxy.api.tool_data module¶
-
class
galaxy.webapps.galaxy.api.tool_data.
FastAPIToolData
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
delete
(*, payload: galaxy.tools.data._schema.ToolDataItem, table_name: str = Path(Ellipsis)) → galaxy.tools.data._schema.ToolDataDetails[source]¶ Removes an item from a data table and reloads it to return its updated details.
-
download_field_file
(*, table_name: str = Path(Ellipsis), field_name: str = Path(Ellipsis), file_name: str = Path(Ellipsis))[source]¶ Download a file associated with the data table field.
-
index
() → galaxy.tools.data._schema.ToolDataEntryList[source]¶ Get the list of all available data tables.
-
reload
(*, table_name: str = Path(Ellipsis)) → galaxy.tools.data._schema.ToolDataDetails[source]¶ Reloads a data table and return its details.
-
show
(*, table_name: str = Path(Ellipsis)) → galaxy.tools.data._schema.ToolDataDetails[source]¶ Get details of a given tool data table.
-
show_field
(*, table_name: str = Path(Ellipsis), field_name: str = Path(Ellipsis)) → galaxy.tools.data._schema.ToolDataField[source]¶ Reloads a data table and return its details.
-
tool_data_manager
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.tool_data.
ToolData
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTful controller for interactions with tool data
-
delete
(trans: galaxy.managers.context.ProvidesAppContext, id, **kwd)[source]¶ DELETE /api/tool_data/{id} Removes an item from a data table
Parameters:
-
download_field_file
(trans: galaxy.managers.context.ProvidesAppContext, id: str, value, path, **kwds)[source]¶
-
index
(trans: galaxy.managers.context.ProvidesAppContext, **kwds)[source]¶ GET /api/tool_data
Return a list tool_data tables.
-
show_field
(trans: galaxy.managers.context.ProvidesAppContext, id, value, **kwds)[source]¶ GET /api/tool_data/<id>/fields/<value>
Get information about a partiular field in a tool_data table
-
tool_data_manager
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.tool_dependencies module¶
API operations allowing clients to manage tool dependencies.
-
class
galaxy.webapps.galaxy.api.tool_dependencies.
ToolDependenciesAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
index
(trans: galaxy.managers.context.ProvidesAppContext, **kwd)[source]¶ GET /api/dependency_resolvers
-
show
(trans: galaxy.managers.context.ProvidesAppContext, id: str)[source]¶ GET /api/dependency_resolvers/<id>
-
update
(trans)[source]¶ PUT /api/dependency_resolvers
Reload tool dependency resolution configuration.
-
resolver_dependency
(trans: galaxy.managers.context.ProvidesAppContext, id: str, **kwds)[source]¶ GET /api/dependency_resolvers/{index}/dependency
Resolve described requirement against specified dependency resolver.
Parameters: - index (int) – index of the dependency resolver
- kwds (dict) – dictionary structure containing extra parameters
- name (str) – name of the requirement to find a dependency for (required)
- version (str) – version of the requirement to find a dependency for (required)
- exact (bool) – require an exact match to specify requirement (do not discard version information to resolve dependency).
Return type: Returns: a dictified description of the dependency, with attribute
dependency_type: None
if no match was found.
-
install_dependency
(trans: galaxy.managers.context.ProvidesAppContext, id: typing.Optional[str] = None, **kwds)[source]¶ POST /api/dependency_resolvers/{index}/dependency POST /api/dependency_resolvers/dependency
Install described requirement against specified dependency resolver.
Parameters: - index (int) – index of the dependency resolver
- kwds (dict) – dictionary structure containing extra parameters
- name (str) – name of the requirement to find a dependency for (required)
- version (str) – version of the requirement to find a dependency for (required)
- exact (bool) – require an exact match to specify requirement (do not discard version information to resolve dependency).
- tool_id (str) – tool_id to install requirements for
Return type: Returns: a dictified description of the dependency, with attribute
dependency_type: None
if no match was found.
-
manager_dependency
(trans: galaxy.managers.context.ProvidesAppContext, **kwds)[source]¶ GET /api/dependency_resolvers/dependency
Resolve described requirement against all dependency resolvers, returning the match with highest priority.
Parameters: - index (int) – index of the dependency resolver
- kwds (dict) – dictionary structure containing extra parameters
- name (str) – name of the requirement to find a dependency for (required)
- version (str) – version of the requirement to find a dependency for (required)
- exact (bool) – require an exact match to specify requirement (do not discard version information to resolve dependency).
Return type: Returns: a dictified description of the dependency, with type: None if no match was found.
-
resolver_requirements
(trans: galaxy.managers.context.ProvidesAppContext, id, **kwds)[source]¶ GET /api/dependency_resolvers/{index}/requirements
Find all “simple” requirements that could be resolved “exactly” by this dependency resolver. The dependency resolver must implement ListDependencyResolver.
Parameters: index (int) – index of the dependency resolver Return type: dict Returns: a dictified description of the requirement that could be resolved.
-
manager_requirements
(trans: galaxy.managers.context.ProvidesAppContext, **kwds)[source]¶ GET /api/dependency_resolvers/requirements
Find all “simple” requirements that could be resolved “exactly” by all dependency resolvers that support this operation.
Parameters: index (int) – index of the dependency resolver Return type: dict Returns: a dictified description of the requirement that could be resolved (keyed on ‘requirement’) and the index of the corresponding resolver (keyed on ‘index’).
-
clean
(trans: galaxy.managers.context.ProvidesAppContext, id=None, **kwds)[source]¶ POST /api/dependency_resolvers/{index}/clean
Cleans up intermediate files created by resolvers during the dependency installation.
Parameters: index (int) – index of the dependency resolver Return type: dict Returns: a dictified description of the requirement that could be resolved (keyed on ‘requirement’) and the index of the corresponding resolver (keyed on ‘index’).
-
summarize_toolbox
(trans: galaxy.managers.context.ProvidesAppContext, **kwds)[source]¶ GET /api/dependency_resolvers/toolbox
Summarize requirements across toolbox (for Tool Management grid). This is an experiemental API particularly tied to the GUI - expect breaking changes until this notice is removed.
Container resolution via this API is especially experimental and the container resolution API should be used to summarize this information instead in most cases.
Parameters: - index (int) – index of the dependency resolver
- tool_ids (str) – tool_id to install dependency for
- resolver_type (str) – restrict to uninstall to specified resolver type
- include_containers (bool) – include container resolvers in resolution
- container_type (str) – restrict to uninstall to specified container type
- index_by (str) – By default consider only context of requirements, group tools by requirements. Set this to ‘tools’ to summarize across all tools though. Tools may provide additional context for container resolution for instance.
Return type: Returns: dictified descriptions of the dependencies, with attribute
dependency_type: None
if no match was found.
-
toolbox_install
(trans: galaxy.managers.context.ProvidesAppContext, payload, index=None, **kwds)[source]¶ POST /api/dependency_resolvers/{index}/toolbox/install POST /api/dependency_resolvers/toolbox/install
Install described requirement against specified dependency resolver(s). This is an experiemental API particularly tied to the GUI - expect breaking changes until this notice is removed.
Parameters: - index (int) – index of the dependency resolver
- tool_ids (str) – tool_id to install dependency for
- resolver_type (str) – restrict to uninstall to specified resolver type
- include_containers (bool) – include container resolvers in resolution
- container_type (str) – restrict to uninstall to specified container type
-
toolbox_uninstall
(trans: galaxy.managers.context.ProvidesAppContext, payload, index=None, **kwds)[source]¶ POST /api/dependency_resolvers/{index}/toolbox/uninstall POST /api/dependency_resolvers/toolbox/uninstall
Uninstall described requirement against specified dependency resolver(s). This is an experiemental API particularly tied to the GUI - expect breaking changes until this notice is removed.
Parameters: - index (int) – index of the dependency resolver
- tool_ids (str) – tool_id to install dependency for
- include_containers (bool) – include container resolvers in resolution
- container_type (str) – restrict to uninstall to specified container type
- resolver_type (str) – restrict to uninstall to specified resolver type
-
galaxy.webapps.galaxy.api.tool_entry_points module¶
API for asynchronous job running mechanisms can use to fetch or put files related to running and queued jobs.
-
class
galaxy.webapps.galaxy.api.tool_entry_points.
ToolEntryPointsAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
access_entry_point
(trans: galaxy.managers.context.ProvidesUserContext, id, **kwd)[source]¶ - GET /api/entry_points/{id}/access
- Return the URL target described by the entry point.
Parameters: id (string) – Encoded entry point id Return type: dictionary Returns: dictionary containing target for interactivetool entry point
-
index
(trans: galaxy.managers.context.ProvidesUserContext, running=False, job_id=None, **kwd)[source]¶ - GET /api/entry_points
- Returns tool entry point information. Currently passing a job_id parameter is required, as this becomes more general that won’t be needed.
Parameters: - job_id (string) – Encoded job id
- running (boolean) – filter to only include running job entry points.
Return type: Returns: list of entry point dictionaries.
-
galaxy.webapps.galaxy.api.tool_shed_repositories module¶
-
class
galaxy.webapps.galaxy.api.tool_shed_repositories.
ToolShedRepositoriesController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTful controller for interactions with tool shed repositories.
-
check_for_updates
(trans, **kwd)[source]¶ GET /api/tool_shed_repositories/check_for_updates Check for updates to the specified repository, or all installed repositories.
Parameters: id – the encoded repository id
-
index
(trans: galaxy.managers.context.ProvidesUserContext, **kwd)[source]¶ GET /api/tool_shed_repositories Display a list of dictionaries containing information about installed tool shed repositories.
-
install_repository_revision
(trans: galaxy.managers.context.ProvidesUserContext, payload, **kwd)[source]¶ POST /api/tool_shed_repositories/install_repository_revision Install a specified repository revision from a specified tool shed into Galaxy.
Parameters: key – the current Galaxy admin user’s API key The following parameters are included in the payload. :param tool_shed_url (required): the base URL of the Tool Shed from which to install the Repository :param name (required): the name of the Repository :param owner (required): the owner of the Repository :param changeset_revision (required): the changeset_revision of the RepositoryMetadata object associated with the Repository :param new_tool_panel_section_label (optional):
label of a new section to be added to the Galaxy tool panel in which to load tools contained in the Repository. Either this parameter must be an empty string or the tool_panel_section_id parameter must be an empty string or both must be an empty string (both cannot be used simultaneously).Parameters: - (optional) (shed_tool_conf) – id of the Galaxy tool panel section in which to load tools contained in the Repository. If this parameter is an empty string and the above new_tool_panel_section_label parameter is an empty string, tools will be loaded outside of any sections in the tool panel. Either this parameter must be an empty string or the tool_panel_section_id parameter must be an empty string of both must be an empty string (both cannot be used simultaneously).
- (optional) – Set to True if you want to install repository dependencies defined for the specified repository being installed. The default setting is False.
- (optional) – Set to True if you want to install tool dependencies defined for the specified repository being installed. The default setting is False.
- (optional) – The shed-related tool panel configuration file configured in the “tool_config_file” setting in the Galaxy config file (e.g., galaxy.ini). At least one shed-related tool panel config file is required to be configured. Setting this parameter to a specific file enables you to choose where the specified repository will be installed because the tool_path attribute of the <toolbox> from the specified file is used as the installation location (e.g., <toolbox tool_path=”database/shed_tools”>). If this parameter is not set, a shed-related tool panel configuration file will be selected automatically.
-
install_repository_revisions
(trans, payload, **kwd)[source]¶ POST /api/tool_shed_repositories/install_repository_revisions Install one or more specified repository revisions from one or more specified tool sheds into Galaxy. The received parameters must be ordered lists so that positional values in tool_shed_urls, names, owners and changeset_revisions are associated.
It’s questionable whether this method is needed as the above method for installing a single repository can probably cover all desired scenarios. We’ll keep this one around just in case…
Parameters: key – the current Galaxy admin user’s API key The following parameters are included in the payload. :param tool_shed_urls: the base URLs of the Tool Sheds from which to install a specified Repository :param names: the names of the Repositories to be installed :param owners: the owners of the Repositories to be installed :param changeset_revisions: the changeset_revisions of each RepositoryMetadata object associated with each Repository to be installed :param new_tool_panel_section_label:
optional label of a new section to be added to the Galaxy tool panel in which to load tools contained in the Repository. Either this parameter must be an empty string or the tool_panel_section_id parameter must be an empty string, as both cannot be used.Parameters: - tool_panel_section_id – optional id of the Galaxy tool panel section in which to load tools contained in the Repository. If not set, tools will be loaded outside of any sections in the tool panel. Either this parameter must be an empty string or the tool_panel_section_id parameter must be an empty string, as both cannot be used.
- (optional) (shed_tool_conf) – Set to True if you want to install repository dependencies defined for the specified repository being installed. The default setting is False.
- (optional) – Set to True if you want to install tool dependencies defined for the specified repository being installed. The default setting is False.
- (optional) – The shed-related tool panel configuration file configured in the “tool_config_file” setting in the Galaxy config file (e.g., galaxy.ini). At least one shed-related tool panel config file is required to be configured. Setting this parameter to a specific file enables you to choose where the specified repository will be installed because the tool_path attribute of the <toolbox> from the specified file is used as the installation location (e.g., <toolbox tool_path=”database/shed_tools”>). If this parameter is not set, a shed-related tool panel configuration file will be selected automatically.
-
reset_metadata_on_installed_repositories
(trans, payload, **kwd)[source]¶ PUT /api/tool_shed_repositories/reset_metadata_on_installed_repositories
Resets all metadata on all repositories installed into Galaxy in an “orderly fashion”.
Parameters: key – the API key of the Galaxy admin user.
-
show
(trans, id, **kwd)[source]¶ GET /api/tool_shed_repositories/{encoded_tool_shed_repsository_id}
Display a dictionary containing information about a specified tool_shed_repository.
Parameters: id – the encoded id of the ToolShedRepository object
-
uninstall_repository
(trans, id=None, **kwd)[source]¶ DELETE /api/tool_shed_repositories/id DELETE /api/tool_shed_repositories/
Parameters: - id – encoded repository id. Either id or name, owner, changeset_revision and tool_shed_url need to be supplied
- kwd – ‘remove_from_disk’: Remove repository from disk or deactivate repository. Defaults to True (= remove repository from disk). ‘name’: Repository name ‘owner’: Repository owner ‘changeset_revision’: Changeset revision to uninstall ‘tool_shed_url’: Tool Shed URL
-
galaxy.webapps.galaxy.api.tools module¶
-
class
galaxy.webapps.galaxy.api.tools.
ToolsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesVisualizationMixin
RESTful controller for interactions with tools.
-
all_requirements
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwds)[source]¶ GET /api/tools/all_requirements Return list of unique requirements for all tools.
-
build
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}/build Returns a tool model including dynamic parameters and updated values, repeats block etc.
-
build_dependency_cache
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwds)[source]¶ POST /api/tools/{tool_id}/build_dependency_cache Attempts to cache installed dependencies.
- parameters:
- force_rebuild: If true and chache dir exists, attempts to delete cache dir
-
conversion
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, tool_id, payload, **kwd)[source]¶
-
create
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload, **kwd)[source]¶ POST /api/tools Execute tool with a given parameter payload
Parameters: input_format (str) – input format for the payload. Possible values are the default ‘legacy’ (where inputs nested inside conditionals or repeats are identified with e.g. ‘<conditional_name>|<input_name>’) or ‘21.01’ (where inputs inside conditionals or repeats are nested elements).
-
diagnostics
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}/diagnostics Return diagnostic information to help debug panel and dependency related problems.
-
error_stack
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwd)[source]¶ GET /api/tools/error_stack Returns global tool error stack
-
fetch
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload, **kwd)[source]¶ Adapt clean API to tool-constrained API.
-
hda_manager
= GalaxyTypeDepends(_do_resolve)¶
-
hdca_manager
= GalaxyTypeDepends(_do_resolve)¶
-
history_manager
= GalaxyTypeDepends(_do_resolve)¶
-
index
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwds)[source]¶ GET /api/tools
returns a list of tools defined by parameters
Parameters: - in_panel – if true, tools are returned in panel structure, including sections and labels
- view – ToolBox view to apply (default is ‘default’)
- trackster – if true, only tools that are compatible with Trackster are returned
- q – if present search on the given query will be performed
- tool_id – if present the given tool_id will be searched for all installed versions
-
install_dependencies
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwds)[source]¶ POST /api/tools/{tool_id}/dependencies
This endpoint is also available through POST /api/tools/{tool_id}/install_dependencies, but will be deprecated in the future.
Attempts to install requirements via the dependency resolver
- parameters:
- index:
- index of dependency resolver to use when installing dependency. Defaults to using the highest ranking resolver
resolver_type: Use the dependency resolver of this resolver_type to install dependency. build_dependency_cache: If true, attempts to cache dependencies for this tool force_rebuild: If true and cache dir exists, attempts to delete cache dir
-
raw_tool_source
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwds)[source]¶ Returns tool source.
language
is included in the response header.
-
reload
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}/reload Reload specified tool.
-
requirements
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwds)[source]¶ GET /api/tools/{tool_id}/requirements Return the resolver status for a specific tool id. [{“status”: “installed”, “name”: “hisat2”, “versionless”: false, “resolver_type”: “conda”, “version”: “2.0.3”, “type”: “package”}]
-
show
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}
Returns tool information
parameters:
io_details - if true, parameters and inputs are returned link_details - if true, hyperlink to the tool is returned tool_version - if provided return this tool version
-
test_data
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}/test_data?tool_version={tool_version}
This API endpoint is unstable and experimental. In particular the format of the response has not been entirely nailed down (it exposes too many Galaxy internals/Pythonisms in a rough way). If this endpoint is being used from outside of scripts shipped with Galaxy let us know and please be prepared for the response from this API to change its format in some ways.
If tool version is not passed, it is assumed to be latest. Tool version can be set as ‘*’ to get tests for all configured versions.
-
test_data_download
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}/test_data_download?tool_version={tool_version}&filename={filename}
-
test_data_path
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/tools/{tool_id}/test_data_path?tool_version={tool_version}
-
tests_summary
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwd)[source]¶ GET /api/tools/tests_summary
Fetch summary information for each tool and version combination with tool tests defined. This summary information currently includes tool name and a count of the tests.
Fetch complete test data for each tool with /api/tools/{tool_id}/test_data?tool_version=<tool_version>
-
uninstall_dependencies
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwds)[source]¶ DELETE /api/tools/{tool_id}/dependencies
Attempts to uninstall requirements via the dependency resolver
parameters:
index:
index of dependency resolver to use when installing dependency. Defaults to using the highest ranking resolverresolver_type: Use the dependency resolver of this resolver_type to install dependency
-
galaxy.webapps.galaxy.api.toolshed module¶
-
class
galaxy.webapps.galaxy.api.toolshed.
ToolShedController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
RESTful controller for interactions with Toolsheds.
galaxy.webapps.galaxy.api.tours module¶
API Controller providing Galaxy Tours
-
class
galaxy.webapps.galaxy.api.tours.
FastAPITours
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
registry
= GalaxyTypeDepends(_do_resolve)¶
-
-
class
galaxy.webapps.galaxy.api.tours.
ToursController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
registry
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.trs_consumer module¶
Proxy requests to GA4GH TRS servers (e.g. Dockstore).
Information on TRS can be found at https://github.com/ga4gh/tool-registry-service-schemas.
-
class
galaxy.webapps.galaxy.api.trs_consumer.
TrsConsumeAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
Controller for TRS proxying.
galaxy.webapps.galaxy.api.trs_search module¶
Proxy requests to GA4GH TRS servers (e.g. Dockstore).
Information on TRS can be found at https://github.com/ga4gh/tool-registry-service-schemas.
-
class
galaxy.webapps.galaxy.api.trs_search.
TrsSearchAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
Controller for TRS searching.
Not trying to emulate the actual underlying GA4GH API interface so throwing the search functionality into a different controller than the trs_consumer.
galaxy.webapps.galaxy.api.uploads module¶
API operations for uploaded files in storage.
-
class
galaxy.webapps.galaxy.api.uploads.
UploadsAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
-
READ_CHUNK_SIZE
= 65536¶
-
galaxy.webapps.galaxy.api.users module¶
API operations on User objects.
-
class
galaxy.webapps.galaxy.api.users.
UserAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesTagsMixin
,galaxy.webapps.base.controller.BaseUIController
,galaxy.webapps.base.controller.UsesFormDefinitionsMixin
-
add_custom_builds
(trans, id, key, payload=None, **kwd)[source]¶ PUT /api/users/{id}/custom_builds/{key} Add new custom build.
Parameters:
-
anon_user_api_value
(trans)[source]¶ Return data for an anonymous user, truncated to only usage and quota_percent
-
api_key_manager
= GalaxyTypeDepends(_do_resolve)¶
-
create
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload: dict, **kwd)[source]¶ POST /api/users Creates a new Galaxy user.
-
delete
(trans, id, **kwd)[source]¶ DELETE /api/users/{id} delete the user with the given
id
Functionality restricted based on admin statusParameters:
-
delete_custom_builds
(trans, id, key, payload=None, **kwd)[source]¶ DELETE /api/users/{id}/custom_builds/{key} Delete a custom build.
Parameters: - id (str) – the encoded id of the user
- id – custom build key to be deleted
-
get_custom_builds
(trans, id, payload=None, **kwd)[source]¶ GET /api/users/{id}/custom_builds Returns collection of custom builds.
Parameters: id (str) – the encoded id of the user
-
get_information
(trans, id, **kwd)[source]¶ GET /api/users/{id}/information/inputs Return user details such as username, email, addresses etc.
Parameters: id (str) – the encoded id of the user
-
get_permissions
(trans, id, payload=None, **kwd)[source]¶ Get the user’s default permissions for the new histories
-
get_toolbox_filters
(trans, id, payload=None, **kwd)[source]¶ API call for fetching toolbox filters data. Toolbox filters are specified in galaxy.ini. The user can activate them and the choice is stored in user_preferences.
-
index
(trans: galaxy.managers.context.ProvidesUserContext, deleted='False', f_email=None, f_name=None, f_any=None, **kwd)[source]¶ GET /api/users GET /api/users/deleted Displays a collection (list) of users.
Parameters: - deleted (bool) – (optional) If true, show deleted users
- f_email (str) – (optional) An email address to filter on. (Non-admin
users can only use this if
expose_user_email
isTrue
in galaxy.ini) - f_name (str) – (optional) A username to filter on. (Non-admin users
can only use this if
expose_user_name
isTrue
in galaxy.ini) - f_any (str) – (optional) Filter on username OR email. (Non-admin users
can use this, the email filter and username filter will
only be active if their corresponding
expose_user_*
isTrue
in galaxy.ini)
-
remove_favorite
(trans, id, object_type, object_id, payload=None, **kwd)[source]¶ Remove the object from user’s favorites DELETE /api/users/{id}/favorites/{object_type}/{object_id:.*?}
Parameters:
-
set_favorite
(trans, id, object_type, payload=None, **kwd)[source]¶ Add the object to user’s favorites PUT /api/users/{id}/favorites/{object_type}
Parameters:
-
set_information
(trans, id, payload=None, **kwd)[source]¶ PUT /api/users/{id}/information/inputs Save a user’s email, username, addresses etc.
Parameters:
-
set_password
(trans, id, payload=None, **kwd)[source]¶ Allows to the logged-in user to change own password.
-
set_permissions
(trans, id, payload=None, **kwd)[source]¶ Set the user’s default permissions for the new histories
-
set_toolbox_filters
(trans, id, payload=None, **kwd)[source]¶ API call to update toolbox filters data.
-
show
(trans: galaxy.managers.context.ProvidesUserContext, id, deleted='False', **kwd)[source]¶ GET /api/users/{encoded_id} GET /api/users/deleted/{encoded_id} GET /api/users/current Displays information about a user.
-
undelete
(trans, id, **kwd)[source]¶ POST /api/users/deleted/{id}/undelete Undelete the user with the given
id
Parameters: id (str) – the encoded id of the user to be undeleted
-
update
(self, trans, id, payload, **kwd)[source]¶ - PUT /api/users/{id}
- updates the values for the item with the given
id
Parameters: Return type: Returns: an error object if an error occurred or a dictionary containing the serialized item after any changes
-
user_deserializer
= GalaxyTypeDepends(_do_resolve)¶
-
user_manager
= GalaxyTypeDepends(_do_resolve)¶
-
user_serializer
= GalaxyTypeDepends(_do_resolve)¶
-
galaxy.webapps.galaxy.api.visualizations module¶
Visualizations resource control over the API.
NOTE!: this is a work in progress and functionality and data structures may change often.
-
class
galaxy.webapps.galaxy.api.visualizations.
FastAPIVisualizations
(*args: typing.Any, **kwargs: typing.Any) → None[source]¶ Bases:
object
-
__init__
(*args: typing.Any, **kwargs: typing.Any) → None¶
-
disable_link_access
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item inaccessible by a URL link and return the current sharing status.
-
enable_link_access
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item accessible by a URL link and return the current sharing status.
-
publish
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis)) → galaxy.schema.schema.SharingStatus[source]¶ Makes this item publicly available by a URL link and return the current sharing status.
-
service
= GalaxyTypeDepends(_do_resolve)¶
-
set_slug
(*, trans: galaxy.managers.context.ProvidesUserContext = Depends(get_trans), id: galaxy.schema.fields.EncodedDatabaseIdField = Path(Ellipsis), payload: galaxy.schema.schema.SetSlugPayload = Body(Ellipsis))[source]¶ Sets a new slug to access this item by URL. The new slug must be unique.
Shares this item with specific users and return the current sharing status.
-
-
class
galaxy.webapps.galaxy.api.visualizations.
VisualizationsController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesVisualizationMixin
,galaxy.model.item_attrs.UsesAnnotations
RESTful controller for interactions with visualizations.
-
create
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload: dict, **kwargs)[source]¶ POST /api/visualizations creates a new visualization using the given payload
POST /api/visualizations?import_id={encoded_visualization_id} imports a copy of an existing visualization into the user’s workspace
-
index
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwargs)[source]¶ GET /api/visualizations:
-
service
= GalaxyTypeDepends(_do_resolve)¶
- PUT /api/visualizations/{id}/share_with_users
-
galaxy.webapps.galaxy.api.webhooks module¶
API Controller providing Galaxy Webhooks
-
class
galaxy.webapps.galaxy.api.webhooks.
WebhooksController
(app: galaxy.structured_app.StructuredApp)[source]¶
galaxy.webapps.galaxy.api.workflows module¶
API operations for Workflows
-
class
galaxy.webapps.galaxy.api.workflows.
WorkflowsAPIController
(app: galaxy.structured_app.StructuredApp)[source]¶ Bases:
galaxy.webapps.galaxy.api.BaseGalaxyAPIController
,galaxy.webapps.base.controller.UsesStoredWorkflowMixin
,galaxy.model.item_attrs.UsesAnnotations
,galaxy.webapps.base.controller.SharableMixin
-
build_module
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload=None)[source]¶ POST /api/workflows/build_module Builds module models for the workflow editor.
-
cancel_invocation
(trans: galaxy.managers.context.ProvidesUserContext, invocation_id, **kwd)[source]¶ DELETE /api/workflows/{workflow_id}/invocations/{invocation_id} DELETE /api/invocations/{invocation_id} Cancel the specified workflow invocation.
Parameters: invocation_id (str) – the usage id (required) Raises: exceptions.MessageException, exceptions.ObjectNotFound
-
create
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload=None, **kwd)[source]¶ POST /api/workflows
Create workflows in various ways.
Parameters: - from_history_id (str) – Id of history to extract a workflow from.
- job_ids (str) – If from_history_id is set - optional list of jobs to include when extracting a workflow from history
- dataset_ids (str) – If from_history_id is set - optional list of HDA “hid”s corresponding to workflow inputs when extracting a workflow from history
- dataset_collection_ids (str) – If from_history_id is set - optional list of HDCA “hid”s corresponding to workflow inputs when extracting a workflow from history
- workflow_name (str) – If from_history_id is set - name of the workflow to create when extracting a workflow from history
-
delete
(trans: galaxy.managers.context.ProvidesUserContext, id, **kwd)[source]¶ DELETE /api/workflows/{encoded_workflow_id} Deletes a specified workflow Author: rpark
copied from galaxy.web.controllers.workflows.py (delete)
-
download_invocation_bco
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/invocations/{invocations_id}/biocompute/download
Returns a selected BioCompute Object as a file for download (HTTP headers configured with filename and such).
The BioCompute Object endpoints are in beta - important details such as how inputs and outputs are represented, how the workflow is encoded, and how author and version information is encoded, and how URLs are generated will very likely change in important ways over time.
-
export_invocation_bco
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/invocations/{invocations_id}/biocompute
Return a BioCompute Object for the workflow invocation.
The BioCompute Object endpoints are in beta - important details such as how inputs and outputs are represented, how the workflow is encoded, and how author and version information is encoded, and how URLs are generated will very likely change in important ways over time.
-
get_tool_predictions
(trans: galaxy.managers.context.ProvidesUserContext, payload, **kwd)[source]¶ POST /api/workflows/get_tool_predictions
Fetch predicted tools for a workflow
Parameters: payload (dict) – a dictionary containing two parameters ‘tool_sequence’ - comma separated sequence of tool ids ‘remote_model_url’ - (optional) path to the deep learning model
Get workflows present in the tools panel GET /api/workflows/menu
-
get_workflows_list
(trans: galaxy.managers.context.ProvidesUserContext, missing_tools=False, show_published=None, show_hidden=False, show_deleted=False, **kwd)[source]¶ Displays a collection of workflows.
Parameters: - show_published (boolean) – if True, show also published workflows
- show_hidden (boolean) – if True, show hidden workflows
- show_deleted (boolean) – if True, show deleted workflows
- missing_tools (boolean) – if True, include a list of missing tools per workflow
-
import_new_workflow_deprecated
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, payload, **kwd)[source]¶ POST /api/workflows/upload Importing dynamic workflows from the api. Return newly generated workflow id. Author: rpark
# currently assumes payload[‘workflow’] is a json representation of a workflow to be inserted into the database
Deprecated in favor to POST /api/workflows with encoded ‘workflow’ in payload the same way.
POST /api/workflows/import Import a workflow shared by other users.
Parameters: workflow_id (str) – the workflow id (required) Raises: exceptions.MessageException, exceptions.ObjectNotFound
-
index_invocations
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations GET /api/invocations
Get the list of a user’s workflow invocations. If workflow_id is supplied (either via URL or query parameter) it should be an encoded StoredWorkflow id and returned invocations will be restricted to that workflow. history_id (an encoded History id) can be used to further restrict the query. If neither a workflow_id or history_id is supplied, all the current user’s workflow invocations will be indexed (as determined by the invocation being executed on one of the user’s histories).
Parameters: - workflow_id (str) – an encoded stored workflow id to restrict query to
- instance (boolean) – true if fetch by Workflow ID instead of StoredWorkflow id, false by default.
- history_id (str) – an encoded history id to restrict query to
- job_id (str) – an encoded job id to restrict query to
- user_id (str) – an encoded user id to restrict query to, must be own id if not admin user
- view (str) – level of detail to return per invocation ‘element’ or ‘collection’.
- step_details (bool) – If ‘view’ is ‘element’, also include details on individual steps.
Raises: exceptions.MessageException, exceptions.ObjectNotFound
-
invocation_jobs_summary
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations/{invocation_id}/jobs_summary GET /api/invocations/{invocation_id}/jobs_summary
return job state summary info aggregated across all current jobs of workflow invocation
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
Parameters: invocation_id (str) – the invocation id (required) Return type: dict Returns: a job summary object merged for all steps in workflow invocation
-
invocation_step
(trans, invocation_id, step_id, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations/{invocation_id}/steps/{step_id} GET /api/invocations/{invocation_id}/steps/{step_id}
Parameters: Raises: exceptions.MessageException, exceptions.ObjectNotFound
-
invocation_step_jobs_summary
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations/{invocation_id}/step_jobs_summary GET /api/invocations/{invocation_id}/step_jobs_summary
return job state summary info aggregated across per step of the workflow invocation
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
Parameters: invocation_id (str) – the invocation id (required) Return type: dict[] Returns: an array of job summary object dictionaries for each step
-
invoke
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, workflow_id, payload, **kwd)[source]¶ POST /api/workflows/{encoded_workflow_id}/invocations
Schedule the workflow specified by workflow_id to run.
Note
This method takes the same arguments as
galaxy.webapps.galaxy.api.workflows.WorkflowsAPIController.create()
above.Raises: exceptions.MessageException, exceptions.RequestParameterInvalidException
-
refactor
(trans, id, payload, **kwds)[source]¶ - PUT /api/workflows/{id}/refactor
- updates the workflow stored with
id
Parameters: Return type: Returns: serialized version of the workflow
Save workflow menu to be shown in the tool panel PUT /api/workflows/menu
-
show
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, **kwd)[source]¶ GET /api/workflows/{encoded_workflow_id}
Parameters: instance (boolean) – true if fetch by Workflow ID instead of StoredWorkflow id, false by default. Displays information needed to run a workflow.
-
show_invocation
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations/{invocation_id} GET /api/invocations/{invocation_id}
Get detailed description of workflow invocation
Parameters: - invocation_id (str) – the invocation id (required)
- step_details (bool) – fetch details about individual invocation steps and populate a steps attribute in the resulting dictionary. Defaults to false.
- legacy_job_state (bool) – If step_details is true, and this is set to true populate the invocation step state with the job state instead of the invocation step state. This will also produce one step per job in mapping jobs to mimic the older behavior with respect to collections. Partially scheduled steps may provide incomplete information and the listed steps outputs are the mapped over step outputs but the individual job outputs when this is set - at least for now.
Raises: exceptions.MessageException, exceptions.ObjectNotFound
-
show_invocation_report
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations/{invocation_id}/report GET /api/invocations/{invocation_id}/report
Get JSON summarizing invocation for reporting.
-
show_invocation_report_pdf
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, **kwd)[source]¶ GET /api/workflows/{workflow_id}/invocations/{invocation_id}/report.pdf GET /api/invocations/{invocation_id}/report.pdf
Get JSON summarizing invocation for reporting.
-
show_versions
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, workflow_id, **kwds)[source]¶ GET /api/workflows/{encoded_workflow_id}/versions
Parameters: instance (boolean) – true if fetch by Workflow ID instead of StoredWorkflow id, false by default. Lists all versions of this workflow.
-
update
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, id, payload, **kwds)[source]¶ PUT /api/workflows/{id}
Update the workflow stored with
id
.Parameters: - id (str) – the encoded id of the workflow to update
- instance (boolean) – true if fetch by Workflow ID instead of StoredWorkflow id, false by default.
- payload (dict) –
a dictionary containing any or all the
workflow: the json description of the workflow as would be produced by GET workflows/<id>/download or given to POST workflows The workflow contents will be updated to target this.
name: optional string name for the workflow, if not present in payload, name defaults to existing name annotation: optional string annotation for the workflow, if not present in payload, annotation defaults to existing annotation menu_entry: optional boolean marking if the workflow should appear in the user’s menu, if not present, workflow menu entries are not modified tags: optional list containing list of tags to add to the workflow (overwriting existing tags), if not present, tags are not modified from_tool_form: True iff encoded state coming in is encoded for the tool form.
Return type: Returns: serialized version of the workflow
-
update_invocation_step
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, invocation_id, step_id, payload, **kwd)[source]¶ PUT /api/workflows/{workflow_id}/invocations/{invocation_id}/steps/{step_id} PUT /api/invocations/{invocation_id}/steps/{step_id}
Update state of running workflow step invocation - still very nebulous but this would be for stuff like confirming paused steps can proceed etc….
Parameters: Raises: exceptions.MessageException, exceptions.ObjectNotFound
-
workflow_dict
(trans: galaxy.webapps.base.webapp.GalaxyWebTransaction, workflow_id, **kwd)[source]¶ GET /api/workflows/{encoded_workflow_id}/download
Returns a selected workflow.
Parameters: - style (str) – Style of export. The default is ‘export’, which is the meant to be used with workflow import endpoints. Other formats such as ‘instance’, ‘editor’, ‘run’ are more tied to the GUI and should not be considered stable APIs. The default format for ‘export’ is specified by the admin with the default_workflow_export_format config option. Style can be specified as either ‘ga’ or ‘format2’ directly to be explicit about which format to download.
- instance (boolean) – true if fetch by Workflow ID instead of StoredWorkflow id, false by default.
-