Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.webapps.galaxy.api package

This module does not contain API routes. It exclusively contains dependencies to be used in FastAPI routes

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.

__init__(callable, dep_type)[source]
galaxy.webapps.galaxy.api.depends(dep_type: ~typing.Type[~galaxy.webapps.galaxy.api.T], app=<function get_app_with_request_session>) T[source]
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)) GalaxySession | None[source]
galaxy.webapps.galaxy.api.get_api_user(user_manager: UserManager = GalaxyTypeDepends(_do_resolve), key: str = Security(APIKeyQuery), x_api_key: str = Security(APIKeyHeader), bearer_token: HTTPAuthorizationCredentials = Security(HTTPBearer), run_as: int[int] | None = Header(None)) User | None[source]
galaxy.webapps.galaxy.api.get_user(galaxy_session=Depends(get_session), api_user=Depends(get_api_user)) User | None[source]
galaxy.webapps.galaxy.api.get_required_user(galaxy_session=Depends(get_session), api_user=Depends(get_api_user)) User[source]
class galaxy.webapps.galaxy.api.UrlBuilder(request: Request)[source]

Bases: object

__init__(request: Request)[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.

__init__(request: Request)[source]
property base: str

Base URL of the request.

property url_path: str

Base with optional prefix added.

property host: str

The host address.

property environ: Environ

Fallback WSGI environ.

This is not a full environ, there is no body. This is only meant to make routes.url_for work.

property headers
property remote_host: str
property remote_addr: str | None
property is_secure: bool

Was this a secure (https) request.

Return cookie.

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.

__init__(response: Response)[source]
property headers

The response headers.

Set a cookie.

galaxy.webapps.galaxy.api.get_current_history_from_session(galaxy_session: GalaxySession | None) History | None[source]
galaxy.webapps.galaxy.api.fix_url_for(mapper: Mapper, galaxy_request: GalaxyASGIRequest)[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]
galaxy.webapps.galaxy.api.cors_preflight(response: Response)[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]

Bases: str, Enum

An enumeration.

get = 'GET'
head = 'HEAD'
post = 'POST'
put = 'PUT'
patch = 'PATCH'
delete = 'DELETE'
options = 'OPTIONS'
class galaxy.webapps.galaxy.api.FrameworkRouter(*, prefix: str[str] = '', tags: ~typing.List[str | enum.Enum] | None[~typing.List[str | ~enum.Enum] | None] | None = None, dependencies: ~typing.Sequence[fastapi.params.Depends] | None[~typing.Sequence[~fastapi.params.Depends] | None] | None = None, default_response_class: ~typing.Type[starlette.responses.Response][~typing.Type[~starlette.responses.Response]] = <fastapi.datastructures.DefaultPlaceholder object>, responses: ~typing.Dict[int | str, Dict[str, Any]] | None[~typing.Dict[int | str, ~typing.Dict[str, ~typing.Any]] | None] | None = None, callbacks: ~typing.List[starlette.routing.BaseRoute] | None[~typing.List[~starlette.routing.BaseRoute] | None] | None = None, routes: ~typing.List[starlette.routing.BaseRoute] | None[~typing.List[~starlette.routing.BaseRoute] | None] | None = None, redirect_slashes: bool[bool] = True, default: ~typing.Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[None]]], Awaitable[None]] | None[~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] | None = None, dependency_overrides_provider: ~typing.Any | None[~typing.Any | None] | None = None, route_class: ~typing.Type[fastapi.routing.APIRoute][~typing.Type[~fastapi.routing.APIRoute]] = <class 'fastapi.routing.APIRoute'>, on_startup: ~typing.Sequence[Callable[[], Any]] | None[~typing.Sequence[~typing.Callable[[], ~typing.Any]] | None] | None = None, on_shutdown: ~typing.Sequence[Callable[[], Any]] | None[~typing.Sequence[~typing.Callable[[], ~typing.Any]] | None] | None = None, lifespan: ~typing.Callable[[Any], AbstractAsyncContextManager[None]] | Callable[[Any], AbstractAsyncContextManager[Mapping[str, Any]]] | None[~typing.Callable[[~typing.Any], ~typing.AbstractAsyncContextManager[None]] | ~typing.Callable[[~typing.Any], ~typing.AbstractAsyncContextManager[~typing.Mapping[str, ~typing.Any]]] | None] | None = None, deprecated: ~typing.bool | None[bool | None] | None = None, include_in_schema: bool[bool] = True, generate_unique_id_function: ~typing.Callable[[fastapi.routing.APIRoute], str][~typing.Callable[[~fastapi.routing.APIRoute], str]] = <fastapi.datastructures.DefaultPlaceholder object>)[source]

Bases: APIRouter

A FastAPI Router tailored to Galaxy.

admin_user_dependency: Any
wrap_with_alias(verb: RestVerb, *args, alias: str | None = None, **kwd)[source]

Wraps FastAPI methods with additional alias keyword, require_admin and CORS handling.

@router.get(“/api/thing”, alias=”/api/deprecated_thing”) will then create routes for /api/thing and /api/deprecated_thing.

static construct_aliases(path: str, alias: str | None)[source]
get(*args, **kwd)[source]

Extend FastAPI.get to accept a require_admin Galaxy flag.

patch(*args, **kwd)[source]

Extend FastAPI.patch to accept a require_admin Galaxy flag.

put(*args, **kwd)[source]

Extend FastAPI.put to accept a require_admin Galaxy flag.

post(*args, **kwd)[source]

Extend FastAPI.post to accept a require_admin Galaxy flag.

delete(*args, **kwd)[source]

Extend FastAPI.delete to accept a require_admin Galaxy flag.

options(*args, **kwd)[source]

Add a path operation using an HTTP OPTIONS operation.

## Example

```python from fastapi import APIRouter, FastAPI

app = FastAPI() router = APIRouter()

@router.options(“/items/”) def get_item_options():

return {“additions”: [“Aji”, “Guacamole”]}

app.include_router(router) ```

head(*args, **kwd)[source]

Add a path operation using an HTTP HEAD operation.

## Example

```python from fastapi import APIRouter, FastAPI from pydantic import BaseModel

class Item(BaseModel):

name: str description: str | None = None

app = FastAPI() router = APIRouter()

@router.head(“/items/”, status_code=204) def get_items_headers(response: Response):

response.headers[“X-Cat-Dog”] = “Alone in the world”

app.include_router(router) ```

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.Router(*, prefix: str[str] = '', tags: ~typing.List[str | enum.Enum] | None[~typing.List[str | ~enum.Enum] | None] | None = None, dependencies: ~typing.Sequence[fastapi.params.Depends] | None[~typing.Sequence[~fastapi.params.Depends] | None] | None = None, default_response_class: ~typing.Type[starlette.responses.Response][~typing.Type[~starlette.responses.Response]] = <fastapi.datastructures.DefaultPlaceholder object>, responses: ~typing.Dict[int | str, Dict[str, Any]] | None[~typing.Dict[int | str, ~typing.Dict[str, ~typing.Any]] | None] | None = None, callbacks: ~typing.List[starlette.routing.BaseRoute] | None[~typing.List[~starlette.routing.BaseRoute] | None] | None = None, routes: ~typing.List[starlette.routing.BaseRoute] | None[~typing.List[~starlette.routing.BaseRoute] | None] | None = None, redirect_slashes: bool[bool] = True, default: ~typing.Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[None]]], Awaitable[None]] | None[~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] | None = None, dependency_overrides_provider: ~typing.Any | None[~typing.Any | None] | None = None, route_class: ~typing.Type[fastapi.routing.APIRoute][~typing.Type[~fastapi.routing.APIRoute]] = <class 'fastapi.routing.APIRoute'>, on_startup: ~typing.Sequence[Callable[[], Any]] | None[~typing.Sequence[~typing.Callable[[], ~typing.Any]] | None] | None = None, on_shutdown: ~typing.Sequence[Callable[[], Any]] | None[~typing.Sequence[~typing.Callable[[], ~typing.Any]] | None] | None = None, lifespan: ~typing.Callable[[Any], AbstractAsyncContextManager[None]] | Callable[[Any], AbstractAsyncContextManager[Mapping[str, Any]]] | None[~typing.Callable[[~typing.Any], ~typing.AbstractAsyncContextManager[None]] | ~typing.Callable[[~typing.Any], ~typing.AbstractAsyncContextManager[~typing.Mapping[str, ~typing.Any]]] | None] | None = None, deprecated: ~typing.bool | None[bool | None] | None = None, include_in_schema: bool[bool] = True, generate_unique_id_function: ~typing.Callable[[fastapi.routing.APIRoute], str][~typing.Callable[[~fastapi.routing.APIRoute], str]] = <fastapi.datastructures.DefaultPlaceholder object>)[source]

Bases: FrameworkRouter

admin_user_dependency: Any = Depends(get_admin_user)
user_dependency = Depends(get_required_user)
tags: List[str | Enum]
lifespan_context: Lifespan[Any]
class galaxy.webapps.galaxy.api.APICorsRoute(path: str, endpoint: ~typing.Callable[[...], ~typing.Any], *, response_model: ~typing.Any = <fastapi.datastructures.DefaultPlaceholder object>, status_code: int | None = None, tags: ~typing.List[str | ~enum.Enum] | None = None, dependencies: ~typing.Sequence[~fastapi.params.Depends] | None = None, summary: str | None = None, description: str | None = None, response_description: str = 'Successful Response', responses: ~typing.Dict[int | str, ~typing.Dict[str, ~typing.Any]] | None = None, deprecated: bool | None = None, name: str | None = None, methods: ~typing.Set[str] | ~typing.List[str] | None = None, operation_id: str | None = None, response_model_include: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = None, response_model_exclude: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = 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.Type[~starlette.responses.Response] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Any | None = None, callbacks: ~typing.List[~starlette.routing.BaseRoute] | None = None, openapi_extra: ~typing.Dict[str, ~typing.Any] | None = None, generate_unique_id_function: ~typing.Callable[[~fastapi.routing.APIRoute], str] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>)[source]

Bases: APIRoute

Sends CORS headers

get_route_handler() Callable[source]
class galaxy.webapps.galaxy.api.APIContentTypeRoute(path: str, endpoint: ~typing.Callable[[...], ~typing.Any], *, response_model: ~typing.Any = <fastapi.datastructures.DefaultPlaceholder object>, status_code: int | None = None, tags: ~typing.List[str | ~enum.Enum] | None = None, dependencies: ~typing.Sequence[~fastapi.params.Depends] | None = None, summary: str | None = None, description: str | None = None, response_description: str = 'Successful Response', responses: ~typing.Dict[int | str, ~typing.Dict[str, ~typing.Any]] | None = None, deprecated: bool | None = None, name: str | None = None, methods: ~typing.Set[str] | ~typing.List[str] | None = None, operation_id: str | None = None, response_model_include: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = None, response_model_exclude: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = 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.Type[~starlette.responses.Response] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Any | None = None, callbacks: ~typing.List[~starlette.routing.BaseRoute] | None = None, openapi_extra: ~typing.Dict[str, ~typing.Any] | None = None, generate_unique_id_function: ~typing.Callable[[~fastapi.routing.APIRoute], str] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>)[source]

Bases: APIRoute

Determines endpoint to match using content-type.

match_content_type: str
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) Any | None[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

tag: str

Alias for field number 0

description: str

Alias for field number 1

alias: str | None

Alias for field number 2

admin_only: bool

Alias for field number 3

as_markdown()[source]
galaxy.webapps.galaxy.api.search_query_param(model_name: str, tags: list, free_text_fields: list) str | None[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

tagged_item_id: str
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'
tagged_item_id: str = 'history_id'
history_manager: HistoryManager = GalaxyTypeDepends(_do_resolve)
class galaxy.webapps.galaxy.api.annotations.HistoryContentAnnotationsController(app: StructuredApp)[source]

Bases: BaseAnnotationsController

controller_name = 'history_content_annotations'
tagged_item_id: str = 'history_content_id'
hda_manager: HDAManager = GalaxyTypeDepends(_do_resolve)
class galaxy.webapps.galaxy.api.annotations.WorkflowAnnotationsController(app: StructuredApp)[source]

Bases: BaseAnnotationsController

controller_name = 'workflow_annotations'
tagged_item_id: str = 'workflow_id'

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]
__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.cloud module

galaxy.webapps.galaxy.api.cloudauthz module

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: str | None = None, keys: str | None = None, default_view: str | None = None, **_) SerializationParams[source]
galaxy.webapps.galaxy.api.common.query_serialization_params(view: str | None[str | None] | None = None, keys: str | None = Query(None)) SerializationParams[source]
galaxy.webapps.galaxy.api.common.get_value_filter_query_params(q: List[str] | None = Query(None), qv: List[str] | None = 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: List[str] | None = Query(None), qv: List[str] | None = Query(None), offset: int | None = Query(0), limit: int | None = Query(None), order: str | None = 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.normalize_permission_payload(payload_aliases: UpdateDatasetPermissionsPayload | UpdateDatasetPermissionsPayloadAliasB | UpdateDatasetPermissionsPayloadAliasC) UpdateDatasetPermissionsPayload[source]

Normalize the payload by choosing the first non-None value for each field.

This is an attempt on supporting multiple aliases for the permissions params. There are several allowed names for the same role list parameter, i.e.: access, access_ids, access_ids[]

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 the alias 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)) UserModel | None[source]

Return information about the current authenticated user.

index(*, trans: ProvidesUserContext = Depends(get_trans), view: str | None[str | None] | None = None, keys: str | None = 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.

version() Dict[str, Any][source]

Return Galaxy version information: major/minor version, optional extra info.

dynamic_tool_confs() List[Dict[str, str]][source]

Return dynamic tool configuration files.

decode_id(*, encoded_id: str = Path(PydanticUndefined)) Dict[str, int][source]

Decode a given id.

encode_id(*, decoded_id: int = Path(PydanticUndefined)) Dict[str, str][source]

Decode a given id.

tool_lineages() List[Dict[str, Dict]][source]

Return tool lineages for tools that have them.

reload_toolbox()[source]

Reload the Galaxy toolbox (but not individual tools).

__init__(*args: Any, **kwargs: Any) None

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’

index(trans, **kwd)[source]

GET /api/container_resolvers

show(trans, index)[source]

GET /api/container_resolvers/<id>

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:

dict

Returns:

a dictified description of the container dependency, with attribute dependency_type: None if no match was found.

resolve_toolbox(trans, **kwds)[source]

GET /api/container_resolvers/toolbox GET /api/container_resolvers/{index}/toolbox

Apply resolve() to each tool in the toolbox and return the results as a list. See documentation for resolve() for a description of parameters that can be consumed and a description of the resulting items.

Parameters:

tool_ids (str) – tool_ids to filter toolbox on

Return type:

list

Returns:

list of items returned from resolve()

resolve_toolbox_with_install(trans, payload, **kwds)[source]

POST /api/container_resolvers/toolbox/install POST /api/container_resolvers/{index}/toolbox/install

Do the resolution of dependencies like resolve_toolbox(), but allow building and installing new containers. payload of POST body maybe contain same parameters as resolve_toolbox query parameters.

Return type:

list

Returns:

list of items returned from resolve()

resolve_with_install(trans, payload, **kwds)[source]

POST /api/container_resolvers/resolve/install POST /api/container_resolvers/{index}/resolve/install

Do the resolution of dependencies like resolve(), but allow building and installing new containers during installation. payload of POST body maybe contain same parameters as resolve query parameters.

Return type:

dict

Returns:

a dictified description of the container dependency, with attribute dependency_type: None if no match was found.

galaxy.webapps.galaxy.api.dataset_collections module

galaxy.webapps.galaxy.api.datasets module

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

datatypes_registry: Registry = GalaxyTypeDepends(_do_resolve)
async index(*, extension_only: bool | None = Query(True), upload_only: bool | None = Query(True)) 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: bool | None = Query(True), upload_only: bool | None = Query(True)) DatatypesCombinedMap[source]

Combines the datatype information from (/api/datatypes) and the mapping information from (/api/datatypes/mapping) into a single response.

async sniffers() List[str][source]

Gets the list of all installed data type sniffers.

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.

async edam_data_detailed()[source]

Gets a map of datatypes and their corresponding EDAM data. EDAM data contains the EDAM iri, label, and definition.

__init__(*args: Any, **kwargs: Any) None

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.

reload(*, payload: Dict[str, List[str]] | None = Body(None)) ReloadFeedback[source]

Reloads the list of display applications.

__init__(*args: Any, **kwargs: Any) None

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.

show(trans, id, **kwd)[source]

GET /api/dynamic_tools/{encoded_dynamic_tool_id|tool_uuid}

create(trans, payload, **kwd)[source]

POST /api/dynamic_tools

The payload is expected to be a tool definition to dynamically load into Galaxy’s toolbox.

Parameters:
  • representation (dict) – a JSON-ified tool description to load

  • uuid (str) – the uuid to associate with the tool being created

delete(trans, id, **kwd)[source]

DELETE /api/dynamic_tools/{encoded_dynamic_tool_id|tool_uuid}

Deactivate the specified dynamic tool. Deactivated tools will not be loaded into the toolbox.

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]

exmeta_item_id: str
index(trans, **kwd)[source]
create(trans, payload, **kwd)[source]
class galaxy.webapps.galaxy.api.extended_metadata.LibraryDatasetExtendMetadataController(app: StructuredApp)[source]

Bases: BaseExtendedMetadataController[LibraryDatasetDatasetAssociation]

controller_name = 'library_dataset_extended_metadata'
exmeta_item_id: str = 'library_content_id'
class galaxy.webapps.galaxy.api.extended_metadata.HistoryDatasetExtendMetadataController(app: StructuredApp)[source]

Bases: BaseExtendedMetadataController[HistoryDatasetAssociation]

controller_name = 'history_dataset_extended_metadata'
exmeta_item_id: str = 'history_content_id'
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(*, folder_id: int[int], trans: ProvidesUserContext = Depends(get_trans), limit: int = Query(10), offset: int = Query(0), search_text: str | None = Query(None), include_deleted: bool | None = Query(False), order_by: typing_extensions.Literal[name, description, type, size, update_time] = Query(name), sort_desc: bool | None = 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(*, folder_id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: CreateLibraryFilePayload = Body(PydanticUndefined))[source]
__init__(*args: Any, **kwargs: Any) None

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(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) LibraryFolderDetails[source]

Returns detailed information about the library folder with the given ID.

create(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: CreateLibraryFolderPayload = Body(PydanticUndefined)) LibraryFolderDetails[source]

Returns detailed information about the newly created library folder.

update(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: UpdateLibraryFolderPayload = Body(PydanticUndefined)) LibraryFolderDetails[source]

Updates the information of an existing library folder.

delete(*, id: int[int], undelete: bool | None[bool | None] | None = None, trans: ProvidesUserContext = Depends(get_trans)) LibraryFolderDetails[source]

Marks the specified library folder as deleted (or undeleted).

get_permissions(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), scope: LibraryPermissionScope | None = Query(None), page: int = Query(1), page_limit: int = Query(10), q: str | None = Query(None)) 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(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), action: LibraryFolderPermissionAction | None = Query(None), payload: LibraryFolderPermissionsPayload = Body(PydanticUndefined)) LibraryFolderCurrentPermissions[source]

Sets the permissions to manage a library folder.

__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.forms module

API operations on FormDefinition objects.

class galaxy.webapps.galaxy.api.forms.FastAPIForms(*, form_manager: FormManager = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

form_manager: FormManager = GalaxyTypeDepends(_do_resolve)
delete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]
undelete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]
__init__(*args: Any, **kwargs: Any) None
class galaxy.webapps.galaxy.api.forms.FormDefinitionAPIController(app: StructuredApp)[source]

Bases: BaseGalaxyAPIController

index(trans, **kwd)[source]

GET /api/forms Displays a collection (list) of forms.

show(trans, id, **kwd)[source]

GET /api/forms/{encoded_form_id} Displays information about a form.

create(trans, payload, **kwd)[source]

POST /api/forms Creates a new form.

galaxy.webapps.galaxy.api.genomes module

galaxy.webapps.galaxy.api.genomes.get_id(base, format)[source]
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(PydanticUndefined), 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(*, trans: ProvidesUserContext = Depends(get_trans), id: str = Path(PydanticUndefined), type: str = Query(fasta_indexes), format: str = Query(None)) Any[source]
sequences(*, trans: ProvidesUserContext = Depends(get_trans), id: str = Path(PydanticUndefined), reference: bool = Query(None), chrom: str = Query(None), low: int = Query(None), high: int = Query(None), format: str = Query(None)) Any[source]
__init__(*args: Any, **kwargs: Any) None

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(*, group_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupRoleListResponse[source]
show(*, group_id: int[int], role_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupRoleResponse[source]
update(*, group_id: int[int], role_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupRoleResponse[source]
delete(*, group_id: int[int], role_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupRoleResponse[source]
__init__(*args: Any, **kwargs: Any) None

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(*, group_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupUserListResponse[source]

GET /api/groups/{encoded_group_id}/users Displays a collection (list) of groups.

show(*, group_id: int[int], user_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupUserResponse[source]

Displays information about a group user.

update(*, group_id: int[int], user_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupUserResponse[source]

PUT /api/groups/{encoded_group_id}/users/{encoded_user_id} Adds a user to a group

delete(*, group_id: int[int], user_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupUserResponse[source]

DELETE /api/groups/{encoded_group_id}/users/{encoded_user_id} Removes a user from a group

__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.groups module

API operations on Group objects.

class galaxy.webapps.galaxy.api.groups.FastAPIGroups(*, manager: GroupsManager = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

manager: GroupsManager = GalaxyTypeDepends(_do_resolve)
index(*, trans: ProvidesAppContext = Depends(get_trans)) GroupListResponse[source]
create(*, payload: GroupCreatePayload[GroupCreatePayload], trans: ProvidesAppContext = Depends(get_trans)) GroupListResponse[source]
show(*, group_id: int[int], trans: ProvidesAppContext = Depends(get_trans)) GroupResponse[source]
update(*, group_id: int[int], payload: GroupUpdatePayload[GroupUpdatePayload], trans: ProvidesAppContext = Depends(get_trans)) GroupResponse[source]
delete(*, group_id: int[int], trans: ProvidesAppContext = Depends(get_trans))[source]
purge(*, group_id: int[int], trans: ProvidesAppContext = Depends(get_trans))[source]
undelete(*, group_id: int[int], trans: ProvidesAppContext = Depends(get_trans))[source]
__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.histories module

galaxy.webapps.galaxy.api.history_contents module

galaxy.webapps.galaxy.api.item_tags module

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: ProvidesAppContext, 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:
  • job_id (str) – encoded id string of the job

  • path (str) – Path to file.

  • job_key (str) – A key used to authenticate this request as acting on behalf or a job runner for the specified job.

..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:
  • job_id (str) – encoded id string of the job

  • payload (dict) – dictionary structure containing:: ‘job_key’ = Key authenticating ‘path’ = Path to file to create.

..note:

This API method is intended only for consumption by job runners, not end users.

Return type:

dict

Returns:

an okay message

tus_patch(trans, **kwds)[source]

Exposed as PATCH /api/job_files/resumable_upload.

I think based on the docs, a separate tusd server is needed for job files if also hosting one for use facing uploads.

Setting up tusd for job files should just look like (I think):

tusd -host localhost -port 1080 -upload-dir=<galaxy_root>/database/tmp

See more discussion of checking upload access, but we shouldn’t need the API key and session stuff the user upload tusd server should be configured with.

Also shouldn’t need a hooks endpoint for this reason but if you want to add one the target CLI entry would be -hooks-http=<galaxy_url>/api/job_files/tus_hooks and the action is featured below.

I would love to check the job state with __authorize_job_access on the first POST but it seems like TusMiddleware doesn’t default to coming in here for that initial POST the way it does for the subsequent PATCHes. Ultimately, the upload is still authorized before the write done with POST /api/jobs/<job_id>/files so I think there is no route here to mess with user data - the worst of the security issues that can be caused is filling up the sever with needless files that aren’t acted on. Since this endpoint is not meant for public consumption - all the job files stuff and the TUS server should be blocked to public IPs anyway and restricted to your Pulsar servers and similar targeting could be accomplished with a user account and the user facing upload endpoints.

tus_hooks(trans, **kwds)[source]

No-op but if hook specified the way we do for user upload it would hit this action.

Exposed as PATCH /api/job_files/tus_hooks and documented in the docstring for tus_patch.

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(PydanticUndefined)) 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’

create(self, trans, job_id, payload, **kwargs)[source]
  • POST /api/jobs/{job_id}/ports

    Populate port information for interactive tools.

Parameters:
  • job_id (str) – encoded id string of the job

  • payload (dict) – dictionary structure containing:: ‘job_key’ = Key authenticating ‘container_runtime’ = Path to file to create.

..note:

This API method is intended only for consumption by job runners, not end users.

Return type:

dict

Returns:

an okay message

galaxy.webapps.galaxy.api.jobs module

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: bool | None = 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(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) LibrarySummary[source]

Returns summary information about a particular library.

create(*, trans: ProvidesUserContext = Depends(get_trans), payload: CreateLibraryPayload = Body(PydanticUndefined)) 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(PydanticUndefined)) List[LibrarySummary][source]
update(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: UpdateLibraryPayload = Body(PydanticUndefined)) LibrarySummary[source]

Updates the information of an existing library.

delete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), undelete: bool | None = Query(None), payload: DeleteLibraryPayload | None = Body(None)) LibrarySummary[source]

Marks the specified library as deleted (or undeleted). Currently, only admin users can delete or restore libraries.

get_permissions(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), scope: LibraryPermissionScope | None = Query(None), is_library_access: bool | None = Query(None), page: int = Query(1), page_limit: int = Query(10), q: str | None = Query(None)) 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(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), action: LibraryPermissionAction | None = Query(None), payload: LibraryPermissionsPayload | LegacyLibraryPermissionsPayload = Body(PydanticUndefined)) LibraryLegacySummary | LibraryCurrentPermissions[source]

Sets the permissions to access and manipulate a library.

__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.library_contents module

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(PydanticUndefined)) 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/).

__init__(*args: Any, **kwargs: Any) None

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(PydanticUndefined)) Any[source]

Record any metrics sent and return some status object.

__init__(*args: Any, **kwargs: Any) None

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:

list

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)
index(*, response: Response, trans: ProvidesUserContext = Depends(get_trans), deleted: bool = Query(False), limit: int = Query(100), offset: int = Query(0), search: str | None = Query(None), show_own: bool = Query(True), show_published: bool = Query(True), show_shared: bool = Query(False), sort_by: typing_extensions.Literal[create_time, title, update_time, username] = Query(update_time), sort_desc: bool = Query(False), user_id: int[int] | None = 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(PydanticUndefined)) PageSummary[source]

Get a list with details of all Pages available to the user.

delete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]

Marks the Page with the given ID as deleted.

undelete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]

Marks the Page with the given ID as undeleted.

show_pdf(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]

Return a PDF document of the last revision of the Page.

This feature may not be available in this Galaxy.

prepare_pdf(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) 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.

show(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) PageDetails[source]

Return summary information about a specific Page and the content of the last revision.

sharing(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) SharingStatus[source]

Return the sharing status of the item.

Makes this item accessible by a URL link and return the current sharing status.

Makes this item inaccessible by a URL link and return the current sharing status.

publish(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) SharingStatus[source]

Makes this item publicly available by a URL link and return the current sharing status.

unpublish(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) SharingStatus[source]

Removes this item from the published list and return the current sharing status.

share_with_users(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: ShareWithPayload = Body(PydanticUndefined)) ShareWithStatus[source]

Shares this item with specific users and return the current sharing status.

set_slug(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: SetSlugPayload = Body(PydanticUndefined))[source]

Sets a new slug to access this item by URL. The new slug must be unique.

__init__(*args: Any, **kwargs: Any) None

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)
index(trans, **kwargs)[source]

GET /api/plugins:

show(trans, id, **kwargs)[source]

GET /api/plugins/{id}:

galaxy.webapps.galaxy.api.provenance module

API operations provenance

class galaxy.webapps.galaxy.api.provenance.BaseProvenanceController(app: StructuredApp)[source]

Bases: BaseGalaxyAPIController

index(trans, **kwd)[source]
show(trans, elem_name, **kwd)[source]
create(trans, tag_name, payload=None, **kwd)[source]
delete(trans, tag_name, **kwd)[source]
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(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) QuotaDetails[source]

Displays details on a particular active quota.

show_deleted(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) 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(*, id: int[int], payload: UpdateQuotaParams, trans: ProvidesUserContext = Depends(get_trans)) str[source]

Updates an existing quota.

delete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: DeleteQuotaPayload = Body(None)) str[source]

Deletes an existing quota.

purge(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) str[source]
undelete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) str[source]

Restores a previously deleted quota.

__init__(*args: Any, **kwargs: Any) None

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)
index(*, response: Response, user_ctx: ProvidesUserContext = Depends(get_trans), target: str[str] = RemoteFilesTarget.ftpdir, format: RemoteFilesFormat | None[RemoteFilesFormat | None] = RemoteFilesFormat.uri, recursive: bool | None[bool | None] | None = None, disable: RemoteFilesDisableMode | None[RemoteFilesDisableMode | None] | None = None, writeable: bool | None[bool | None] | None = None, limit: int | None[int | None] | None = None, offset: int | None[int | None] | None = None, query: str | None[str | None] | None = None, sort_by: str | None[str | None] | None = None) ListUriResponse | ListJstreeResponse[source]

Lists all remote files available to the user from different sources.

The total count of files and directories is returned in the ‘total_matches’ header.

plugins(*, user_ctx: ProvidesUserContext = Depends(get_trans), browsable_only: bool | None[bool | None] = True, include_kind: List[galaxy.files.sources.PluginKind] | None[List[PluginKind] | None] | None = None, exclude_kind: List[galaxy.files.sources.PluginKind] | None[List[PluginKind] | None] | None = None) FilesSourcePluginList[source]

Display plugin information for each of the gxfiles:// URI targets available.

create_entry(*, user_ctx: ProvidesUserContext = Depends(get_trans), payload: CreateEntryPayload = Body(PydanticUndefined)) CreatedEntryResponse[source]

Creates a new entry on the remote files source.

__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.roles module

API operations on Role objects.

class galaxy.webapps.galaxy.api.roles.FastAPIRoles(*, service: RolesService = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

service: RolesService = GalaxyTypeDepends(_do_resolve)
index(*, trans: ProvidesUserContext = Depends(get_trans)) RoleListResponse[source]
show(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) RoleModelResponse[source]
create(*, trans: ProvidesUserContext = Depends(get_trans), role_definition_model: RoleDefinitionModel = Body(PydanticUndefined)) RoleModelResponse[source]
delete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) RoleModelResponse[source]
purge(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) RoleModelResponse[source]
undelete(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) RoleModelResponse[source]
__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.sanitize_allow module

API operations allowing clients to retrieve and modify the HTML sanitization allow list.

class galaxy.webapps.galaxy.api.sanitize_allow.SanitizeAllowController(app)[source]

Bases: BaseAPIController

index(trans, **kwd)[source]

GET /api/sanitize_allow Return an object showing the current state of the toolbox and allow list.

create(trans, tool_id, **kwd)[source]

PUT /api/sanitize_allow Add a new tool_id to the allowlist.

delete(trans, tool_id, **kwd)[source]

DELETE /api/sanitize_allow Remove tool_id from allowlist.

galaxy.webapps.galaxy.api.search module

galaxy.webapps.galaxy.api.short_term_storage module

API operations around galaxy.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)
is_ready(*, storage_request_id: UUID) bool[source]
serve(*, storage_request_id: UUID)[source]
__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.tags module

API Controller providing Galaxy Tags

class galaxy.webapps.galaxy.api.tags.FastAPITags(*, manager: TagsManager = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

manager: TagsManager = GalaxyTypeDepends(_do_resolve)
update(*, trans: ProvidesUserContext = Depends(get_trans), payload: ItemTagsPayload = Body(PydanticUndefined))[source]

Replaces the tags associated with an item with the new ones specified in the payload.

  • The previous tags will be __deleted__.

  • If no tags are provided in the request body, the currently associated tags will also be __deleted__.

__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.tasks module

API Controller providing experimental access to Celery Task State.

class galaxy.webapps.galaxy.api.tasks.FastAPITasks(*, manager: AsyncTasksManager = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

manager: AsyncTasksManager = GalaxyTypeDepends(_do_resolve)
state(*, task_id: UUID) TaskState[source]
__init__(*args: Any, **kwargs: Any) None

galaxy.webapps.galaxy.api.tool_data module

class galaxy.webapps.galaxy.api.tool_data.ImportToolDataBundle(*, source: ImportToolDataBundleDatasetSource | ImportToolDataBundleUriSource)[source]

Bases: BaseModel

source: ImportToolDataBundleDatasetSource | ImportToolDataBundleUriSource
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'source': FieldInfo(annotation=Union[ImportToolDataBundleDatasetSource, ImportToolDataBundleUriSource], required=True, discriminator='src')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

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 index() ToolDataEntryList[source]

Get the list of all available data tables.

create(*, tool_data_file_path: str | None = None, import_bundle_model: ImportToolDataBundle = Body(PydanticUndefined)) AsyncTaskResultSummary[source]
async show(*, table_name: str = Path(PydanticUndefined)) ToolDataDetails[source]

Get details of a given tool data table.

reload(*, table_name: str = Path(PydanticUndefined)) ToolDataDetails[source]

Reloads a data table and return its details.

async show_field(*, table_name: str = Path(PydanticUndefined), field_name: str = Path(PydanticUndefined)) ToolDataField[source]

Reloads a data table and return its details.

download_field_file(*, table_name: str = Path(PydanticUndefined), field_name: str = Path(PydanticUndefined), file_name: str = Path(PydanticUndefined))[source]

Download a file associated with the data table field.

delete(*, payload: ToolDataItem, table_name: str = Path(PydanticUndefined)) ToolDataDetails[source]

Removes an item from a data table and reloads it to return its updated details.

__init__(*args: Any, **kwargs: Any) None

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:

dict

Returns:

a dictified description of the dependency, with attribute dependency_type: None if no match was found.

install_dependency(trans: ProvidesAppContext, id: str | None = 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:

dict

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:

dict

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.

Parameters:

index (int) – index of the dependency resolver

Return type:

dict

Returns:

a dictified description of the requirement that could be resolved.

manager_requirements(trans: ProvidesAppContext, **kwds)[source]

GET /api/dependency_resolvers/requirements

Find all “simple” requirements that could be resolved “exactly” by all dependency resolvers that support this operation.

Parameters:

index (int) – index of the dependency resolver

Return type:

dict

Returns:

a dictified description of the requirement that could be resolved (keyed on ‘requirement’) and the index of the corresponding resolver (keyed on ‘index’).

clean(trans: ProvidesAppContext, id=None, **kwds)[source]

POST /api/dependency_resolvers/{index}/clean

Cleans up intermediate files created by resolvers during the dependency installation.

Parameters:

index (int) – index of the dependency resolver

Return type:

dict

Returns:

a dictified description of the requirement that could be resolved (keyed on ‘requirement’) and the index of the corresponding resolver (keyed on ‘index’).

summarize_toolbox(trans: 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:

list

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:

list

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

galaxy.webapps.galaxy.api.tool_shed_repositories.get_message_for_no_shed_tool_config()[source]
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

reset_metadata_on_selected_installed_repositories(trans, **kwd)[source]
reset_metadata_on_installed_repositories(trans, payload, **kwd)[source]

PUT /api/tool_shed_repositories/reset_metadata_on_installed_repositories

Resets all metadata on all repositories installed into Galaxy in an “orderly fashion”.

Parameters:

key – the API key of the Galaxy admin user.

class galaxy.webapps.galaxy.api.tool_shed_repositories.FastAPIToolShedRepositories(*, service: ToolShedRepositoriesService = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

service: ToolShedRepositoriesService = GalaxyTypeDepends(_do_resolve)
index(*, name: str | None = Query(None), owner: str | None = Query(None), changeset: str | None = Query(None), deleted: bool | None = Query(None), uninstalled: bool | None = Query(None)) List[InstalledToolShedRepository][source]
check_for_updates(*, id: int[int] | None = None) CheckForUpdatesResponse[source]
show(*, id: int[int]) InstalledToolShedRepository[source]
__init__(*args: Any, **kwargs: Any) None

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: int | None = None, tags: ~typing.List[str | ~enum.Enum] | None = None, dependencies: ~typing.Sequence[~fastapi.params.Depends] | None = None, summary: str | None = None, description: str | None = None, response_description: str = 'Successful Response', responses: ~typing.Dict[int | str, ~typing.Dict[str, ~typing.Any]] | None = None, deprecated: bool | None = None, name: str | None = None, methods: ~typing.Set[str] | ~typing.List[str] | None = None, operation_id: str | None = None, response_model_include: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = None, response_model_exclude: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = 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.Type[~starlette.responses.Response] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Any | None = None, callbacks: ~typing.List[~starlette.routing.BaseRoute] | None = None, openapi_extra: ~typing.Dict[str, ~typing.Any] | None = None, generate_unique_id_function: ~typing.Callable[[~fastapi.routing.APIRoute], str] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>)[source]

Bases: APIContentTypeRoute

match_content_type: str = 'multipart/form-data'
methods: Set[str]
secure_cloned_response_field: ModelField | None
response_fields: Dict[int | str, 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: int | None = None, tags: ~typing.List[str | ~enum.Enum] | None = None, dependencies: ~typing.Sequence[~fastapi.params.Depends] | None = None, summary: str | None = None, description: str | None = None, response_description: str = 'Successful Response', responses: ~typing.Dict[int | str, ~typing.Dict[str, ~typing.Any]] | None = None, deprecated: bool | None = None, name: str | None = None, methods: ~typing.Set[str] | ~typing.List[str] | None = None, operation_id: str | None = None, response_model_include: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = None, response_model_exclude: ~typing.Set[int] | ~typing.Set[str] | ~typing.Dict[int, ~typing.Any] | ~typing.Dict[str, ~typing.Any] | None = 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.Type[~starlette.responses.Response] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>, dependency_overrides_provider: ~typing.Any | None = None, callbacks: ~typing.List[~starlette.routing.BaseRoute] | None = None, openapi_extra: ~typing.Dict[str, ~typing.Any] | None = None, generate_unique_id_function: ~typing.Callable[[~fastapi.routing.APIRoute], str] | ~fastapi.datastructures.DefaultPlaceholder = <fastapi.datastructures.DefaultPlaceholder object>)[source]

Bases: APIContentTypeRoute

match_content_type: str = 'application/json'
methods: Set[str]
secure_cloned_response_field: ModelField | None
response_fields: Dict[int | str, ModelField]
async galaxy.webapps.galaxy.api.tools.get_files(request: Request, files: List[UploadFile] | None = None)[source]
class galaxy.webapps.galaxy.api.tools.FetchTools(*, service: ToolsService = GalaxyTypeDepends(_do_resolve))[source]

Bases: object

service: ToolsService = GalaxyTypeDepends(_do_resolve)
fetch_json(*, payload: FetchDataPayload = Body(PydanticUndefined), trans: ProvidesHistoryContext = Depends(get_trans))[source]
fetch_form(*, payload: FetchDataFormPayload = Depends(_as_form), trans: ProvidesHistoryContext = Depends(get_trans), files: List[UploadFile] = Depends(get_files))[source]
__init__(*args: Any, **kwargs: Any) None
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

panel_views(trans: GalaxyWebTransaction, **kwds)[source]

GET /api/tool_panels returns a dictionary of available tool panel views and default view

panel_view(trans: GalaxyWebTransaction, view, **kwds)[source]

GET /api/tool_panels/{view}

returns a dictionary of tools and tool sections for the given view

Parameters:

trackster – if true, only tools that are compatible with Trackster are returned

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) List[ToolTestDescriptionDict][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.

index(trans, **kwd)[source]

GET /api/tool_shed Interact with the Toolshed registry of this instance.

request(trans, **params)[source]

GET /api/tool_shed/request

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)
index() TourList[source]

Return list of available tours.

show(*, tour_id: str) TourDetails[source]

Return a tour definition.

update_tour(*, tour_id: str) TourDetails[source]

Return a tour definition.

__init__(*args: Any, **kwargs: Any) None

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.

get_servers(trans, *args, **kwd)[source]
get_tool(trans, *args, **kwd)[source]
get_versions(trans, *args, **kwd)[source]
get_version(trans, *args, **kwd)[source]

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
hooks(trans, **kwds)[source]

Exposed as POST /api/upload/hooks and /api/upload/resumable_upload

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.

recalculate_disk_usage_by_user_id(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]
index_deleted(*, trans: ProvidesUserContext = Depends(get_trans), f_email: str | None = Query(None), f_name: str | None = Query(None), f_any: str | None = Query(None)) List[UserModel | LimitedUserModel][source]
undelete(*, user_id: int[int], trans: ProvidesHistoryContext = Depends(get_trans)) DetailedUserModel[source]
show_deleted(*, user_id: int[int], trans: ProvidesHistoryContext = Depends(get_trans)) DetailedUserModel | AnonUserModel[source]
get_or_create_api_key(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans)) str[source]
get_api_key(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]
create_api_key(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans)) str[source]
delete_api_key(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]
usage(*, trans: ProvidesUserContext = Depends(get_trans), user_id: int[int] | typing_extensions.Literal[current] = Path(PydanticUndefined)) List[UserQuotaUsage][source]
objectstore_usage(*, trans: ProvidesUserContext = Depends(get_trans), user_id: int[int] | typing_extensions.Literal[current] = Path(PydanticUndefined)) List[UserObjectstoreUsage][source]
usage_for(*, trans: ProvidesUserContext = Depends(get_trans), user_id: int[int] | typing_extensions.Literal[current] = Path(PydanticUndefined), label: str = Path(PydanticUndefined)) UserQuotaUsage | None[source]
get_beacon(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans)) UserBeaconSetting[source]

Warning: This endpoint is experimental and might change or disappear in future versions.

set_beacon(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: UserBeaconSetting = Body(PydanticUndefined)) UserBeaconSetting[source]

Warning: This endpoint is experimental and might change or disappear in future versions.

remove_favorite(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans), object_type: FavoriteObjectType = Path(PydanticUndefined), object_id: str = Path(PydanticUndefined)) FavoriteObjectsSummary[source]
set_favorite(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans), object_type: FavoriteObjectType = Path(PydanticUndefined), payload: FavoriteObject = Body(PydanticUndefined)) FavoriteObjectsSummary[source]
set_theme(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans), theme: str = Path(PydanticUndefined)) str[source]
add_custom_builds(*, user_id: int[int], key: str = Path(PydanticUndefined), trans: ProvidesUserContext = Depends(get_trans), payload: CustomBuildCreationPayload = Body(PydanticUndefined)) Any[source]
get_custom_builds(*, user_id: int[int], trans: ProvidesHistoryContext = Depends(get_trans)) CustomBuildsCollection[source]
delete_custom_builds(*, user_id: int[int], key: str = Path(PydanticUndefined), trans: ProvidesUserContext = Depends(get_trans)) DeletedCustomBuild[source]
create(*, trans: ProvidesUserContext = Depends(get_trans), payload: UserCreationPayload | RemoteUserCreationPayload = Body(PydanticUndefined)) CreatedUserModel[source]
index(*, trans: ProvidesUserContext = Depends(get_trans), deleted: bool = Query(False), f_email: str | None = Query(None), f_name: str | None = Query(None), f_any: str | None = Query(None)) List[UserModel | LimitedUserModel][source]
show(*, trans: ProvidesHistoryContext = Depends(get_trans), user_id: int[int] | typing_extensions.Literal[current] = Path(PydanticUndefined), deleted: bool | None = Query(None)) DetailedUserModel | AnonUserModel[source]
update(*, trans: ProvidesUserContext = Depends(get_trans), user_id: int[int] | typing_extensions.Literal[current] = Path(PydanticUndefined), payload: UserUpdatePayload = Body(PydanticUndefined), deleted: bool | None = Query(None)) DetailedUserModel[source]
delete(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans), purge: bool[bool] = False, payload: UserDeletionPayload | None = None) DetailedUserModel[source]
send_activation_email(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans))[source]
get_user_roles(*, user_id: int[int], trans: ProvidesUserContext = Depends(get_trans)) RoleListResponse[source]
__init__(*args: Any, **kwargs: Any) None
class galaxy.webapps.galaxy.api.users.UserAPIController(app: StructuredApp)[source]

Bases: BaseGalaxyAPIController, UsesTagsMixin, BaseUIController, UsesFormDefinitionsMixin

service: UsersService = GalaxyTypeDepends(_do_resolve)
user_manager: UserManager = GalaxyTypeDepends(_do_resolve)
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.

Parameters:
  • id (str) – the encoded id of the user

  • payload (dict) – data with new settings

get_password(trans, id, payload=None, **kwd)[source]

Return available password inputs.

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.

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)
index(*, response: Response, trans: ProvidesUserContext = Depends(get_trans), deleted: bool = Query(False), limit: int | None = Query(None), offset: int | None = Query(0), user_id: int[int] | None = Query(None), show_own: bool = Query(True), show_published: bool = Query(True), show_shared: bool = Query(False), sort_by: typing_extensions.Literal[create_time, title, update_time, username] = Query(update_time), sort_desc: bool = Query(True), search: str | None = Query(None)) VisualizationSummaryList[source]
sharing(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) SharingStatus[source]

Return the sharing status of the item.

Makes this item accessible by a URL link and return the current sharing status.

Makes this item inaccessible by a URL link and return the current sharing status.

publish(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) SharingStatus[source]

Makes this item publicly available by a URL link and return the current sharing status.

unpublish(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) SharingStatus[source]

Removes this item from the published list and return the current sharing status.

share_with_users(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: ShareWithPayload = Body(PydanticUndefined)) ShareWithStatus[source]

Shares this item with specific users and return the current sharing status.

set_slug(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans), payload: SetSlugPayload = Body(PydanticUndefined))[source]

Sets a new slug to access this item by URL. The new slug must be unique.

show(*, id: int[int], trans: ProvidesUserContext = Depends(get_trans)) VisualizationShowResponse[source]

Return the visualization.

create(*, payload: VisualizationCreatePayload = Body(PydanticUndefined), import_id: int[int] | None = Query(None), trans: ProvidesUserContext = Depends(get_trans)) VisualizationCreateResponse[source]

Creates a new visualization using the given payload and does not require the import_id field. If import_id given, it imports a copy of an existing visualization into the user’s workspace and does not require the rest of the payload.

update(*, id: int[int], payload: VisualizationUpdatePayload = Body(PydanticUndefined), trans: ProvidesUserContext = Depends(get_trans)) VisualizationUpdateResponse | None[source]
__init__(*args: Any, **kwargs: Any) None

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.

webhook_data(trans: Any, webhook_id, **kwd)[source]

GET /api/webhooks/{webhook_id}/data/{params}

Return the result of executing helper function.

galaxy.webapps.galaxy.api.workflows module