Warning
This document is for an old release 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
- galaxy.webapps.galaxy.api.get_app() StructuredApp [source]¶
- async galaxy.webapps.galaxy.api.get_app_with_request_session() AsyncGenerator[StructuredApp, None] [source]¶
- class galaxy.webapps.galaxy.api.GalaxyTypeDepends(callable, dep_type)[source]¶
Bases:
Depends
Variant of fastapi Depends that can also work on WSGI Galaxy controllers.
- galaxy.webapps.galaxy.api.get_session_manager(app: StructuredApp = Depends(get_app_with_request_session)) GalaxySessionManager [source]¶
- galaxy.webapps.galaxy.api.get_session(session_manager=Depends(get_session_manager), security: IdEncodingHelper = GalaxyTypeDepends(_do_resolve), galaxysession: str = Security(APIKeyCookie)) Optional[GalaxySession] [source]¶
- galaxy.webapps.galaxy.api.get_api_user(user_manager: UserManager = GalaxyTypeDepends(_do_resolve), key: str = Security(APIKeyQuery), x_api_key: str = Security(APIKeyHeader), run_as: Optional[DecodedDatabaseIdField] = Header(None)) Optional[User] [source]¶
- galaxy.webapps.galaxy.api.get_user(galaxy_session=Depends(get_session), api_user=Depends(get_api_user)) Optional[User] [source]¶
- class galaxy.webapps.galaxy.api.GalaxyASGIRequest(request: Request)[source]¶
Bases:
GalaxyAbstractRequest
Wrapper around Starlette/FastAPI Request object.
Implements the GalaxyAbstractRequest interface to provide access to some properties of the request commonly used.
- property environ: MutableMapping[str, Any]¶
Fallback WSGI environ.
This is not a full environ, there is no body. This is only meant to make routes.url_for work.
- class galaxy.webapps.galaxy.api.GalaxyASGIResponse(response: Response)[source]¶
Bases:
GalaxyAbstractResponse
Wrapper around Starlette/FastAPI Response object.
Implements the GalaxyAbstractResponse interface to provide access to some properties of the response object commonly used.
- property headers¶
The response headers.
- galaxy.webapps.galaxy.api.get_current_history_from_session(galaxy_session: Optional[GalaxySession]) Optional[History] [source]¶
- galaxy.webapps.galaxy.api.get_trans(request: Request, response: Response, app: StructuredApp = Depends(get_app_with_request_session), user=Depends(get_user), galaxy_session=Depends(get_session)) SessionRequestContext [source]¶
- galaxy.webapps.galaxy.api.get_admin_user(trans: SessionRequestContext = Depends(get_trans))[source]¶
- class galaxy.webapps.galaxy.api.BaseGalaxyAPIController(app: StructuredApp)[source]¶
Bases:
BaseAPIController
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
- class galaxy.webapps.galaxy.api.RestVerb(value)[source]¶
-
An enumeration.
- get = 'GET'¶
- head = 'HEAD'¶
- post = 'POST'¶
- put = 'PUT'¶
- patch = 'PATCH'¶
- delete = 'DELETE'¶
- options = 'OPTIONS'¶
- 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[None]]], ~typing.Awaitable[None]]] = 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, lifespan: ~typing.Optional[~typing.Union[~typing.Callable[[~typing.Any], ~typing.AbstractAsyncContextManager[None]], ~typing.Callable[[~typing.Any], ~typing.AbstractAsyncContextManager[~typing.Mapping[str, ~typing.Any]]]]] = None, deprecated: ~typing.Optional[bool] = None, include_in_schema: bool = True, generate_unique_id_function: ~typing.Callable[[~fastapi.routing.APIRoute], str] = <fastapi.datastructures.DefaultPlaceholder object>)[source]¶
Bases:
InferringRouter
A FastAPI Inferring Router tailored to Galaxy.
- wrap_with_alias(verb: RestVerb, *args, alias: Optional[str] = None, **kwd)[source]¶
Wraps FastAPI methods with additional alias keyword and require_admin handling.
@router.get(“/api/thing”, alias=”/api/deprecated_thing”) will then create routes for /api/thing and /api/deprecated_thing.
- property 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.APIContentTypeRoute(path: str, endpoint: ~typing.Callable[[...], ~typing.Any], *, response_model: ~typing.Any = <fastapi.datastructures.DefaultPlaceholder object>, status_code: ~typing.Optional[int] = None, tags: ~typing.Optional[~typing.List[~typing.Union[str, ~enum.Enum]]] = None, dependencies: ~typing.Optional[~typing.Sequence[~fastapi.params.Depends]] = None, summary: ~typing.Optional[str] = None, description: ~typing.Optional[str] = None, response_description: str = 'Successful Response', responses: ~typing.Optional[~typing.Dict[~typing.Union[int, str], ~typing.Dict[str, ~typing.Any]]] = None, deprecated: ~typing.Optional[bool] = None, name: ~typing.Optional[str] = None, methods: ~typing.Optional[~typing.Union[~typing.Set[str], ~typing.List[str]]] = None, operation_id: ~typing.Optional[str] = None, response_model_include: ~typing.Optional[~typing.Union[~typing.Set[~typing.Union[int, str]], ~typing.Dict[~typing.Union[int, str], ~typing.Any]]] = None, response_model_exclude: ~typing.Optional[~typing.Union[~typing.Set[~typing.Union[int, str]], ~typing.Dict[~typing.Union[int, str], ~typing.Any]]] = None, response_model_by_alias: bool = True, response_model_exclude_unset: bool = False, response_model_exclude_defaults: bool = False, response_model_exclude_none: bool = False, include_in_schema: bool = True, response_class: ~typing.Union[~typing.Type[~starlette.responses.Response], ~fastapi.datastructures.DefaultPlaceholder] = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Optional[~typing.Any] = None, callbacks: ~typing.Optional[~typing.List[~starlette.routing.BaseRoute]] = None, openapi_extra: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, generate_unique_id_function: ~typing.Union[~typing.Callable[[~fastapi.routing.APIRoute], str], ~fastapi.datastructures.DefaultPlaceholder] = <fastapi.datastructures.DefaultPlaceholder object>)[source]¶
Bases:
APIRoute
Determines endpoint to match using content-type.
- accept_matches(scope: MutableMapping[str, Any]) Tuple[Match, MutableMapping[str, Any]] [source]¶
- matches(scope: MutableMapping[str, Any]) Tuple[Match, MutableMapping[str, Any]] [source]¶
- galaxy.webapps.galaxy.api.as_form(cls: Type[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
- async galaxy.webapps.galaxy.api.try_get_request_body_as_json(request: Request) Optional[Any] [source]¶
Returns the request body as a JSON object if the content type is JSON.
- class galaxy.webapps.galaxy.api.IndexQueryTag(tag, description, alias, admin_only)[source]¶
Bases:
tuple
- property tag¶
Alias for field number 0
- property description¶
Alias for field number 1
- property alias¶
Alias for field number 2
- property admin_only¶
Alias for field number 3
- galaxy.webapps.galaxy.api.search_query_param(model_name: str, tags: list, free_text_fields: list) Optional[str] [source]¶
Submodules¶
galaxy.webapps.galaxy.api.annotations module¶
API operations on annotations.
- class galaxy.webapps.galaxy.api.annotations.BaseAnnotationsController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesStoredWorkflowMixin
,UsesAnnotations
- index(trans: ProvidesHistoryContext, **kwd)[source]¶
- create(trans: ProvidesHistoryContext, payload: dict, **kwd)[source]¶
- delete(trans: ProvidesHistoryContext, **kwd)[source]¶
- undelete(trans: ProvidesHistoryContext, **kwd)[source]¶
- class galaxy.webapps.galaxy.api.annotations.HistoryAnnotationsController(app: StructuredApp)[source]¶
Bases:
BaseAnnotationsController
- controller_name = 'history_annotations'¶
- history_manager: HistoryManager = GalaxyTypeDepends(_do_resolve)¶
- class galaxy.webapps.galaxy.api.annotations.HistoryContentAnnotationsController(app: StructuredApp)[source]¶
Bases:
BaseAnnotationsController
- controller_name = 'history_content_annotations'¶
- hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)¶
- class galaxy.webapps.galaxy.api.annotations.WorkflowAnnotationsController(app: StructuredApp)[source]¶
Bases:
BaseAnnotationsController
- controller_name = 'workflow_annotations'¶
galaxy.webapps.galaxy.api.authenticate module¶
API key retrieval through BaseAuth
Sample usage
curl --user zipzap@foo.com:password http://localhost:8080/api/authenticate/baseauth
Returns
{
"api_key": "baa4d6e3a156d3033f05736255f195f9"
}
- class galaxy.webapps.galaxy.api.authenticate.AuthenticationController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- authentication_service = GalaxyTypeDepends(_do_resolve)¶
- options(trans: 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.
- class galaxy.webapps.galaxy.api.authenticate.FastAPIAuthenticate(*, authentication_service: AuthenticationService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- authentication_service: AuthenticationService = GalaxyTypeDepends(_do_resolve)¶
- get_api_key(*, request: Request) APIKeyResponse [source]¶
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: StructuredApp, cloud_manager: CloudManager, datasets_serializer: DatasetSerializer)[source]¶
Bases:
BaseGalaxyAPIController
RESTfull controller for interaction with Amazon S3.
- __init__(app: StructuredApp, cloud_manager: CloudManager, datasets_serializer: DatasetSerializer)[source]¶
Initialize an interface for application ‘app’
- 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.
- 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.
- 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: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
RESTfull controller for defining cloud authorizations.
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
- 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:
- Returns:
a list of cloud authorizations (each represented in key-value pair format) defined for the user.
- 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.
- 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.common module¶
This module contains utility functions shared across the api package.
- galaxy.webapps.galaxy.api.common.parse_serialization_params(view: Optional[str] = None, keys: Optional[str] = None, default_view: Optional[str] = None, **_) SerializationParams [source]¶
- galaxy.webapps.galaxy.api.common.query_serialization_params(view: Optional[str] = Query(None), keys: Optional[str] = Query(None)) SerializationParams [source]¶
- galaxy.webapps.galaxy.api.common.get_value_filter_query_params(q: Optional[List[str]] = Query(None), qv: Optional[List[str]] = Query(None)) ValueFilterQueryParams [source]¶
This function is meant to be used as a Dependency. See https://fastapi.tiangolo.com/tutorial/dependencies/#first-steps
- galaxy.webapps.galaxy.api.common.get_filter_query_params(q: Optional[List[str]] = Query(None), qv: Optional[List[str]] = Query(None), offset: Optional[int] = Query(0), limit: Optional[int] = Query(None), order: Optional[str] = Query(None)) FilterQueryParams [source]¶
This function is meant to be used as a Dependency. See https://fastapi.tiangolo.com/tutorial/dependencies/#first-steps
- galaxy.webapps.galaxy.api.common.get_update_permission_payload(payload: Dict[str, Any]) UpdateDatasetPermissionsPayload [source]¶
Converts the generic payload dictionary into a UpdateDatasetPermissionsPayload model with custom parsing. This is an attempt on supporting multiple aliases for the permissions params.
- galaxy.webapps.galaxy.api.common.get_query_parameters_from_request_excluding(request: Request, exclude: Set[str]) dict [source]¶
Gets all the request query parameters excluding the given parameters names in exclude set.
This is useful when an endpoint uses arbitrary or dynamic query parameters that cannot be anticipated or documented beforehand. The exclude set can be used to avoid including those parameters that are already handled by the endpoint.
- galaxy.webapps.galaxy.api.common.query_parameter_as_list(query)[source]¶
Used as FastAPI dependable for query parameters that need to behave as a list of values separated by comma or as multiple instances of the same parameter.
Important
the
query
annotation provided must define thealias
exactly as the name of the actual parameter name.Usage example:
ValueQueryParam = Query( default=None, alias="value", # Important! this is the parameter name that will be displayed in the API docs title="My Value", description="A single value, a comma-separated list of values or a list of values.", ) @router.get("/api/my_route") def index( self, values: Optional[List[str]] = Depends(query_parameter_as_list(ValueQueryParam)), ): ...
This will render in the API docs as a single string query parameter but will make the following requests equivalent:
api/my_route?value=val1,val2,val3
api/my_route?value=val1&value=val2&value=val3
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.FastAPIConfiguration(*, configuration_manager: ConfigurationManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- configuration_manager: ConfigurationManager = GalaxyTypeDepends(_do_resolve)¶
- whoami(*, trans: ProvidesUserContext = Depends(get_trans)) Optional[UserModel] [source]¶
Return information about the current authenticated user.
- index(*, trans: ProvidesUserContext = Depends(get_trans), view: Optional[str] = Query(None), keys: Optional[str] = Query(None)) Dict[str, 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.
galaxy.webapps.galaxy.api.container_resolution module¶
API operations allowing clients to manage container resolution.
- class galaxy.webapps.galaxy.api.container_resolution.ContainerResolutionAPIController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
- 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.
- 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:
- 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:
- 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.FastAPIDatasetCollections(*, service: DatasetCollectionsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: DatasetCollectionsService = GalaxyTypeDepends(_do_resolve)¶
- create(*, trans: ProvidesHistoryContext = Depends(get_trans), payload: CreateNewCollectionPayload = Body(Ellipsis)) HDCADetailed [source]¶
- copy(*, trans: ProvidesHistoryContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), payload: UpdateCollectionAttributePayload = Body(Ellipsis))[source]¶
- attributes(*, trans: ProvidesHistoryContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), instance_type: typing_extensions.Literal[history, library] = Query(history)) DatasetCollectionAttributesResult [source]¶
- suitable_converters(*, trans: ProvidesHistoryContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), instance_type: typing_extensions.Literal[history, library] = Query(history)) SuitableConverters [source]¶
- show(*, trans: ProvidesHistoryContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), instance_type: typing_extensions.Literal[history, library] = Query(history)) Union[HDCADetailed, HDCASummary] [source]¶
- contents(*, trans: ProvidesHistoryContext = Depends(get_trans), hdca_id: DecodedDatabaseIdField = Path(Ellipsis), parent_id: DecodedDatabaseIdField = Path(Ellipsis), instance_type: typing_extensions.Literal[history, library] = Query(history), limit: Optional[int] = Query(None), offset: Optional[int] = Query(None)) DatasetCollectionContentElements [source]¶
- content(*, trans: ProvidesHistoryContext = Depends(get_trans), dce_id: DecodedDatabaseIdField = Path(Ellipsis)) DCESummary [source]¶
galaxy.webapps.galaxy.api.datasets module¶
API operations on the contents of a history dataset.
- class galaxy.webapps.galaxy.api.datasets.FastAPIDatasets(*, service: DatasetsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: DatasetsService = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans=Depends(get_trans), history_id: Optional[DecodedDatabaseIdField] = Query(None), serialization_params: SerializationParams = Depends(query_serialization_params), filter_query_params: FilterQueryParams = Depends(get_filter_query_params)) List[Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem]] [source]¶
- show_storage(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), hda_ldda: DatasetSourceType = Query(hda)) DatasetStorageDetails [source]¶
- show_inheritance_chain(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), hda_ldda: DatasetSourceType = Query(hda)) DatasetInheritanceChain [source]¶
- get_content_as_text(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis)) DatasetTextContentDetails [source]¶
- converted_ext(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), ext: str = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HDADetailed, 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.
- converted(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis)) ConvertedDatasetsMap [source]¶
Return a map of <converted extension> : <converted id> containing all the existing converted datasets.
- update_permissions(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), payload: Dict[str, Any] = Body(Ellipsis)) DatasetAssociationRoles [source]¶
Set permissions of the given history dataset to the given role ids.
- extra_files(*, trans=Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), history_content_id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
- display_history_content(*, request: Request, trans=Depends(get_trans), history_id: Optional[DecodedDatabaseIdField] = Path(Ellipsis), history_content_id: DecodedDatabaseIdField = Path(Ellipsis), preview: bool = Query(False), filename: Optional[str] = Query(None), to_ext: Optional[str] = Query(None), raw: bool = Query(False), offset: Optional[int] = Query(None), ck_size: Optional[int] = Query(None))[source]¶
Streams the dataset for download or the contents preview to be displayed in a browser.
- display(*, request: Request, trans=Depends(get_trans), history_content_id: DecodedDatabaseIdField = Path(Ellipsis), preview: bool = Query(False), filename: Optional[str] = Query(None), to_ext: Optional[str] = Query(None), raw: bool = Query(False), offset: Optional[int] = Query(None), ck_size: Optional[int] = Query(None))[source]¶
Streams the dataset for download or the contents preview to be displayed in a browser.
- get_metadata_file_history_content(*, trans=Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), history_content_id: DecodedDatabaseIdField = Path(Ellipsis), metadata_file: str = Query(Ellipsis))[source]¶
- get_metadata_file_datasets(*, trans=Depends(get_trans), history_content_id: DecodedDatabaseIdField = Path(Ellipsis), metadata_file: str = Query(Ellipsis))[source]¶
- show(*, request: Request, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), hda_ldda: DatasetSourceType = Query(hda), data_type: Optional[RequestDataType] = Query(None), serialization_params: 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.
- get_structured_content(*, request: Request, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), content_type: DatasetContentType = DatasetContentType.data)[source]¶
- delete_batch(*, trans=Depends(get_trans), payload: DeleteDatasetBatchPayload = Body(Ellipsis)) DeleteDatasetBatchResult [source]¶
Deletes or purges a batch of datasets. Warning: only the ownership of the datasets (and upload state for HDAs) is checked, no other checks or restrictions are made.
- compute_hash(*, trans=Depends(get_trans), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), hda_ldda: DatasetSourceType = Query(hda), payload: ComputeDatasetHashPayload = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
galaxy.webapps.galaxy.api.datatypes module¶
API operations allowing clients to determine datatype supported by Galaxy.
- class galaxy.webapps.galaxy.api.datatypes.FastAPIDatatypes(*, datatypes_registry: Registry = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- async index(*, extension_only: Optional[bool] = Query(True), upload_only: Optional[bool] = Query(True)) Union[List[DatatypeDetails], List[str]] [source]¶
Gets the list of all available data types.
- async mapping() DatatypesMap [source]¶
Gets mappings for data types.
- async types_and_mapping(*, extension_only: Optional[bool] = Query(True), upload_only: Optional[bool] = Query(True)) DatatypesCombinedMap [source]¶
Combines the datatype information from (/api/datatypes) and the mapping information from (/api/datatypes/mapping) into a single response.
- async converters() DatatypeConverterList [source]¶
Gets the list of all installed converters.
- async edam_formats() Dict[str, str] [source]¶
Gets a map of datatypes and their corresponding EDAM formats.
- async edam_formats_detailed()[source]¶
Gets a map of datatypes and their corresponding EDAM formats. EDAM formats contain the EDAM iri, label, and definition.
- async edam_data() Dict[str, str] [source]¶
Gets a map of datatypes and their corresponding EDAM data.
galaxy.webapps.galaxy.api.display_applications module¶
API operations on annotations.
- class galaxy.webapps.galaxy.api.display_applications.FastAPIDisplay(*, manager: DisplayApplicationsManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- manager: DisplayApplicationsManager = GalaxyTypeDepends(_do_resolve)¶
- index() List[DisplayApplication] [source]¶
Returns the list of display applications.
galaxy.webapps.galaxy.api.dynamic_tools module¶
- class galaxy.webapps.galaxy.api.dynamic_tools.DynamicToolsController(app)[source]¶
Bases:
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: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesExtendedMetadataMixin
,UsesLibraryMixinItems
,UsesStoredWorkflowMixin
,Generic
[T
]
- class galaxy.webapps.galaxy.api.extended_metadata.LibraryDatasetExtendMetadataController(app: StructuredApp)[source]¶
Bases:
BaseExtendedMetadataController
[LibraryDatasetDatasetAssociation
]- controller_name = 'library_dataset_extended_metadata'¶
- class galaxy.webapps.galaxy.api.extended_metadata.HistoryDatasetExtendMetadataController(app: StructuredApp)[source]¶
Bases:
BaseExtendedMetadataController
[HistoryDatasetAssociation
]- controller_name = 'history_dataset_extended_metadata'¶
- hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)¶
galaxy.webapps.galaxy.api.folder_contents module¶
API operations on the contents of a library folder.
- class galaxy.webapps.galaxy.api.folder_contents.FastAPILibraryFoldersContents(*, service: LibraryFolderContentsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: LibraryFolderContentsService = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesUserContext = Depends(get_trans), folder_id: LibraryFolderDatabaseIdField = Path(Ellipsis), limit: int = Query(10), offset: int = Query(0), search_text: Optional[str] = Query(None), include_deleted: Optional[bool] = Query(False), order_by: typing_extensions.Literal[name, description, type, size, update_time] = Query(name), sort_desc: Optional[bool] = Query(False))[source]¶
Returns a list of a folder’s contents (files and sub-folders).
Additional metadata for the folder is provided in the response as a separate object containing data for breadcrumb path building, permissions and other folder’s details.
Note: When sorting, folders always have priority (they show-up before any dataset regardless of the sorting).
Security note: - Accessing a library folder or sub-folder requires only access to the parent library. - Deleted folders can only be accessed by admins or users with MODIFY permission. - Datasets may be public, private or restricted (to a group of users). Listing deleted datasets has the same requirements as folders.
- create(*, trans: ProvidesUserContext = Depends(get_trans), folder_id: LibraryFolderDatabaseIdField = Path(Ellipsis), payload: CreateLibraryFilePayload = Body(Ellipsis))[source]¶
galaxy.webapps.galaxy.api.folders module¶
API operations on library folders.
- class galaxy.webapps.galaxy.api.folders.FastAPILibraryFolders(*, service: LibraryFoldersService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: LibraryFoldersService = GalaxyTypeDepends(_do_resolve)¶
- show(*, trans: ProvidesUserContext = Depends(get_trans), id: LibraryFolderDatabaseIdField = Path(Ellipsis)) LibraryFolderDetails [source]¶
Returns detailed information about the library folder with the given ID.
- create(*, trans: ProvidesUserContext = Depends(get_trans), id: LibraryFolderDatabaseIdField = Path(Ellipsis), payload: CreateLibraryFolderPayload = Body(Ellipsis)) LibraryFolderDetails [source]¶
Returns detailed information about the newly created library folder.
- update(*, trans: ProvidesUserContext = Depends(get_trans), id: LibraryFolderDatabaseIdField = Path(Ellipsis), payload: UpdateLibraryFolderPayload = Body(Ellipsis)) LibraryFolderDetails [source]¶
Updates the information of an existing library folder.
- delete(*, trans: ProvidesUserContext = Depends(get_trans), id: LibraryFolderDatabaseIdField = Path(Ellipsis), undelete: Optional[bool] = Query(None)) LibraryFolderDetails [source]¶
Marks the specified library folder as deleted (or undeleted).
- get_permissions(*, trans: ProvidesUserContext = Depends(get_trans), id: LibraryFolderDatabaseIdField = Path(Ellipsis), scope: Optional[LibraryPermissionScope] = Query(None), page: int = Query(1), page_limit: int = Query(10), q: Optional[str] = Query(None)) Union[LibraryFolderCurrentPermissions, LibraryAvailablePermissions] [source]¶
Gets the current or available permissions of a particular library. The results can be paginated and additionally filtered by a query.
- set_permissions(*, trans: ProvidesUserContext = Depends(get_trans), id: LibraryFolderDatabaseIdField = Path(Ellipsis), action: Optional[LibraryFolderPermissionAction] = Query(None), payload: LibraryFolderPermissionsPayload = Body(Ellipsis)) LibraryFolderCurrentPermissions [source]¶
Sets the permissions to manage a library folder.
galaxy.webapps.galaxy.api.forms module¶
API operations on FormDefinition objects.
- class galaxy.webapps.galaxy.api.forms.FormDefinitionAPIController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
galaxy.webapps.galaxy.api.genomes module¶
- class galaxy.webapps.galaxy.api.genomes.FastAPIGenomes(*, manager: GenomesManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- manager: GenomesManager = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesUserContext = Depends(get_trans), chrom_info: bool = Query(None)) List[List[str]] [source]¶
- show(*, trans: ProvidesUserContext = Depends(get_trans), id: str = Path(Ellipsis), reference: bool = Query(None), num: int = Query(None), chrom: str = Query(None), low: int = Query(None), high: int = Query(None), format: str = Query(None)) Any [source]¶
- indexes(*, id: str = Path(Ellipsis), type: str = Query(fasta_indexes), format: str = Query(None)) Any [source]¶
galaxy.webapps.galaxy.api.group_roles module¶
API operations on Group objects.
- galaxy.webapps.galaxy.api.group_roles.group_role_to_model(trans, group_id: int, role) GroupRoleResponse [source]¶
- class galaxy.webapps.galaxy.api.group_roles.FastAPIGroupRoles(*, manager: GroupRolesManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- manager: GroupRolesManager = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupRoleListResponse [source]¶
- show(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis), role_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupRoleResponse [source]¶
- update(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis), role_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupRoleResponse [source]¶
- delete(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis), role_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupRoleResponse [source]¶
galaxy.webapps.galaxy.api.group_users module¶
API operations on Group objects.
- galaxy.webapps.galaxy.api.group_users.group_user_to_model(trans, group_id, user) GroupUserResponse [source]¶
- class galaxy.webapps.galaxy.api.group_users.FastAPIGroupUsers(*, manager: GroupUsersManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- manager: GroupUsersManager = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupUserListResponse [source]¶
GET /api/groups/{encoded_group_id}/users Displays a collection (list) of groups.
- show(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis), user_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupUserResponse [source]¶
Displays information about a group user.
- update(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis), user_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupUserResponse [source]¶
PUT /api/groups/{encoded_group_id}/users/{encoded_user_id} Adds a user to a group
- delete(*, trans: ProvidesAppContext = Depends(get_trans), group_id: DecodedDatabaseIdField = Path(Ellipsis), user_id: DecodedDatabaseIdField = Path(Ellipsis)) GroupUserResponse [source]¶
DELETE /api/groups/{encoded_group_id}/users/{encoded_user_id} Removes a user from a group
galaxy.webapps.galaxy.api.groups module¶
API operations on Group objects.
- class galaxy.webapps.galaxy.api.groups.GroupAPIController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- manager = GalaxyTypeDepends(_do_resolve)¶
- index(trans: ProvidesAppContext, **kwd)[source]¶
GET /api/groups Displays a collection (list) of groups.
- create(trans: ProvidesAppContext, payload: Dict[str, Any], **kwd)[source]¶
POST /api/groups Creates a new group.
- show(trans: ProvidesAppContext, id: EncodedDatabaseIdField, **kwd)[source]¶
GET /api/groups/{encoded_group_id} Displays information about a group.
- update(trans: ProvidesAppContext, id: EncodedDatabaseIdField, payload: Dict[str, Any], **kwd)[source]¶
PUT /api/groups/{encoded_group_id} Modifies a group.
galaxy.webapps.galaxy.api.histories module¶
API operations on a history.
See also
- class galaxy.webapps.galaxy.api.histories.DeleteHistoryPayload(*, purge: bool = False)[source]¶
Bases:
BaseModel
- class galaxy.webapps.galaxy.api.histories.CreateHistoryFormData(*, name: Optional[str] = None, history_id: Optional[DecodedDatabaseIdField] = None, all_datasets: Optional[bool] = True, archive_source: Optional[str] = None, archive_type: Optional[HistoryImportArchiveSourceType] = HistoryImportArchiveSourceType.url, archive_file: Optional[Any] = None)[source]¶
Bases:
CreateHistoryPayload
Uses Form data instead of JSON
- async as_form(history_id=Form(None), all_datasets=Form(True), archive_source=Form(None), archive_type=Form(url), archive_file=Form(None), /)¶
- history_id: Optional[DecodedDatabaseIdField]¶
- archive_type: Optional[HistoryImportArchiveSourceType]¶
- class galaxy.webapps.galaxy.api.histories.FastAPIHistories(*, service: HistoriesService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: HistoriesService = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesHistoryContext = Depends(get_trans), filter_query_params: FilterQueryParams = Depends(get_filter_query_params), serialization_params: SerializationParams = Depends(query_serialization_params), all: Optional[bool] = Query(False), deleted: Optional[bool] = Query(False)) List[Union[HistorySummary, HistoryDetailed, Any]] [source]¶
- count(*, trans: ProvidesHistoryContext = Depends(get_trans)) int [source]¶
- index_deleted(*, trans: ProvidesHistoryContext = Depends(get_trans), filter_query_params: FilterQueryParams = Depends(get_filter_query_params), serialization_params: SerializationParams = Depends(query_serialization_params), all: Optional[bool] = Query(False)) List[Union[HistorySummary, HistoryDetailed, Any]] [source]¶
- published(*, trans: ProvidesHistoryContext = Depends(get_trans), filter_query_params: FilterQueryParams = Depends(get_filter_query_params), serialization_params: SerializationParams = Depends(query_serialization_params)) List[Union[HistorySummary, HistoryDetailed, Any]] [source]¶
- get_archived_histories(*, response: Response, trans: ProvidesHistoryContext = Depends(get_trans), serialization_params: SerializationParams = Depends(query_serialization_params), filter_query_params: FilterQueryParams = Depends(get_filter_query_params)) List[Union[ArchivedHistorySummary, ArchivedHistoryDetailed, Any]] [source]¶
Get a list of all archived histories for the current user.
Archived histories are histories are not part of the active histories of the user but they can be accessed using this endpoint.
- show_recent(*, trans: ProvidesHistoryContext = Depends(get_trans), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
- show(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
- prepare_store_download(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), payload: StoreExportPayload = Body(Ellipsis)) AsyncFile [source]¶
- write_store(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), payload: WriteStoreToPayload = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
- citations(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) List[Any] [source]¶
- create(*, trans: ProvidesHistoryContext = Depends(get_trans), payload: CreateHistoryPayload = Depends(_as_form), payload_as_json: Optional[Any] = Depends(try_get_request_body_as_json), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[JobImportHistoryResponse, HistorySummary, HistoryDetailed, Any] [source]¶
The new history can also be copied form a existing history or imported from an archive or URL.
- delete(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params), purge: bool = Query(False), payload: Optional[DeleteHistoryPayload] = Body(None)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
- undelete(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
- update(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), payload: Any = Body(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
- create_from_store(*, trans: ProvidesHistoryContext = Depends(get_trans), serialization_params: SerializationParams = Depends(query_serialization_params), payload: CreateHistoryFromStore = Body(Ellipsis)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
- create_from_store_async(*, trans: ProvidesHistoryContext = Depends(get_trans), payload: CreateHistoryFromStore = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
- index_exports(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), limit: Optional[int] = Query(None), offset: Optional[int] = Query(0), accept: str = Header(application / json)) Union[JobExportHistoryArchiveListResponse, ExportTaskListResponse] [source]¶
By default the legacy job-based history exports (jeha) are returned.
Change the accept content type header to return the new task-based history exports.
- archive_export(*, response: Response, trans=Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), payload: Optional[ExportHistoryArchivePayload] = Body(None)) Union[JobExportHistoryArchiveModel, 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.
Deprecation notice: Please use /api/histories/{id}/prepare_store_download or /api/histories/{id}/write_store instead.
- archive_download(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), jeha_id: Union[DecodedDatabaseIdField, typing_extensions.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.Deprecation notice: Please use /api/histories/{id}/prepare_store_download or /api/histories/{id}/write_store instead.
- get_custom_builds_metadata(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) CustomBuildsMetadataResponse [source]¶
- archive_history(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), payload: Optional[ArchiveHistoryRequestPayload] = Body(None)) Union[ArchivedHistorySummary, ArchivedHistoryDetailed, Any] [source]¶
Marks the given history as ‘archived’ and returns the history.
Archiving a history will remove it from the list of active histories of the user but it will still be accessible via the /api/histories/{id} or the /api/histories/archived endpoints.
Associating an export record:
Optionally, an export record (containing information about a recent snapshot of the history) can be associated with the
archived history by providing an archive_export_id in the payload. The export record must belong to the history and must be in the ready state. - When associating an export record, the history can be purged after it has been archived using the purge_history flag.
If the history is already archived, this endpoint will return a 409 Conflict error, indicating that the history is already archived. If the history was not purged after it was archived, you can restore it using the /api/histories/{id}/archive/restore endpoint.
- restore_archived_history(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), force: Optional[bool] = Query(None)) Union[HistorySummary, HistoryDetailed, Any] [source]¶
Restores an archived history and returns it.
Restoring an archived history will add it back to the list of active histories of the user (unless it was purged).
Warning: Please note that histories that are associated with an archive export might be purged after export, so un-archiving them will not restore the datasets that were in the history before it was archived. You will need to import back the archive export record to restore the history and its datasets as a new copy. See /api/histories/from_store_async for more information.
- sharing(*, trans: ProvidesUserContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Return the sharing status of the item.
- enable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item accessible by a URL link and return the current sharing status.
- disable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item inaccessible by a URL link and return the current sharing status.
- publish(*, trans: ProvidesUserContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item publicly available by a URL link and return the current sharing status.
- unpublish(*, trans: ProvidesUserContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Removes this item from the published list and return the current sharing status.
Shares this item with specific users and return the current sharing status.
- set_slug(*, trans: ProvidesUserContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), payload: SetSlugPayload = Body(Ellipsis))[source]¶
Sets a new slug to access this item by URL. The new slug must be unique.
galaxy.webapps.galaxy.api.history_contents module¶
API operations on the contents of a history.
- galaxy.webapps.galaxy.api.history_contents.ContentTypeQueryParam(default: Optional[HistoryContentType])[source]¶
- galaxy.webapps.galaxy.api.history_contents.get_index_query_params(v: Optional[str] = Query(None), dataset_details: Optional[str] = Query(None)) HistoryContentsIndexParams [source]¶
This function is meant to be used as a dependency to render the OpenAPI documentation correctly
- galaxy.webapps.galaxy.api.history_contents.parse_index_query_params(v: Optional[str] = None, dataset_details: Optional[str] = None, **_) 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.get_legacy_index_query_params(ids: Optional[str] = Query(None), types: Optional[List[str]] = Query(None), details: Optional[str] = Query(None), deleted: Optional[bool] = Query(None), visible: Optional[bool] = Query(None), shareable: Optional[bool] = Query(None)) 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_legacy_index_query_params(ids: Optional[str] = None, types: Optional[Union[List[str], str]] = None, details: Optional[str] = None, deleted: Optional[bool] = None, visible: Optional[bool] = None, shareable: Optional[bool] = None, **_) 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.history_contents.parse_content_types(types: Union[List[str], str]) List[HistoryContentType] [source]¶
- galaxy.webapps.galaxy.api.history_contents.parse_dataset_details(details: Optional[str])[source]¶
Parses the different values that the dataset_details parameter can have from a string.
- galaxy.webapps.galaxy.api.history_contents.get_index_jobs_summary_params(ids: Optional[str] = Query(None), types: Optional[str] = Query(None)) HistoryContentsIndexJobsSummaryParams [source]¶
This function is meant to be used as a dependency to render the OpenAPI documentation correctly
- galaxy.webapps.galaxy.api.history_contents.parse_index_jobs_summary_params(ids: Optional[str] = None, types: Optional[str] = None, **_) HistoryContentsIndexJobsSummaryParams [source]¶
Parses query parameters for the history contents index_jobs_summary operation and returns a model containing the values in the correct type.
- class galaxy.webapps.galaxy.api.history_contents.FastAPIHistoryContents(*, service: HistoriesContentsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: HistoriesContentsService = GalaxyTypeDepends(_do_resolve)¶
- index_typed(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), index_params: HistoryContentsIndexParams = Depends(get_index_query_params), type: HistoryContentType = Path(Ellipsis), legacy_params: LegacyHistoryContentsIndexParams = Depends(get_legacy_index_query_params), serialization_params: SerializationParams = Depends(query_serialization_params), filter_query_params: FilterQueryParams = Depends(get_filter_query_params), accept: str = Header(application / json)) Union[HistoryContentsResult, HistoryContentsWithStatsResult] [source]¶
Return a list of either 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(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), index_params: HistoryContentsIndexParams = Depends(get_index_query_params), type: Optional[str] = Query(None), legacy_params: LegacyHistoryContentsIndexParams = Depends(get_legacy_index_query_params), serialization_params: SerializationParams = Depends(query_serialization_params), filter_query_params: FilterQueryParams = Depends(get_filter_query_params), accept: str = Header(application / json)) Union[HistoryContentsResult, HistoryContentsWithStatsResult] [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.
- show_jobs_summary(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis)) Union[galaxy.schema.schema.JobStateSummary, galaxy.schema.schema.ImplicitCollectionJobsStateSummary, galaxy.schema.schema.WorkflowInvocationStateSummary][Union[JobStateSummary, ImplicitCollectionJobsStateSummary, 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.
- show(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis), fuzzy_count: Optional[int] = Query(None), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, 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_legacy(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Query(dataset), id: DecodedDatabaseIdField = Path(Ellipsis), fuzzy_count: Optional[int] = Query(None), serialization_params: SerializationParams = Depends(query_serialization_params)) Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem] [source]¶
Return detailed information about an HDA or HDCA within a history.
Note: Anonymous users are allowed to get their current history contents.
- prepare_store_download(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis), payload: StoreExportPayload = Body(Ellipsis)) AsyncFile [source]¶
- write_store(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis), payload: WriteStoreToPayload = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
- index_jobs_summary(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), params: HistoryContentsIndexJobsSummaryParams = Depends(get_index_jobs_summary_params)) List[Union[galaxy.schema.schema.JobStateSummary, galaxy.schema.schema.ImplicitCollectionJobsStateSummary, galaxy.schema.schema.WorkflowInvocationStateSummary][Union[JobStateSummary, ImplicitCollectionJobsStateSummary, 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.
- download_dataset_collection_history_content(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: Optional[DecodedDatabaseIdField] = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
Download the content of a history dataset collection as a zip archive while maintaining approximate collection structure.
- download_dataset_collection(*, trans: ProvidesHistoryContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
Download the content of a history dataset collection as a zip archive while maintaining approximate collection structure.
- prepare_collection_download(*, trans: ProvidesHistoryContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) AsyncFile [source]¶
The history dataset collection will be written as a zip archive to the returned short term storage object. Progress tracking this file’s creation can be tracked with the short_term_storage API.
- create_typed(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params), payload: CreateHistoryContentPayload = Body(Ellipsis)) Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem, List[Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem]]] [source]¶
Create a new HDA or HDCA in the given History.
- create(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), type: Optional[HistoryContentType] = Query(None), serialization_params: SerializationParams = Depends(query_serialization_params), payload: CreateHistoryContentPayload = Body(Ellipsis)) Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem, List[Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem]]] [source]¶
Create a new HDA or HDCA in the given History.
- update_permissions(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), dataset_id: DecodedDatabaseIdField = Path(Ellipsis), payload: Dict[str, Any] = Body(Ellipsis)) DatasetAssociationRoles [source]¶
Set permissions of the given history dataset to the given role ids.
- update_batch(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params), payload: UpdateHistoryContentsBatchPayload = Body(Ellipsis)) 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.
- bulk_operation(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), filter_query_params: ValueFilterQueryParams = Depends(get_value_filter_query_params), payload: HistoryContentBulkOperationPayload = Body(Ellipsis)) HistoryContentBulkOperationResult [source]¶
Executes an operation on a set of items contained in the given History.
The items to be processed can be explicitly set or determined by a dynamic query.
- validate(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis)) dict [source]¶
Validates the metadata associated with a dataset within a History.
- update_typed(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params), payload: UpdateHistoryContentsPayload = Body(Ellipsis)) Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem] [source]¶
Updates the values for the history content item with the given
ID
.
- update_legacy(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Query(dataset), serialization_params: SerializationParams = Depends(query_serialization_params), payload: UpdateHistoryContentsPayload = Body(Ellipsis)) Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem] [source]¶
Updates the values for the history content item with the given
ID
.
- delete_typed(*, response: Response, trans: ProvidesHistoryContext = Depends(get_trans), history_id: str = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params), purge: Optional[bool] = Query(False), recursive: Optional[bool] = Query(False), stop_job: Optional[bool] = Query(False), payload: DeleteHistoryContentPayload = Body(None))[source]¶
Delete the history content with the given
ID
and path specified type.Note: Currently does not stop any active jobs for which this dataset is an output.
- delete_legacy(*, response: Response, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis), type: HistoryContentType = Query(dataset), serialization_params: SerializationParams = Depends(query_serialization_params), purge: Optional[bool] = Query(False), recursive: Optional[bool] = Query(False), stop_job: Optional[bool] = Query(False), payload: DeleteHistoryContentPayload = Body(None))[source]¶
Delete the history content with the given
ID
and query specified type (defaults to dataset).Note: Currently does not stop any active jobs for which this dataset is an output.
- archive_named(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), filename: str = Path(Ellipsis), format: str = Path(Ellipsis), dry_run: Optional[bool] = Query(True), filter_query_params: 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.
- archive(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), filename: Optional[str] = Query(None), dry_run: Optional[bool] = Query(True), filter_query_params: 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.
- create_from_store(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), serialization_params: SerializationParams = Depends(query_serialization_params), create_payload: CreateHistoryContentFromStore = Body(Ellipsis)) List[Union[HDADetailed, HDASummary, HDCADetailed, HDCASummary, CustomHistoryItem]] [source]¶
Create history contents from model store. Input can be a tarfile created with build_objects script distributed with galaxy-data, from an exported history with files stripped out, or hand-crafted JSON dictionary.
- materialize_dataset(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), id: DecodedDatabaseIdField = Path(Ellipsis)) AsyncTaskResultSummary [source]¶
- materialize_to_history(*, trans: ProvidesHistoryContext = Depends(get_trans), history_id: DecodedDatabaseIdField = Path(Ellipsis), materialize_api_payload: MaterializeDatasetInstanceAPIRequest = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
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: StructuredApp)[source]¶
Bases:
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.
- 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
- 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:
- Returns:
an okay message
galaxy.webapps.galaxy.api.job_lock module¶
- galaxy.webapps.galaxy.api.job_lock.job_lock_status(job_manager: JobManager = GalaxyTypeDepends(_do_resolve)) JobLock [source]¶
Get job lock status.
- galaxy.webapps.galaxy.api.job_lock.update_job_lock(job_manager: JobManager = GalaxyTypeDepends(_do_resolve), job_lock: JobLock = Body(Ellipsis)) JobLock [source]¶
Set job lock status.
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: StructuredApp)[source]¶
Bases:
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.
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
galaxy.webapps.galaxy.api.jobs module¶
API operations on a jobs.
See also
galaxy.model.Jobs
- class galaxy.webapps.galaxy.api.jobs.FastAPIJobs(*, service: JobsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: JobsService = GalaxyTypeDepends(_do_resolve)¶
- show(*, id: DecodedDatabaseIdField, trans: ProvidesUserContext = Depends(get_trans), full: Optional[bool] = False) Dict[str, Any] [source]¶
Return dictionary containing description of job data
Parameters - id: ID of job to return - full: Return extra information ?
- index(*, trans: ProvidesUserContext = Depends(get_trans), states: Optional[List[str]] = Depends(parse_elements), user_details: bool = Query(False), user_id: Optional[DecodedDatabaseIdField] = Query(None), view: JobIndexViewEnum = Query(collection), tool_ids: Optional[List[str]] = Depends(parse_elements), tool_ids_like: Optional[List[str]] = Depends(parse_elements), date_range_min: Optional[Union[datetime, date]] = Query(None), date_range_max: Optional[Union[datetime, date]] = Query(None), history_id: Optional[DecodedDatabaseIdField] = Query(None), workflow_id: Optional[DecodedDatabaseIdField] = Query(None), invocation_id: Optional[DecodedDatabaseIdField] = Query(None), order_by: JobIndexSortByEnum = Query(update_time), search: Optional[str] = Query(None), limit: int = Query(500), offset: int = Query(0)) List[Dict[str, Any]] [source]¶
- class galaxy.webapps.galaxy.api.jobs.JobController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesVisualizationMixin
- job_manager = GalaxyTypeDepends(_do_resolve)¶
- job_search = GalaxyTypeDepends(_do_resolve)¶
- hda_manager = GalaxyTypeDepends(_do_resolve)¶
- common_problems(trans: ProvidesUserContext, id, **kwd)[source]¶
- GET /api/jobs/{id}/common_problems
check inputs and job for common potential problems to aid in error reporting
- inputs(trans: ProvidesUserContext, id, **kwd) List[dict] [source]¶
GET /api/jobs/{id}/inputs
returns input datasets created by job
- Parameters:
id (string) – Encoded job id
- Return type:
list of dicts
- Returns:
list of dictionaries containing input dataset associations
- outputs(trans, id)[source]¶
- GET /api/jobs/{id}/outputs
returns output datasets created by job
- Parameters:
id (string) – Encoded job id
- Return type:
list of dicts
- Returns:
list of dictionaries containing output dataset associations
- delete(trans, id)[source]¶
- Delete /api/jobs/{id}
cancels specified job
- Parameters:
id (string) – Encoded job id
message (string) – Stop message.
- resume(trans: ProvidesUserContext, id, **kwd) List[dict] [source]¶
- PUT /api/jobs/{id}/resume
Resumes a paused job
- Parameters:
id (string) – Encoded job id
- Return type:
list of dicts
- Returns:
list of dictionaries containing output dataset associations
- metrics(trans: 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:
job_id (string) – Encoded job id
dataset_id (string) – Encoded HDA or LDDA id
hda_ldda (string) – hda if dataset_id is an HDA id (default), ldda if it is an ldda id.
- Return type:
- Returns:
list containing job metrics
- destination_params(trans: 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:
- Returns:
list containing job destination parameters
- parameters_display(trans: 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:
job_id (string) – Encoded job id
dataset_id (string) – Encoded HDA or LDDA id
hda_ldda (string) – hda if dataset_id is an HDA id (default), ldda if it is an ldda id.
- Return type:
- Returns:
job parameters for for display
- build_for_rerun(trans: 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
- create(trans: ProvidesUserContext, payload, **kwd)[source]¶
See the create method in tools.py in order to submit a job.
- 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:
- 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.
- 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.
- show_job_lock(trans: ProvidesUserContext, **kwd)[source]¶
- GET /api/job_lock
return boolean indicating if job lock active.
- update_job_lock(trans: ProvidesUserContext, payload, **kwd)[source]¶
- PUT /api/job_lock
return boolean indicating if job lock active.
galaxy.webapps.galaxy.api.libraries module¶
API operations on a data library.
- class galaxy.webapps.galaxy.api.libraries.FastAPILibraries(*, service: LibrariesService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: LibrariesService = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesUserContext = Depends(get_trans), deleted: Optional[bool] = Query(None)) LibrarySummaryList [source]¶
Returns a list of summary data for all libraries.
- index_deleted(*, trans: ProvidesUserContext = Depends(get_trans)) LibrarySummaryList [source]¶
Returns a list of summary data for all libraries marked as deleted.
- show(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) LibrarySummary [source]¶
Returns summary information about a particular library.
- create(*, trans: ProvidesUserContext = Depends(get_trans), payload: CreateLibraryPayload = Body(Ellipsis)) LibrarySummary [source]¶
Creates a new library and returns its summary information. Currently, only admin users can create libraries.
- create_from_store(*, trans: ProvidesUserContext = Depends(get_trans), payload: CreateLibrariesFromStore = Body(Ellipsis)) List[LibrarySummary] [source]¶
- update(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), payload: UpdateLibraryPayload = Body(Ellipsis)) LibrarySummary [source]¶
Updates the information of an existing library.
- delete(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), undelete: Optional[bool] = Query(None), payload: Optional[DeleteLibraryPayload] = Body(None)) LibrarySummary [source]¶
Marks the specified library as deleted (or undeleted). Currently, only admin users can delete or restore libraries.
- get_permissions(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), scope: Optional[LibraryPermissionScope] = Query(None), is_library_access: Optional[bool] = Query(None), page: int = Query(1), page_limit: int = Query(10), q: Optional[str] = Query(None)) Union[LibraryCurrentPermissions, LibraryAvailablePermissions] [source]¶
Gets the current or available permissions of a particular library. The results can be paginated and additionally filtered by a query.
- set_permissions(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), action: Optional[LibraryPermissionAction] = Query(None), payload: Union[LibraryPermissionsPayload, LegacyLibraryPermissionsPayload] = Body(Ellipsis)) Union[LibraryLegacySummary, LibraryCurrentPermissions] [source]¶
Sets the permissions to access and manipulate a library.
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: StructuredApp, hda_manager: HDAManager)[source]¶
Bases:
BaseGalaxyAPIController
,UsesLibraryMixinItems
,UsesFormDefinitionsMixin
,LibraryActions
- __init__(app: StructuredApp, hda_manager: HDAManager)[source]¶
Initialize an interface for application ‘app’
- 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 solution- Parameters:
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:
- 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.
- 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:
- update(trans, id, library_id, payload, **kwd)[source]¶
PUT /api/libraries/{library_id}/contents/{id}
Create an ImplicitlyConvertedDatasetAssociation.
- 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
galaxy.webapps.galaxy.api.library_datasets module¶
API operations on the library datasets.
- class galaxy.webapps.galaxy.api.library_datasets.LibraryDatasetsController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesVisualizationMixin
,LibraryActions
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
- 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_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
- 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
- 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
- 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
- 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 directory
root 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 directory
root 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 path
option 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
- 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:
file
- Raises:
MessageException, ItemDeletionException, ItemAccessibilityException, HTTPBadRequest, OSError, IOError, ObjectNotFound
galaxy.webapps.galaxy.api.licenses module¶
- class galaxy.webapps.galaxy.api.licenses.FastAPILicenses(*, licenses_manager: LicensesManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- licenses_manager: LicensesManager = GalaxyTypeDepends(_do_resolve)¶
- async index() List[LicenseMetadataModel] [source]¶
Returns an index with all the available [SPDX licenses](https://spdx.org/licenses/).
- async get(*, id=Path(Ellipsis)) 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/).
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(*, manager: MetricsManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- manager: MetricsManager = GalaxyTypeDepends(_do_resolve)¶
- create(*, trans: ProvidesUserContext = Depends(get_trans), payload: CreateMetricsPayload = Body(Ellipsis)) Any [source]¶
Record any metrics sent and return some status object.
galaxy.webapps.galaxy.api.page_revisions module¶
API for updating Galaxy Pages
- class galaxy.webapps.galaxy.api.page_revisions.PageRevisionsController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- manager: PageManager = GalaxyTypeDepends(_do_resolve)¶
- 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:
- Returns:
dictionaries containing different revisions of the page
- 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
galaxy.webapps.galaxy.api.pages module¶
API for updating Galaxy Pages
- class galaxy.webapps.galaxy.api.pages.FastAPIPages(*, service: PagesService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: PagesService = GalaxyTypeDepends(_do_resolve)¶
- async index(*, response: Response, trans: ProvidesUserContext = Depends(get_trans), deleted: bool = Query(False), user_id: Optional[DecodedDatabaseIdField] = Query(None), show_published: bool = Query(True), show_shared: bool = Query(False), sort_by: typing_extensions.Literal[update_time, title, username] = Query(update_time), sort_desc: bool = Query(False), limit: int = Query(100), offset: int = Query(0), search: Optional[str] = Query(None)) PageSummaryList [source]¶
Get a list with summary information of all Pages available to the user.
- create(*, trans: ProvidesUserContext = Depends(get_trans), payload: CreatePagePayload = Body(Ellipsis)) PageSummary [source]¶
Get a list with details of all Pages available to the user.
- async delete(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
Marks the Page with the given ID as deleted.
- async show_pdf(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
Return a PDF document of the last revision of the Page.
This feature may not be available in this Galaxy.
- async prepare_pdf(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) AsyncFile [source]¶
Return a STS download link for this page to be downloaded as a PDF.
This feature may not be available in this Galaxy.
- async show(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) PageDetails [source]¶
Return summary information about a specific Page and the content of the last revision.
- sharing(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Return the sharing status of the item.
- enable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item accessible by a URL link and return the current sharing status.
- disable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item inaccessible by a URL link and return the current sharing status.
- publish(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item publicly available by a URL link and return the current sharing status.
- unpublish(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Removes this item from the published list and return the current sharing status.
Shares this item with specific users and return the current sharing status.
- set_slug(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), payload: SetSlugPayload = Body(Ellipsis))[source]¶
Sets a new slug to access this item by URL. The new slug must be unique.
galaxy.webapps.galaxy.api.plugins module¶
Plugins resource control over the API.
- class galaxy.webapps.galaxy.api.plugins.PluginsController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
RESTful controller for interactions with plugins.
- hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)¶
- history_manager: HistoryManager = GalaxyTypeDepends(_do_resolve)¶
galaxy.webapps.galaxy.api.provenance module¶
API operations provenance
- class galaxy.webapps.galaxy.api.provenance.BaseProvenanceController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- class galaxy.webapps.galaxy.api.provenance.HDAProvenanceController(app: StructuredApp)[source]¶
Bases:
BaseProvenanceController
- controller_name = 'history_content_provenance'¶
- provenance_item_class = 'HistoryDatasetAssociation'¶
- provenance_item_id = 'history_content_id'¶
- hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)¶
- class galaxy.webapps.galaxy.api.provenance.LDDAProvenanceController(app: StructuredApp)[source]¶
Bases:
BaseProvenanceController
- controller_name = 'ldda_provenance'¶
- provenance_item_class = 'LibraryDatasetDatasetAssociation'¶
- provenance_item_id = 'library_content_id'¶
- hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)¶
galaxy.webapps.galaxy.api.quotas module¶
API operations on Quota objects.
- class galaxy.webapps.galaxy.api.quotas.FastAPIQuota(*, service: QuotasService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: QuotasService = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesUserContext = Depends(get_trans)) QuotaSummaryList [source]¶
Displays a list with information of quotas that are currently active.
- index_deleted(*, trans: ProvidesUserContext = Depends(get_trans)) QuotaSummaryList [source]¶
Displays a list with information of quotas that have been deleted.
- show(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) QuotaDetails [source]¶
Displays details on a particular active quota.
- show_deleted(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) QuotaDetails [source]¶
Displays details on a particular quota that has been deleted.
- create(*, payload: CreateQuotaParams, trans: ProvidesUserContext = Depends(get_trans)) CreateQuotaResult [source]¶
Creates a new quota.
- update(*, payload: UpdateQuotaParams, id: DecodedDatabaseIdField = Path(Ellipsis), trans: ProvidesUserContext = Depends(get_trans)) str [source]¶
Updates an existing quota.
- delete(*, id: DecodedDatabaseIdField = Path(Ellipsis), trans: ProvidesUserContext = Depends(get_trans), payload: DeleteQuotaPayload = Body(None)) str [source]¶
Deletes an existing quota.
- undelete(*, id: DecodedDatabaseIdField = Path(Ellipsis), trans: ProvidesUserContext = Depends(get_trans)) str [source]¶
Restores a previously deleted quota.
galaxy.webapps.galaxy.api.remote_files module¶
API operations on remote files.
- class galaxy.webapps.galaxy.api.remote_files.FastAPIRemoteFiles(*, manager: RemoteFilesManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- manager: RemoteFilesManager = GalaxyTypeDepends(_do_resolve)¶
- async index(*, user_ctx: ProvidesUserContext = Depends(get_trans), target: str = Query(ftpdir), format: Optional[RemoteFilesFormat] = Query(uri), recursive: Optional[bool] = Query(None), disable: Optional[RemoteFilesDisableMode] = Query(None)) List[Dict[str, Any]] [source]¶
Lists all remote files available to the user from different sources.
- async plugins(*, user_ctx: ProvidesUserContext = Depends(get_trans), browsable_only: Optional[bool] = Query(True)) FilesSourcePluginList [source]¶
Display plugin information for each of the gxfiles:// URI targets available.
galaxy.webapps.galaxy.api.roles module¶
API operations on Role objects.
- class galaxy.webapps.galaxy.api.roles.FastAPIRoles(*, role_manager: RoleManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- role_manager: RoleManager = GalaxyTypeDepends(_do_resolve)¶
- index(*, trans: ProvidesUserContext = Depends(get_trans)) RoleListResponse [source]¶
- show(*, id: DecodedDatabaseIdField, trans: ProvidesUserContext = Depends(get_trans)) RoleModelResponse [source]¶
- create(*, trans: ProvidesUserContext = Depends(get_trans), role_definition_model: RoleDefinitionModel = Body(Ellipsis)) RoleModelResponse [source]¶
galaxy.webapps.galaxy.api.sanitize_allow module¶
API operations allowing clients to retrieve and modify the HTML sanitization allow list.
galaxy.webapps.galaxy.api.search module¶
API for searching Galaxy Datasets
- class galaxy.webapps.galaxy.api.search.SearchController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,SharableItemSecurityMixin
- create(trans: ProvidesUserContext, payload: dict, **kwd)[source]¶
POST /api/search Do a search of the various elements of Galaxy.
galaxy.webapps.galaxy.api.short_term_storage module¶
API operations around galaxy.web.short_term_storage infrastructure.
- class galaxy.webapps.galaxy.api.short_term_storage.FastAPIShortTermStorage(*, short_term_storage_monitor: ShortTermStorageMonitor = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- short_term_storage_monitor: ShortTermStorageMonitor = GalaxyTypeDepends(_do_resolve)¶
galaxy.webapps.galaxy.api.tasks module¶
API Controller providing experimental access to Celery Task State.
galaxy.webapps.galaxy.api.tool_data module¶
- class galaxy.webapps.galaxy.api.tool_data.ImportToolDataBundle(*, source: Union[ImportToolDataBundleDatasetSource, ImportToolDataBundleUriSource])[source]¶
Bases:
BaseModel
- class galaxy.webapps.galaxy.api.tool_data.FastAPIToolData(*, tool_data_manager: ToolDataManager = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- tool_data_manager: ToolDataManager = GalaxyTypeDepends(_do_resolve)¶
- async create(*, tool_data_file_path=None, import_bundle_model: ImportToolDataBundle = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
- async show(*, table_name: str = Path(Ellipsis)) ToolDataDetails [source]¶
Get details of a given tool data table.
- async reload(*, table_name: str = Path(Ellipsis)) ToolDataDetails [source]¶
Reloads a data table and return its details.
- async show_field(*, table_name: str = Path(Ellipsis), field_name: str = Path(Ellipsis)) ToolDataField [source]¶
Reloads a data table and return its details.
- async 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.
galaxy.webapps.galaxy.api.tool_dependencies module¶
API operations allowing clients to manage tool dependencies.
- class galaxy.webapps.galaxy.api.tool_dependencies.ToolDependenciesAPIController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
- index(trans: ProvidesAppContext, **kwd)[source]¶
GET /api/dependency_resolvers
- show(trans: ProvidesAppContext, id: str)[source]¶
GET /api/dependency_resolvers/<id>
- update(trans)[source]¶
PUT /api/dependency_resolvers
Reload tool dependency resolution configuration.
- resolver_dependency(trans: 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: ProvidesAppContext, id: 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: 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: 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.
- manager_requirements(trans: 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.
- clean(trans: ProvidesAppContext, id=None, **kwds)[source]¶
POST /api/dependency_resolvers/{index}/clean
Cleans up intermediate files created by resolvers during the dependency installation.
- summarize_toolbox(trans: 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: 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: 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
- unused_dependency_paths(trans: ProvidesAppContext, **kwds)[source]¶
GET /api/dependency_resolvers/unused_paths
- delete_unused_dependency_paths(trans: ProvidesAppContext, payload, **kwds)[source]¶
PUT /api/dependency_resolvers/unused_paths
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: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
- index(trans: 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.
- access_entry_point(trans: 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
- stop_entry_point(trans: ProvidesUserContext, id, **kwds)[source]¶
DELETE /api/entry_points/{id}
galaxy.webapps.galaxy.api.tool_shed_repositories module¶
- class galaxy.webapps.galaxy.api.tool_shed_repositories.ToolShedRepositoriesController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
RESTful controller for interactions with tool shed repositories.
- service: ToolShedRepositoriesService = GalaxyTypeDepends(_do_resolve)¶
- install_repository_revision(trans: 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.
- 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
- class galaxy.webapps.galaxy.api.tool_shed_repositories.FastAPIToolShedRepositories(*, service: ToolShedRepositoriesService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: ToolShedRepositoriesService = GalaxyTypeDepends(_do_resolve)¶
- index(*, name: Optional[str] = Query(None), owner: Optional[str] = Query(None), changeset: Optional[str] = Query(None), deleted: Optional[bool] = Query(None), uninstalled: Optional[bool] = Query(None)) List[InstalledToolShedRepository] [source]¶
- check_for_updates(*, id: Optional[DecodedDatabaseIdField] = None) CheckForUpdatesResponse [source]¶
- show(*, id: DecodedDatabaseIdField = Path(Ellipsis)) InstalledToolShedRepository [source]¶
galaxy.webapps.galaxy.api.tools module¶
- class galaxy.webapps.galaxy.api.tools.FormDataApiRoute(path: str, endpoint: ~typing.Callable[[...], ~typing.Any], *, response_model: ~typing.Any = <fastapi.datastructures.DefaultPlaceholder object>, status_code: ~typing.Optional[int] = None, tags: ~typing.Optional[~typing.List[~typing.Union[str, ~enum.Enum]]] = None, dependencies: ~typing.Optional[~typing.Sequence[~fastapi.params.Depends]] = None, summary: ~typing.Optional[str] = None, description: ~typing.Optional[str] = None, response_description: str = 'Successful Response', responses: ~typing.Optional[~typing.Dict[~typing.Union[int, str], ~typing.Dict[str, ~typing.Any]]] = None, deprecated: ~typing.Optional[bool] = None, name: ~typing.Optional[str] = None, methods: ~typing.Optional[~typing.Union[~typing.Set[str], ~typing.List[str]]] = None, operation_id: ~typing.Optional[str] = None, response_model_include: ~typing.Optional[~typing.Union[~typing.Set[~typing.Union[int, str]], ~typing.Dict[~typing.Union[int, str], ~typing.Any]]] = None, response_model_exclude: ~typing.Optional[~typing.Union[~typing.Set[~typing.Union[int, str]], ~typing.Dict[~typing.Union[int, str], ~typing.Any]]] = None, response_model_by_alias: bool = True, response_model_exclude_unset: bool = False, response_model_exclude_defaults: bool = False, response_model_exclude_none: bool = False, include_in_schema: bool = True, response_class: ~typing.Union[~typing.Type[~starlette.responses.Response], ~fastapi.datastructures.DefaultPlaceholder] = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Optional[~typing.Any] = None, callbacks: ~typing.Optional[~typing.List[~starlette.routing.BaseRoute]] = None, openapi_extra: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, generate_unique_id_function: ~typing.Union[~typing.Callable[[~fastapi.routing.APIRoute], str], ~fastapi.datastructures.DefaultPlaceholder] = <fastapi.datastructures.DefaultPlaceholder object>)[source]¶
Bases:
APIContentTypeRoute
- secure_cloned_response_field: Optional[ModelField]¶
- class galaxy.webapps.galaxy.api.tools.JsonApiRoute(path: str, endpoint: ~typing.Callable[[...], ~typing.Any], *, response_model: ~typing.Any = <fastapi.datastructures.DefaultPlaceholder object>, status_code: ~typing.Optional[int] = None, tags: ~typing.Optional[~typing.List[~typing.Union[str, ~enum.Enum]]] = None, dependencies: ~typing.Optional[~typing.Sequence[~fastapi.params.Depends]] = None, summary: ~typing.Optional[str] = None, description: ~typing.Optional[str] = None, response_description: str = 'Successful Response', responses: ~typing.Optional[~typing.Dict[~typing.Union[int, str], ~typing.Dict[str, ~typing.Any]]] = None, deprecated: ~typing.Optional[bool] = None, name: ~typing.Optional[str] = None, methods: ~typing.Optional[~typing.Union[~typing.Set[str], ~typing.List[str]]] = None, operation_id: ~typing.Optional[str] = None, response_model_include: ~typing.Optional[~typing.Union[~typing.Set[~typing.Union[int, str]], ~typing.Dict[~typing.Union[int, str], ~typing.Any]]] = None, response_model_exclude: ~typing.Optional[~typing.Union[~typing.Set[~typing.Union[int, str]], ~typing.Dict[~typing.Union[int, str], ~typing.Any]]] = None, response_model_by_alias: bool = True, response_model_exclude_unset: bool = False, response_model_exclude_defaults: bool = False, response_model_exclude_none: bool = False, include_in_schema: bool = True, response_class: ~typing.Union[~typing.Type[~starlette.responses.Response], ~fastapi.datastructures.DefaultPlaceholder] = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Optional[~typing.Any] = None, callbacks: ~typing.Optional[~typing.List[~starlette.routing.BaseRoute]] = None, openapi_extra: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, generate_unique_id_function: ~typing.Union[~typing.Callable[[~fastapi.routing.APIRoute], str], ~fastapi.datastructures.DefaultPlaceholder] = <fastapi.datastructures.DefaultPlaceholder object>)[source]¶
Bases:
APIContentTypeRoute
- secure_cloned_response_field: Optional[ModelField]¶
- class galaxy.webapps.galaxy.api.tools.FetchTools(*, service: ToolsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: ToolsService = GalaxyTypeDepends(_do_resolve)¶
- async fetch_json(*, payload: FetchDataPayload = Body(Ellipsis), trans: ProvidesHistoryContext = Depends(get_trans))[source]¶
- async fetch_form(*, request: Request, payload: FetchDataFormPayload = Depends(_as_form), files: Optional[List[UploadFile]] = None, trans: ProvidesHistoryContext = Depends(get_trans))[source]¶
- class galaxy.webapps.galaxy.api.tools.ToolsController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesVisualizationMixin
RESTful controller for interactions with tools.
- history_manager: HistoryManager = GalaxyTypeDepends(_do_resolve)¶
- hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)¶
- hdca_manager: DatasetCollectionManager = GalaxyTypeDepends(_do_resolve)¶
- service: ToolsService = GalaxyTypeDepends(_do_resolve)¶
- index(trans: 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
- show(trans: 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
- build(trans: GalaxyWebTransaction, id, **kwd)[source]¶
GET /api/tools/{tool_id}/build Returns a tool model including dynamic parameters and updated values, repeats block etc.
- test_data_path(trans: GalaxyWebTransaction, id, **kwd)[source]¶
GET /api/tools/{tool_id}/test_data_path?tool_version={tool_version}
- test_data_download(trans: GalaxyWebTransaction, id, **kwd)[source]¶
GET /api/tools/{tool_id}/test_data_download?tool_version={tool_version}&filename={filename}
- tests_summary(trans: 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>
- test_data(trans: 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.
- reload(trans: GalaxyWebTransaction, id, **kwd)[source]¶
GET /api/tools/{tool_id}/reload Reload specified tool.
- all_requirements(trans: GalaxyWebTransaction, **kwds)[source]¶
GET /api/tools/all_requirements Return list of unique requirements for all tools.
- requirements(trans: 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”}]
- install_dependencies(trans: 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
- uninstall_dependencies(trans: 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 resolver
resolver_type: Use the dependency resolver of this resolver_type to install dependency
- build_dependency_cache(trans: 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
- diagnostics(trans: GalaxyWebTransaction, id, **kwd)[source]¶
GET /api/tools/{tool_id}/diagnostics Return diagnostic information to help debug panel and dependency related problems.
- citations(trans: GalaxyWebTransaction, id, **kwds)[source]¶
- conversion(trans: GalaxyWebTransaction, tool_id, payload, **kwd)[source]¶
- xrefs(trans: GalaxyWebTransaction, id, **kwds)[source]¶
- download(trans: GalaxyWebTransaction, id, **kwds)[source]¶
- raw_tool_source(trans: GalaxyWebTransaction, id, **kwds)[source]¶
Returns tool source.
language
is included in the response header.
- error_stack(trans: GalaxyWebTransaction, **kwd)[source]¶
GET /api/tools/error_stack Returns global tool error stack
- create(trans: 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).
galaxy.webapps.galaxy.api.toolshed module¶
- class galaxy.webapps.galaxy.api.toolshed.ToolShedController(app: StructuredApp)[source]¶
Bases:
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(*, registry: ToursRegistry = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- registry: ToursRegistry = GalaxyTypeDepends(_do_resolve)¶
- show(*, tour_id: str) TourDetails [source]¶
Return a tour definition.
- update_tour(*, tour_id: str) TourDetails [source]¶
Return a tour definition.
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: StructuredApp)[source]¶
Bases:
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: StructuredApp)[source]¶
Bases:
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: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- READ_CHUNK_SIZE = 65536¶
galaxy.webapps.galaxy.api.users module¶
API operations on User objects.
- class galaxy.webapps.galaxy.api.users.FastAPIUsers(*, service: UsersService = GalaxyTypeDepends(_do_resolve), user_serializer: UserSerializer = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: UsersService = GalaxyTypeDepends(_do_resolve)¶
- user_serializer: UserSerializer = GalaxyTypeDepends(_do_resolve)¶
- recalculate_disk_usage(*, trans: ProvidesUserContext = Depends(get_trans))[source]¶
This route will be removed in a future version.
Please use /api/users/current/recalculate_disk_usage instead.
- get_or_create_api_key(*, trans: ProvidesUserContext = Depends(get_trans), user_id: DecodedDatabaseIdField = Path(Ellipsis)) str [source]¶
- get_api_key(*, trans: ProvidesUserContext = Depends(get_trans), user_id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
- create_api_key(*, trans: ProvidesUserContext = Depends(get_trans), user_id: DecodedDatabaseIdField = Path(Ellipsis)) str [source]¶
- delete_api_key(*, trans: ProvidesUserContext = Depends(get_trans), user_id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
- usage(*, trans: ProvidesUserContext = Depends(get_trans), user_id: Union[DecodedDatabaseIdField, typing_extensions.Literal[current]] = Path(Ellipsis)) List[UserQuotaUsage] [source]¶
- usage_for(*, trans: ProvidesUserContext = Depends(get_trans), user_id: Union[DecodedDatabaseIdField, typing_extensions.Literal[current]] = Path(Ellipsis), label: str = Path(Ellipsis)) Optional[UserQuotaUsage] [source]¶
- get_beacon(*, trans: ProvidesUserContext = Depends(get_trans), user_id: DecodedDatabaseIdField = Path(Ellipsis)) UserBeaconSetting [source]¶
Warning: This endpoint is experimental and might change or disappear in future versions.
- set_beacon(*, trans: ProvidesUserContext = Depends(get_trans), user_id: DecodedDatabaseIdField = Path(Ellipsis), payload: UserBeaconSetting = Body(Ellipsis)) UserBeaconSetting [source]¶
Warning: This endpoint is experimental and might change or disappear in future versions.
- class galaxy.webapps.galaxy.api.users.UserAPIController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesTagsMixin
,BaseUIController
,UsesFormDefinitionsMixin
- user_manager: UserManager = GalaxyTypeDepends(_do_resolve)¶
- user_serializer: UserSerializer = GalaxyTypeDepends(_do_resolve)¶
- user_deserializer: UserDeserializer = GalaxyTypeDepends(_do_resolve)¶
- index(trans: 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)
- show(trans: ProvidesUserContext, id, **kwd)[source]¶
GET /api/users/{encoded_id} GET /api/users/deleted/{encoded_id} GET /api/users/current Displays information about a user.
- create(trans: GalaxyWebTransaction, payload: dict, **kwd)[source]¶
POST /api/users Creates a new Galaxy user.
- update(self, trans, id, payload, **kwd)[source]¶
- PUT /api/users/{id}
updates the values for the item with the given
id
- delete(trans, id, **kwd)[source]¶
DELETE /api/users/{id} delete the user with the given
id
Functionality restricted based on admin status
- 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
- anon_user_api_value(trans)[source]¶
Return data for an anonymous user, truncated to only usage and quota_percent
- 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
- set_information(trans, id, payload=None, **kwd)[source]¶
PUT /api/users/{id}/information/inputs Save a user’s email, username, addresses etc.
- set_favorite(trans, id, object_type, payload=None, **kwd)[source]¶
Add the object to user’s favorites PUT /api/users/{id}/favorites/{object_type}
- 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:.*?}
- set_theme(trans, id: str, theme: str, payload=None, **kwd) str [source]¶
Sets the user’s theme choice. PUT /api/users/{id}/theme/{theme}
- set_password(trans, id, payload=None, **kwd)[source]¶
Allows to the logged-in user to change own password.
- get_permissions(trans, id, payload=None, **kwd)[source]¶
Get the user’s default permissions for the new histories
- set_permissions(trans, id, payload=None, **kwd)[source]¶
Set 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.
- set_toolbox_filters(trans, id, payload=None, **kwd)[source]¶
API call to update toolbox filters data.
- 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
- galaxy.webapps.galaxy.api.users.get_user_full(trans: ProvidesUserContext, user_id: Union[DecodedDatabaseIdField, typing_extensions.Literal[current], str], deleted: bool) Optional[User] [source]¶
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(*, service: VisualizationsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: VisualizationsService = GalaxyTypeDepends(_do_resolve)¶
- sharing(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Return the sharing status of the item.
- enable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item accessible by a URL link and return the current sharing status.
- disable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item inaccessible by a URL link and return the current sharing status.
- publish(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item publicly available by a URL link and return the current sharing status.
- unpublish(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Removes this item from the published list and return the current sharing status.
Shares this item with specific users and return the current sharing status.
- set_slug(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), payload: SetSlugPayload = Body(Ellipsis))[source]¶
Sets a new slug to access this item by URL. The new slug must be unique.
- class galaxy.webapps.galaxy.api.visualizations.VisualizationsController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesVisualizationMixin
,UsesAnnotations
RESTful controller for interactions with visualizations.
- service: VisualizationsService = GalaxyTypeDepends(_do_resolve)¶
- index(trans: GalaxyWebTransaction, **kwargs)[source]¶
GET /api/visualizations:
- show(trans: GalaxyWebTransaction, id: str, **kwargs)[source]¶
GET /api/visualizations/{viz_id}
- create(trans: 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
- update(trans: GalaxyWebTransaction, id: str, payload: dict, **kwargs)[source]¶
PUT /api/visualizations/{encoded_visualization_id}
galaxy.webapps.galaxy.api.webhooks module¶
API Controller providing Galaxy Webhooks
- class galaxy.webapps.galaxy.api.webhooks.WebhooksController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
- all_webhooks(trans: GalaxyWebTransaction, **kwd)[source]¶
GET /api/webhooks/
Return all webhooks.
galaxy.webapps.galaxy.api.workflows module¶
API operations for Workflows
- class galaxy.webapps.galaxy.api.workflows.CreateInvocationFromStore(*, store_content_uri: Optional[str] = None, store_dict: Optional[Dict[str, Any]] = None, model_store_format: Optional[ModelStoreFormat] = None, history_id: Optional[str] = None, **extra_data: Any)[source]¶
Bases:
StoreContentSource
- class galaxy.webapps.galaxy.api.workflows.WorkflowsAPIController(app: StructuredApp)[source]¶
Bases:
BaseGalaxyAPIController
,UsesStoredWorkflowMixin
,UsesAnnotations
,SharableMixin
,ServesExportStores
,ConsumesModelStores
- service: WorkflowsService = GalaxyTypeDepends(_do_resolve)¶
- invocations_service: InvocationsService = GalaxyTypeDepends(_do_resolve)¶
- __init__(app: StructuredApp)[source]¶
Initialize an interface for application ‘app’
Save workflow menu to be shown in the tool panel PUT /api/workflows/menu
- show(trans: 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.
- create(trans: 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
- workflow_dict(trans: 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.
- import_new_workflow_deprecated(trans: 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.
- update(trans: 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
- refactor(trans, id, payload, **kwds)[source]¶
- PUT /api/workflows/{id}/refactor
updates the workflow stored with
id
- build_module(trans: GalaxyWebTransaction, payload=None)[source]¶
POST /api/workflows/build_module Builds module models for the workflow editor.
- get_tool_predictions(trans: 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
POST /api/workflows/import Import a workflow shared by other users.
- Parameters:
workflow_id (str) – the workflow id (required)
- Raises:
exceptions.MessageException, exceptions.ObjectNotFound
- invoke(trans: 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
- index_invocations(trans: 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
- create_invocations_from_store(trans, payload, **kwd)[source]¶
POST /api/invocations/from_store
Create invocation(s) from a supplied model store.
Input can be an archive describing a Galaxy model store containing an workflow invocation - for instance one created with with write_store or prepare_store_download endpoint.
- show_invocation(trans: 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
- cancel_invocation(trans: 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
- show_invocation_report(trans: 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: 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.
- 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}
- invocation_step_jobs_summary(trans: 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.
- invocation_jobs_summary(trans: 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.
- update_invocation_step(trans: 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….
- class galaxy.webapps.galaxy.api.workflows.FastAPIWorkflows(*, service: WorkflowsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- service: WorkflowsService = GalaxyTypeDepends(_do_resolve)¶
- index(*, response: Response, trans: ProvidesUserContext = Depends(get_trans), show_deleted: bool = Query(False), show_hidden: bool = Query(False), missing_tools: bool = Query(False), show_published: Optional[bool] = Query(None), show_shared: Optional[bool] = Query(None), sort_by: Optional[typing_extensions.Literal[create_time, update_time, name]] = Query(None), sort_desc: Optional[bool] = Query(None), limit: Optional[int] = Query(None), offset: Optional[int] = Query(0), search: Optional[str] = Query(None), skip_step_counts: bool = Query(False)) List[Dict[str, Any]] [source]¶
Lists stored workflows viewable by the user.
- sharing(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Return the sharing status of the item.
- enable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item accessible by a URL link and return the current sharing status.
- disable_link_access(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item inaccessible by a URL link and return the current sharing status.
- publish(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Makes this item publicly available by a URL link and return the current sharing status.
- unpublish(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis)) SharingStatus [source]¶
Removes this item from the published list and return the current sharing status.
Shares this item with specific users and return the current sharing status.
- set_slug(*, trans: ProvidesUserContext = Depends(get_trans), id: DecodedDatabaseIdField = Path(Ellipsis), payload: SetSlugPayload = Body(Ellipsis))[source]¶
Sets a new slug to access this item by URL. The new slug must be unique.
- delete_workflow(*, trans: ProvidesUserContext = Depends(get_trans), workflow_id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
- undelete_workflow(*, trans: ProvidesUserContext = Depends(get_trans), workflow_id: DecodedDatabaseIdField = Path(Ellipsis))[source]¶
- show_versions(*, trans: ProvidesUserContext = Depends(get_trans), workflow_id: DecodedDatabaseIdField = Path(Ellipsis), instance: Optional[bool] = Query(False))[source]¶
- class galaxy.webapps.galaxy.api.workflows.FastAPIInvocations(*, invocations_service: InvocationsService = GalaxyTypeDepends(_do_resolve))[source]¶
Bases:
object
- invocations_service: InvocationsService = GalaxyTypeDepends(_do_resolve)¶
- prepare_store_download(*, trans: ProvidesUserContext = Depends(get_trans), invocation_id: DecodedDatabaseIdField = Path(Ellipsis), payload: PrepareStoreDownloadPayload = Body(Ellipsis)) AsyncFile [source]¶
- write_store(*, trans: ProvidesUserContext = Depends(get_trans), invocation_id: DecodedDatabaseIdField = Path(Ellipsis), payload: WriteInvocationStoreToPayload = Body(Ellipsis)) AsyncTaskResultSummary [source]¶
- export_invocation_bco(*, trans: ProvidesUserContext = Depends(get_trans), invocation_id: DecodedDatabaseIdField = Path(Ellipsis), merge_history_metadata: Optional[bool] = Query(False))[source]¶
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.
Deprecation Notice: please use the asynchronous short_term_storage export system instead.
- call POST api/invocations/{id}/prepare_store_download with payload:
``` {
model_store_format: bco.json
Get storageRequestId from response and poll GET api/short_term_storage/${storageRequestId}/ready until SUCCESS
Get the resulting file with api/short_term_storage/${storageRequestId}
- download_invocation_bco(*, trans: ProvidesUserContext = Depends(get_trans), invocation_id: DecodedDatabaseIdField = Path(Ellipsis), merge_history_metadata: Optional[bool] = Query(False))[source]¶
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.
Deprecation Notice: please use the asynchronous short_term_storage export system instead.
- call POST api/invocations/{id}/prepare_store_download with payload:
``` {
model_store_format: bco.json
Get storageRequestId from response and poll GET api/short_term_storage/${storageRequestId}/ready until SUCCESS
Get the resulting file with api/short_term_storage/${storageRequestId}