Warning
This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.webapps.galaxy.services package¶
Submodules¶
galaxy.webapps.galaxy.services.base module¶
- class galaxy.webapps.galaxy.services.base.ServiceBase(security: galaxy.security.idencoding.IdEncodingHelper)[source]¶
Bases:
object
Base class with common logic and utils reused by other services.
- A service class:
Provides top level operations (Index, Show, Delete…) that are usually consumed directly by the API controllers or other services.
Uses a combination of managers to perform the operations and avoids accessing the database layer directly.
Can speak ‘pydantic’ and has rich type annotations to be explicit about the required parameters and outputs of each operation.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper)[source]¶
- decode_id(id: galaxy.schema.fields.EncodedDatabaseIdField) int [source]¶
Decodes a previously encoded database ID.
- encode_id(id: int) galaxy.schema.fields.EncodedDatabaseIdField [source]¶
Encodes a raw database ID.
- decode_ids(ids: List[galaxy.schema.fields.EncodedDatabaseIdField]) List[int] [source]¶
Decodes all encoded IDs in the given list.
- encode_all_ids(rval, recursive: bool = False)[source]¶
Encodes all integer values in the dict rval whose keys are ‘id’ or end with ‘_id’
It might be useful to turn this in to a decorator
- build_order_by(manager: galaxy.managers.base.SortableManager, order_by_query: Optional[str] = None)[source]¶
Returns an ORM compatible order_by clause using the order attribute and the given manager.
The manager has to implement the parse_order_by function to support all the sortable model attributes.
- get_class(class_name)[source]¶
Returns the class object that a string denotes. Without this method, we’d have to do eval(<class_name>).
- get_object(trans, id, class_name, check_ownership=False, check_accessible=False, deleted=None)[source]¶
Convenience method to get a model object with the specified checks.
- check_user_is_authenticated(trans: galaxy.managers.context.ProvidesUserContext)[source]¶
Raises an exception if the request is anonymous.
- get_authenticated_user(trans: galaxy.managers.context.ProvidesUserContext) galaxy.model.User [source]¶
Gets the authenticated user and prevents access from anonymous users.
galaxy.webapps.galaxy.services.dataset_collections module¶
- class galaxy.webapps.galaxy.services.dataset_collections.UpdateCollectionAttributePayload(*, dbkey: str)[source]¶
Bases:
pydantic.main.BaseModel
Contains attributes that can be updated for all elements in a dataset collection.
- class galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionAttributesResult(*, dbkey: str, extension: str, model_class: str = 'HistoryDatasetCollectionAssociation', dbkeys: Set[str] = None, extensions: Set[str] = None, tags: galaxy.schema.schema.TagCollection)[source]¶
Bases:
pydantic.main.BaseModel
- class galaxy.webapps.galaxy.services.dataset_collections.SuitableConverter(*, tool_id: str, name: str, target_type: str, original_type: str)[source]¶
Bases:
pydantic.main.BaseModel
- class galaxy.webapps.galaxy.services.dataset_collections.SuitableConverters(*, __root__: List[galaxy.webapps.galaxy.services.dataset_collections.SuitableConverter])[source]¶
Bases:
pydantic.main.BaseModel
Collection of converters that can be used on a particular dataset collection.
- class galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionContentElements(*, __root__: List[galaxy.schema.schema.DCESummary])[source]¶
Bases:
pydantic.main.BaseModel
Represents a collection of elements contained in the dataset collection.
- class galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionsService(security: galaxy.security.idencoding.IdEncodingHelper, history_manager: galaxy.managers.histories.HistoryManager, hdca_manager: galaxy.managers.hdcas.HDCAManager, collection_manager: galaxy.managers.collections.DatasetCollectionManager, datatypes_registry: galaxy.datatypes.registry.Registry)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
,galaxy.webapps.base.controller.UsesLibraryMixinItems
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, history_manager: galaxy.managers.histories.HistoryManager, hdca_manager: galaxy.managers.hdcas.HDCAManager, collection_manager: galaxy.managers.collections.DatasetCollectionManager, datatypes_registry: galaxy.datatypes.registry.Registry)[source]¶
- create(trans: galaxy.managers.context.ProvidesHistoryContext, payload: galaxy.schema.schema.CreateNewCollectionPayload) galaxy.schema.schema.HDCADetailed [source]¶
Create a new dataset collection instance.
- Parameters
payload (dict) – (optional) dictionary structure containing: * collection_type: dataset collection type to create. * instance_type: Instance type - ‘history’ or ‘library’. * name: the new dataset collections’s name * datasets: object describing datasets for collection
- Return type
- Returns
element view of new dataset collection
- copy(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.webapps.galaxy.services.dataset_collections.UpdateCollectionAttributePayload)[source]¶
Iterate over all datasets of a collection and copy datasets with new attributes to a new collection. e.g attributes = {‘dbkey’: ‘dm3’}
- attributes(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = DatasetCollectionInstanceType.history) galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionAttributesResult [source]¶
Returns dbkey/extension for collection elements
- suitable_converters(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = DatasetCollectionInstanceType.history) galaxy.webapps.galaxy.services.dataset_collections.SuitableConverters [source]¶
Returns suitable converters for all datatypes in collection
- show(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = DatasetCollectionInstanceType.history) Union[galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary] [source]¶
Returns information about a particular dataset collection.
- contents(trans: galaxy.managers.context.ProvidesHistoryContext, hdca_id: galaxy.schema.fields.EncodedDatabaseIdField, parent_id: galaxy.schema.fields.EncodedDatabaseIdField, instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = DatasetCollectionInstanceType.history, limit: Optional[int] = None, offset: Optional[int] = None) galaxy.webapps.galaxy.services.dataset_collections.DatasetCollectionContentElements [source]¶
Shows direct child contents of indicated dataset collection parent id
- Parameters
id – HDCA.id
parent_id – parent dataset_collection.id for the dataset contents to be viewed
limit – pagination limit for returned dataset collection elements
offset – pagination offset for returned dataset collection elements
- Return type
- Returns
list of dataset collection elements and contents
galaxy.webapps.galaxy.services.datasets module¶
API operations on the contents of a history dataset.
- class galaxy.webapps.galaxy.services.datasets.RequestDataType(value)[source]¶
-
Particular pieces of information that can be requested for a dataset.
- state = 'state'¶
- converted_datasets_state = 'converted_datasets_state'¶
- data = 'data'¶
- features = 'features'¶
- raw_data = 'raw_data'¶
- track_config = 'track_config'¶
- genome_data = 'genome_data'¶
- in_use_state = 'in_use_state'¶
- class galaxy.webapps.galaxy.services.datasets.DatasetStorageDetails(*, object_store_id: str = None, name: str = None, description: str = None, percent_used: float = None)[source]¶
Bases:
galaxy.schema.schema.Model
- class galaxy.webapps.galaxy.services.datasets.DatasetInheritanceChainEntry(*, name: str, dep: str)[source]¶
Bases:
galaxy.schema.schema.Model
- class galaxy.webapps.galaxy.services.datasets.DatasetInheritanceChain(*, __root__: List[galaxy.webapps.galaxy.services.datasets.DatasetInheritanceChainEntry] = [])[source]¶
Bases:
galaxy.schema.schema.Model
- class galaxy.webapps.galaxy.services.datasets.ExtraFilesEntryClass(value)[source]¶
-
An enumeration.
- Directory = 'Directory'¶
- File = 'File'¶
- class galaxy.webapps.galaxy.services.datasets.ExtraFileEntry(*, class: galaxy.webapps.galaxy.services.datasets.ExtraFilesEntryClass, path: str)[source]¶
Bases:
galaxy.schema.schema.Model
- class galaxy.webapps.galaxy.services.datasets.DatasetTextContentDetails(*, item_data: str = None, truncated: bool, item_url: str)[source]¶
Bases:
galaxy.schema.schema.Model
- class galaxy.webapps.galaxy.services.datasets.ConvertedDatasetsMap(*, __root__: Dict[str, galaxy.schema.fields.EncodedDatabaseIdField])[source]¶
Bases:
pydantic.main.BaseModel
Map of file extension -> converted dataset encoded id
- class galaxy.webapps.galaxy.services.datasets.DataMode(value)[source]¶
-
An enumeration.
- Coverage = 'Coverage'¶
- Auto = 'Auto'¶
- class galaxy.webapps.galaxy.services.datasets.DataResult(*, data: List[Any], dataset_type: str = None, message: str = None, extra_info: Any = None)[source]¶
Bases:
pydantic.main.BaseModel
- data: List[Any]¶
- extra_info: Optional[Any]¶
- class galaxy.webapps.galaxy.services.datasets.BamDataResult(*, data: List[Any], dataset_type: str = None, message: str = None, extra_info: Any = None, max_low: int, max_high: int)[source]¶
- class galaxy.webapps.galaxy.services.datasets.DatasetsService(security: galaxy.security.idencoding.IdEncodingHelper, history_manager: galaxy.managers.histories.HistoryManager, hda_manager: galaxy.managers.hdas.HDAManager, hda_serializer: galaxy.managers.hdas.HDASerializer, hdca_serializer: galaxy.managers.hdcas.HDCASerializer, ldda_manager: galaxy.managers.lddas.LDDAManager, history_contents_manager: galaxy.managers.history_contents.HistoryContentsManager, history_contents_filters: galaxy.managers.history_contents.HistoryContentsFilters, data_provider_registry: galaxy.visualization.data_providers.registry.DataProviderRegistry)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
,galaxy.webapps.base.controller.UsesVisualizationMixin
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, history_manager: galaxy.managers.histories.HistoryManager, hda_manager: galaxy.managers.hdas.HDAManager, hda_serializer: galaxy.managers.hdas.HDASerializer, hdca_serializer: galaxy.managers.hdcas.HDCASerializer, ldda_manager: galaxy.managers.lddas.LDDAManager, history_contents_manager: galaxy.managers.history_contents.HistoryContentsManager, history_contents_filters: galaxy.managers.history_contents.HistoryContentsFilters, data_provider_registry: galaxy.visualization.data_providers.registry.DataProviderRegistry)[source]¶
- property serializer_by_type: Dict[str, galaxy.managers.base.ModelSerializer]¶
- property dataset_manager_by_type: Dict[str, galaxy.managers.datasets.DatasetAssociationManager]¶
- index(trans: galaxy.managers.context.ProvidesHistoryContext, history_id: Optional[galaxy.schema.fields.EncodedDatabaseIdField], serialization_params: galaxy.schema.SerializationParams, filter_query_params: galaxy.schema.FilterQueryParams) List[Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem]] [source]¶
Search datasets or collections using a query system and returns a list containing summary of dataset or dataset_collection information.
- show(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField, hda_ldda: galaxy.schema.schema.DatasetSourceType, serialization_params: galaxy.schema.SerializationParams, data_type: Optional[galaxy.webapps.galaxy.services.datasets.RequestDataType] = None, **extra_params)[source]¶
Displays information about and/or content of a dataset.
- show_storage(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField, hda_ldda: galaxy.schema.schema.DatasetSourceType = DatasetSourceType.hda) galaxy.webapps.galaxy.services.datasets.DatasetStorageDetails [source]¶
Display user-facing storage details related to the objectstore a dataset resides in.
- show_inheritance_chain(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField, hda_ldda: galaxy.schema.schema.DatasetSourceType = DatasetSourceType.hda) galaxy.webapps.galaxy.services.datasets.DatasetInheritanceChain [source]¶
Display inheritance chain for the given dataset.
- update_permissions(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.schema.schema.UpdateDatasetPermissionsPayload, hda_ldda: galaxy.schema.schema.DatasetSourceType = DatasetSourceType.hda) galaxy.schema.schema.DatasetAssociationRoles [source]¶
Updates permissions of a dataset.
- extra_files(trans: galaxy.managers.context.ProvidesHistoryContext, history_content_id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
Generate list of extra files.
- display(trans: galaxy.managers.context.ProvidesHistoryContext, history_content_id: galaxy.schema.fields.EncodedDatabaseIdField, history_id: galaxy.schema.fields.EncodedDatabaseIdField, preview: bool = False, filename: Optional[str] = None, to_ext: Optional[str] = None, raw: bool = False, **kwd)[source]¶
Displays history content (dataset).
The query parameter ‘raw’ should be considered experimental and may be dropped at some point in the future without warning. Generally, data should be processed by its datatype prior to display (the defult if raw is unspecified or explicitly false.
- get_content_as_text(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField) galaxy.webapps.galaxy.services.datasets.DatasetTextContentDetails [source]¶
Returns dataset content as Text.
- get_metadata_file(trans: galaxy.managers.context.ProvidesHistoryContext, history_content_id: galaxy.schema.fields.EncodedDatabaseIdField, metadata_file: Optional[str] = None, open_file: bool = False)[source]¶
Gets the associated metadata file.
The open_file parameter determines if we return the path of the file or the opened file handle. TODO: Remove the open_file parameter when removing the associated legacy endpoint.
- converted_ext(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField, ext: str, serialization_params: galaxy.schema.SerializationParams) Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary] [source]¶
Return information about datasets made by converting this dataset to a new format
- converted(trans: galaxy.managers.context.ProvidesHistoryContext, dataset_id: galaxy.schema.fields.EncodedDatabaseIdField) galaxy.webapps.galaxy.services.datasets.ConvertedDatasetsMap [source]¶
Return a file extension -> converted dataset encoded id map with all the existing converted datasets associated with this instance.
galaxy.webapps.galaxy.services.histories module¶
- class galaxy.webapps.galaxy.services.histories.HistoriesService(security: galaxy.security.idencoding.IdEncodingHelper, manager: galaxy.managers.histories.HistoryManager, user_manager: galaxy.managers.users.UserManager, serializer: galaxy.managers.histories.HistorySerializer, deserializer: galaxy.managers.histories.HistoryDeserializer, citations_manager: galaxy.managers.citations.CitationsManager, history_export_view: galaxy.managers.histories.HistoryExportView, filters: galaxy.managers.histories.HistoryFilters)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Common interface/service logic for interactions with histories in the context of the API.
Provides the logic of the actions invoked by API controllers and uses type definitions and pydantic models to declare its parameters and return types.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, manager: galaxy.managers.histories.HistoryManager, user_manager: galaxy.managers.users.UserManager, serializer: galaxy.managers.histories.HistorySerializer, deserializer: galaxy.managers.histories.HistoryDeserializer, citations_manager: galaxy.managers.citations.CitationsManager, history_export_view: galaxy.managers.histories.HistoryExportView, filters: galaxy.managers.histories.HistoryFilters)[source]¶
- index(trans: galaxy.managers.context.ProvidesHistoryContext, serialization_params: galaxy.schema.SerializationParams, filter_query_params: galaxy.schema.FilterQueryParams, deleted_only: Optional[bool] = False, all_histories: Optional[bool] = False)[source]¶
Return a collection of histories for the current user. Additional filters can be applied.
- Parameters
deleted_only (optional boolean) – if True, show only deleted histories, if False, non-deleted
Note
Anonymous users are allowed to get their current history
- create(trans: galaxy.managers.context.ProvidesHistoryContext, payload: galaxy.schema.schema.CreateHistoryPayload, serialization_params: galaxy.schema.SerializationParams)[source]¶
Create a new history from scratch, by copying an existing one or by importing from URL or File depending on the provided parameters in the payload.
- show(trans: galaxy.managers.context.ProvidesHistoryContext, serialization_params: galaxy.schema.SerializationParams, history_id: Optional[galaxy.schema.fields.EncodedDatabaseIdField] = None)[source]¶
Returns detailed information about the history with the given encoded id. If no id is provided, then the most recently used history will be returned.
- Parameters
id (an optional encoded id string) – the encoded id of the history to query or None to use the most recently used
serialization_params (dictionary) – contains the optional view, keys and default_view for serialization
- Return type
dictionary
- Returns
detailed history information
- update(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, payload, serialization_params: galaxy.schema.SerializationParams)[source]¶
Updates the values for the history with the given
id
- Parameters
id (str) – the encoded id of the history to update
payload (dict) –
a dictionary containing any or all the fields in
galaxy.model.History.to_dict()
and/or the following:annotation: an annotation for the history
serialization_params (dictionary) – contains the optional view, keys and default_view for serialization
- Return type
- Returns
an error object if an error occurred or a dictionary containing any values that were different from the original and, therefore, updated
- delete(trans: galaxy.managers.context.ProvidesHistoryContext, history_id: galaxy.schema.fields.EncodedDatabaseIdField, serialization_params: galaxy.schema.SerializationParams, purge: bool = False)[source]¶
Delete the history with the given
id
Note
Stops all active jobs in the history if purge is set.
You can purge a history, removing all it’s datasets from disk (if unshared), by passing in
purge=True
in the url.- Parameters
serialization_params (dictionary) – contains the optional view, keys and default_view for serialization
- Return type
- Returns
the deleted or purged history
- undelete(trans: galaxy.managers.context.ProvidesHistoryContext, history_id: galaxy.schema.fields.EncodedDatabaseIdField, serialization_params: galaxy.schema.SerializationParams)[source]¶
Undelete history (that hasn’t been purged) with the given
id
Return all histories that are shared with the current user. The results can be filtered.
- published(trans: galaxy.managers.context.ProvidesHistoryContext, serialization_params: galaxy.schema.SerializationParams, filter_query_params: galaxy.schema.FilterQueryParams)[source]¶
Return all histories that are published. The results can be filtered.
- citations(trans: galaxy.managers.context.ProvidesHistoryContext, history_id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
Return all the citations for the tools used to produce the datasets in the history.
- index_exports(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
Get previous history exports (to links). Effectively returns serialized JEHA objects.
- archive_export(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: Optional[galaxy.schema.schema.ExportHistoryArchivePayload] = None) Tuple[Union[galaxy.schema.schema.JobExportHistoryArchiveModel, galaxy.schema.schema.JobIdResponse], bool] [source]¶
start job (if needed) to create history export for corresponding history.
- get_ready_history_export(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, jeha_id: Union[galaxy.schema.fields.EncodedDatabaseIdField, typing_extensions.Literal[latest]]) galaxy.model.JobExportHistoryArchive [source]¶
Returns the exported history archive information if it’s ready or raises an exception if not.
- get_archive_download_path(trans: galaxy.managers.context.ProvidesHistoryContext, jeha: galaxy.model.JobExportHistoryArchive) str [source]¶
If ready and available, return raw contents of exported history using a generator function.
- get_archive_media_type(jeha: galaxy.model.JobExportHistoryArchive)[source]¶
- legacy_archive_download(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField, jeha_id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
If ready and available, return raw contents of exported history.
- get_custom_builds_metadata(trans: galaxy.managers.context.ProvidesHistoryContext, id: galaxy.schema.fields.EncodedDatabaseIdField) galaxy.schema.schema.CustomBuildsMetadataResponse [source]¶
Returns metadata for custom builds.
galaxy.webapps.galaxy.services.history_contents module¶
- class galaxy.webapps.galaxy.services.history_contents.DirectionOptions(value)[source]¶
-
An enumeration.
- near = 'near'¶
- before = 'before'¶
- after = 'after'¶
- class galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexParams(*, v: typing_extensions.Literal[dev] = None, dataset_details: Optional[Union[Set[galaxy.schema.fields.EncodedDatabaseIdField], typing_extensions.Literal[all]]] = None)[source]¶
Bases:
galaxy.schema.schema.Model
Query parameters exclusively used by the new version of index operation.
- v: Optional[typing_extensions.Literal[dev]]¶
- dataset_details: Optional[Union[Set[galaxy.schema.fields.EncodedDatabaseIdField], typing_extensions.Literal[all]]]¶
- class galaxy.webapps.galaxy.services.history_contents.LegacyHistoryContentsIndexParams(*, ids: List[galaxy.schema.fields.EncodedDatabaseIdField] = None, types: List[galaxy.schema.schema.HistoryContentType], dataset_details: Optional[Union[Set[galaxy.schema.fields.EncodedDatabaseIdField], typing_extensions.Literal[all]]] = None, deleted: bool = None, visible: bool = None)[source]¶
Bases:
galaxy.schema.schema.Model
Query parameters exclusively used by the legacy version of index operation.
- ids: Optional[List[galaxy.schema.fields.EncodedDatabaseIdField]]¶
- types: List[galaxy.schema.schema.HistoryContentType]¶
- dataset_details: Optional[Union[Set[galaxy.schema.fields.EncodedDatabaseIdField], typing_extensions.Literal[all]]]¶
- class galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexJobsSummaryParams(*, ids: List[galaxy.schema.fields.EncodedDatabaseIdField] = [], types: List[galaxy.schema.schema.JobSourceType] = [])[source]¶
Bases:
galaxy.schema.schema.Model
Query parameters exclusively used by the index_jobs_summary operation.
- ids: List[galaxy.schema.fields.EncodedDatabaseIdField]¶
- types: List[galaxy.schema.schema.JobSourceType]¶
- class galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayloadBase(*, type: galaxy.schema.schema.HistoryContentType = HistoryContentType.dataset)[source]¶
Bases:
galaxy.schema.schema.Model
- type: Optional[galaxy.schema.schema.HistoryContentType]¶
- class galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayloadFromCopy(*, type: galaxy.schema.schema.HistoryContentType = HistoryContentType.dataset, source: galaxy.schema.schema.HistoryContentSource = None, content: galaxy.schema.fields.EncodedDatabaseIdField = None)[source]¶
Bases:
galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayloadBase
- source: Optional[galaxy.schema.schema.HistoryContentSource]¶
- content: Optional[galaxy.schema.fields.EncodedDatabaseIdField]¶
- class galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayloadFromCollection(*, type: galaxy.schema.schema.HistoryContentType = HistoryContentType.dataset, source: galaxy.schema.schema.HistoryContentSource = None, content: galaxy.schema.fields.EncodedDatabaseIdField = None, dbkey: str = None, copy_elements: bool = False)[source]¶
Bases:
galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayloadFromCopy
- class galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayload(*, collection_type: str = None, element_identifiers: List[galaxy.schema.schema.CollectionElementIdentifier] = None, name: str = None, hide_source_items: bool = False, copy_elements: bool = False, instance_type: galaxy.schema.schema.DatasetCollectionInstanceType = DatasetCollectionInstanceType.history, history_id: galaxy.schema.fields.EncodedDatabaseIdField = None, folder_id: galaxy.schema.fields.EncodedDatabaseIdField = None, type: galaxy.schema.schema.HistoryContentType = HistoryContentType.dataset, source: galaxy.schema.schema.HistoryContentSource = None, content: galaxy.schema.fields.EncodedDatabaseIdField = None, dbkey: str = None, **extra_data: Any)[source]¶
Bases:
galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayloadFromCollection
,galaxy.schema.schema.CreateNewCollectionPayload
- source: Optional[HistoryContentSource]¶
- content: Optional[EncodedDatabaseIdField]¶
- type: Optional[HistoryContentType]¶
- class galaxy.webapps.galaxy.services.history_contents.HistoriesContentsService(security: galaxy.security.idencoding.IdEncodingHelper, history_manager: galaxy.managers.histories.HistoryManager, history_contents_manager: galaxy.managers.history_contents.HistoryContentsManager, hda_manager: galaxy.managers.hdas.HDAManager, dataset_collection_manager: galaxy.managers.collections.DatasetCollectionManager, ldda_manager: galaxy.managers.library_datasets.LibraryDatasetsManager, folder_manager: galaxy.managers.folders.FolderManager, hda_serializer: galaxy.managers.hdas.HDASerializer, hda_deserializer: galaxy.managers.hdas.HDADeserializer, hdca_serializer: galaxy.managers.hdcas.HDCASerializer, history_contents_filters: galaxy.managers.history_contents.HistoryContentsFilters)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Common interface/service logic for interactions with histories contents in the context of the API.
Provides the logic of the actions invoked by API controllers and uses type definitions and pydantic models to declare its parameters and return types.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, history_manager: galaxy.managers.histories.HistoryManager, history_contents_manager: galaxy.managers.history_contents.HistoryContentsManager, hda_manager: galaxy.managers.hdas.HDAManager, dataset_collection_manager: galaxy.managers.collections.DatasetCollectionManager, ldda_manager: galaxy.managers.library_datasets.LibraryDatasetsManager, folder_manager: galaxy.managers.folders.FolderManager, hda_serializer: galaxy.managers.hdas.HDASerializer, hda_deserializer: galaxy.managers.hdas.HDADeserializer, hdca_serializer: galaxy.managers.hdcas.HDCASerializer, history_contents_filters: galaxy.managers.history_contents.HistoryContentsFilters)[source]¶
- index(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, params: galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexParams, legacy_params: galaxy.webapps.galaxy.services.history_contents.LegacyHistoryContentsIndexParams, serialization_params: galaxy.schema.SerializationParams, filter_query_params: galaxy.schema.FilterQueryParams) List[Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem]] [source]¶
Return a list of contents (HDAs and HDCAs) for the history with the given
ID
.Note
Anonymous users are allowed to get their current history contents.
- show(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, serialization_params: galaxy.schema.SerializationParams, contents_type: galaxy.schema.schema.HistoryContentType, fuzzy_count: Optional[int] = None) Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem] [source]¶
Return detailed information about an HDA or HDCA within a history
Note
Anonymous users are allowed to get their current history contents
- Parameters
id – the encoded id of the HDA or HDCA to return
contents_type – ‘dataset’ or ‘dataset_collection’
serialization_params.view – if fetching a dataset collection - the view style of the dataset collection to produce. ‘collection’ returns no element information, ‘element’ returns detailed element information for all datasets, ‘element-reference’ returns a minimal set of information about datasets (for instance id, type, and state but not metadata, peek, info, or name). The default is ‘element’.
fuzzy_count – this value can be used to broadly restrict the magnitude of the number of elements returned via the API for large collections. The number of actual elements returned may be “a bit” more than this number or “a lot” less - varying on the depth of nesting, balance of nesting at each level, and size of target collection. The consumer of this API should not expect a stable number or pre-calculable number of elements to be produced given this parameter - the only promise is that this API will not respond with an order of magnitude more elements estimated with this value. The UI uses this parameter to fetch a “balanced” concept of the “start” of large collections at every depth of the collection.
- Returns
dictionary containing detailed HDA or HDCA information
- index_jobs_summary(trans, params: galaxy.webapps.galaxy.services.history_contents.HistoryContentsIndexJobsSummaryParams) List[Union[galaxy.schema.schema.JobStateSummary, galaxy.schema.schema.ImplicitCollectionJobsStateSummary, galaxy.schema.schema.WorkflowInvocationStateSummary]] [source]¶
Return job state summary info for jobs, implicit groups jobs for collections or workflow invocations
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
- show_jobs_summary(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, contents_type: galaxy.schema.schema.HistoryContentType) Union[galaxy.schema.schema.JobStateSummary, galaxy.schema.schema.ImplicitCollectionJobsStateSummary, galaxy.schema.schema.WorkflowInvocationStateSummary] [source]¶
Return detailed information about an HDA or HDCAs jobs
Warning: We allow anyone to fetch job state information about any object they can guess an encoded ID for - it isn’t considered protected data. This keeps polling IDs as part of state calculation for large histories and collections as efficient as possible.
- Parameters
id – the encoded id of the HDA or HDCA to return
contents_type – ‘dataset’ or ‘dataset_collection’
- Returns
dictionary containing jobs summary object
- get_dataset_collection_archive_for_download(trans, id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
Download the content of a HistoryDatasetCollection as a tgz archive while maintaining approximate collection structure.
- Parameters
id – encoded HistoryDatasetCollectionAssociation (HDCA) id
- create(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.webapps.galaxy.services.history_contents.CreateHistoryContentPayload, serialization_params: galaxy.schema.SerializationParams) Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem, List[Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem]]] [source]¶
Create a new HDA or HDCA.
- ..note:
Currently, a user can only copy an HDA from a history that the user owns.
- update_permissions(trans, history_content_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.schema.schema.UpdateDatasetPermissionsPayload) galaxy.schema.schema.DatasetAssociationRoles [source]¶
Set permissions of the given dataset to the given role ids.
- Parameters
payload (dict) –
dictionary structure containing:
action: (required) describes what action should be performed. Available actions: make_private, remove_restrictions, set_permissions
access_ids[]: list of Role.id defining roles that should have access permission on the dataset
manage_ids[]: list of Role.id defining roles that should have manage permission on the dataset
modify_ids[]: list of Role.id defining roles that should have modify permission on the library dataset item
- Raises
RequestParameterInvalidException, ObjectNotFound, InsufficientPermissionsException, InternalServerError RequestParameterMissingException
- update(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: Dict[str, Any], serialization_params: galaxy.schema.SerializationParams, contents_type: galaxy.schema.schema.HistoryContentType)[source]¶
Updates the values for the history content item with the given
id
- Parameters
history_id – encoded id string of the items’s History
id – the encoded id of the history item to update
payload – a dictionary containing any or all the fields for HDA or HDCA with values different than the defaults
- Returns
an error object if an error occurred or a dictionary containing any values that were different from the original and, therefore, updated
- update_batch(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.schema.schema.UpdateHistoryContentsBatchPayload, serialization_params: galaxy.schema.SerializationParams) List[Union[galaxy.schema.schema.HDABeta, galaxy.schema.schema.HDADetailed, galaxy.schema.schema.HDASummary, galaxy.schema.schema.HDCABeta, galaxy.schema.schema.HDCADetailed, galaxy.schema.schema.HDCASummary, galaxy.schema.schema.CustomHistoryItem]] [source]¶
PUT /api/histories/{history_id}/contents
- Parameters
- Return type
- Returns
an error object if an error occurred or a dictionary containing any values that were different from the original and, therefore, updated
- validate(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, history_content_id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
Validates the metadata associated with a dataset within a History.
- delete(trans, id, serialization_params: galaxy.schema.SerializationParams, contents_type: galaxy.schema.schema.HistoryContentType, payload: galaxy.schema.schema.DeleteHistoryContentPayload) galaxy.schema.schema.DeleteHistoryContentResult [source]¶
Delete the history content with the given
id
and specified type (defaults to dataset)Note
Currently does not stop any active jobs for which this dataset is an output.
- archive(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, filter_query_params: galaxy.schema.FilterQueryParams, filename: Optional[str] = '', dry_run: Optional[bool] = True) Union[galaxy.schema.schema.HistoryContentsArchiveDryRunResult, galaxy.util.zipstream.ZipstreamWrapper] [source]¶
Build and return a compressed archive of the selected history contents
- Parameters
filename (string) – (optional) archive name (defaults to history name)
dry_run (boolean) – (optional) if True, return the archive and file paths only as json and not an archive file
- Returns
archive file for download or json in dry run mode
- contents_near(trans, history_id: galaxy.schema.fields.EncodedDatabaseIdField, serialization_params: galaxy.schema.SerializationParams, filter_params: List[List[Any]], direction: galaxy.webapps.galaxy.services.history_contents.DirectionOptions, hid: int, limit: int, since: Optional[datetime.datetime] = None) Optional[galaxy.schema.schema.ContentsNearResult] [source]¶
Return {limit} history items “near” the {hid}. The {direction} determines what items are selected:
before: select items with hid < {hid}
after: select items with hid > {hid}
near: select items “around” {hid}, so that n. items before <= limit // 2, n. items after <= limit // 2 + 1
Additional counts provided in the HTTP headers.
galaxy.webapps.galaxy.services.libraries module¶
- class galaxy.webapps.galaxy.services.libraries.LibrariesService(security: galaxy.security.idencoding.IdEncodingHelper, folder_manager: galaxy.managers.folders.FolderManager, library_manager: galaxy.managers.libraries.LibraryManager, role_manager: galaxy.managers.roles.RoleManager)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Common interface/service logic for interactions with libraries (top level) in the context of the API.
Provides the logic of the actions invoked by API controllers and uses type definitions and pydantic models to declare its parameters and return types.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, folder_manager: galaxy.managers.folders.FolderManager, library_manager: galaxy.managers.libraries.LibraryManager, role_manager: galaxy.managers.roles.RoleManager)[source]¶
- index(trans: galaxy.managers.context.ProvidesAppContext, deleted: Optional[bool] = False) galaxy.schema.schema.LibrarySummaryList [source]¶
Returns a list of summary data for all libraries.
- Parameters
deleted (boolean (optional)) – if True, show only
deleted
libraries, if False show onlynon-deleted
- Returns
list of dictionaries containing library information
- Return type
- show(trans, id: galaxy.schema.fields.EncodedDatabaseIdField) galaxy.schema.schema.LibrarySummary [source]¶
Returns detailed information about a library.
- Parameters
id (an encoded id string) – the encoded id of the library
deleted (boolean) – if True, allow information on a
deleted
library
- Returns
detailed library information
- Return type
- Raises
MalformedId, ObjectNotFound
- create(trans, payload: galaxy.schema.schema.CreateLibraryPayload) galaxy.schema.schema.LibrarySummary [source]¶
Creates a new library.
Note
Currently, only admin users can create libraries.
- Parameters
payload (dict) – dictionary structure containing:: :param name: (required) the new library’s name :type name: str :param description: the new library’s description :type description: str :param synopsis: the new library’s synopsis :type synopsis: str
- Returns
detailed library information
- Return type
- Raises
RequestParameterMissingException
- update(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.schema.schema.UpdateLibraryPayload) galaxy.schema.schema.LibrarySummary [source]¶
Updates the library defined by an
encoded_id
with the data in the payload.Note
Currently, only admin users can update libraries. Also the library must not be deleted.
- param id
the encoded id of the library
- type id
an encoded id string
- param payload
dictionary structure containing:: :param name: new library’s name, cannot be empty :type name: str :param description: new library’s description :type description: str :param synopsis: new library’s synopsis :type synopsis: str
- type payload
dict
- returns
detailed library information
- rtype
dict
- raises
RequestParameterMissingException
- delete(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, undelete: Optional[bool] = False) galaxy.schema.schema.LibrarySummary [source]¶
Marks the library with the given
id
as deleted (or removes the deleted mark if the undelete param is true)Note
Currently, only admin users can un/delete libraries.
- Parameters
id (an encoded id string) – the encoded id of the library to un/delete
undelete (bool) – (optional) flag specifying whether the item should be deleted or undeleted, defaults to false:
- Returns
detailed library information
- Return type
dictionary
- get_permissions(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, scope: Optional[galaxy.schema.schema.LibraryPermissionScope] = LibraryPermissionScope.current, is_library_access: Optional[bool] = False, page: Optional[int] = 1, page_limit: Optional[int] = 10, query: Optional[str] = None) Union[galaxy.schema.schema.LibraryCurrentPermissions, galaxy.schema.schema.LibraryAvailablePermissions] [source]¶
Load all permissions for the given library id and return it.
- Parameters
id (an encoded id string) – the encoded id of the library
scope (string) – either ‘current’ or ‘available’
is_library_access (bool) – indicates whether the roles available for the library access are requested
- Returns
dictionary with all applicable permissions’ values
- Return type
dictionary
- Raises
InsufficientPermissionsException
- set_permissions(trans, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: Dict[str, Any]) Union[galaxy.schema.schema.LibraryLegacySummary, galaxy.schema.schema.LibraryCurrentPermissions] [source]¶
Set permissions of the given library to the given role ids.
- Parameters
id (an encoded id string) – the encoded id of the library to set the permissions of
payload –
dictionary structure containing:
- param action
(required) describes what action should be performed available actions: remove_restrictions, set_permissions
- type action
str
- param access_ids[]
list of Role.id defining roles that should have access permission on the library
- type access_ids[]
string or list
- param add_ids[]
list of Role.id defining roles that should have add item permission on the library
- type add_ids[]
string or list
- param manage_ids[]
list of Role.id defining roles that should have manage permission on the library
- type manage_ids[]
string or list
- param modify_ids[]
list of Role.id defining roles that should have modify permission on the library
- type modify_ids[]
string or list
- Type
dictionary
- Returns
dict of current roles for all available permission types
- Return type
dictionary
- Raises
RequestParameterInvalidException, InsufficientPermissionsException, InternalServerError RequestParameterMissingException
- set_permissions_old(trans, library, payload) galaxy.schema.schema.LibraryLegacySummary [source]¶
* old implementation for backward compatibility *
Updates the library permissions.
galaxy.webapps.galaxy.services.library_folder_contents module¶
- class galaxy.webapps.galaxy.services.library_folder_contents.LibraryFolderContentsService(security: galaxy.security.idencoding.IdEncodingHelper, hda_manager: galaxy.managers.hdas.HDAManager, folder_manager: galaxy.managers.folders.FolderManager)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
,galaxy.webapps.base.controller.UsesLibraryMixinItems
Interface/service shared by controllers for interacting with the contents of a library folder.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, hda_manager: galaxy.managers.hdas.HDAManager, folder_manager: galaxy.managers.folders.FolderManager)[source]¶
- get_object(trans, id, class_name, check_ownership=False, check_accessible=False, deleted=None)[source]¶
Convenience method to get a model object with the specified checks.
- index(trans, folder_id, limit=None, offset=None, search_text=None, include_deleted=False)[source]¶
Displays a collection (list) of a folder’s contents (files and folders). Encoded folder ID is prepended with ‘F’ if it is a folder as opposed to a data set which does not have it. Full path is provided in response as a separate object providing data for breadcrumb path building.
- ..example:
- limit and offset can be combined. Skip the first two and return five:
‘?offset=2&limit=5’
- Parameters
folder_id (encoded string) – encoded ID of the folder which contents should be library_dataset_dict
offset (optional int) – number of folder contents to skip
limit (optional int) – maximum number of folder contents to return
include_deleted (optional bool (default False)) – whether to include deleted items in the results
- Returns
dictionary containing all items and metadata
- Type
- Raises
MalformedId, InconsistentDatabase, ObjectNotFound, InternalServerError
- create(trans, encoded_folder_id, payload, **kwd)[source]¶
Create a new library file from an HDA.
- Parameters
encoded_folder_id (an encoded id string) – the encoded id of the folder to import dataset(s) to
payload (dict) – dictionary structure containing: :param from_hda_id: (optional) the id of an accessible HDA to copy into the library :type from_hda_id: encoded id :param from_hdca_id: (optional) the id of an accessible HDCA to copy into the library :type from_hdca_id: encoded id :param ldda_message: (optional) the new message attribute of the LDDA created :type ldda_message: str :param extended_metadata: (optional) dub-dictionary containing any extended metadata to associate with the item :type extended_metadata: dict
- Returns
a dictionary describing the new item if
from_hda_id
is supplied or a list of such dictionaries describing the new items iffrom_hdca_id
is supplied.- Return type
- Raises
ObjectAttributeInvalidException, InsufficientPermissionsException, ItemAccessibilityException, InternalServerError
galaxy.webapps.galaxy.services.library_folders module¶
- class galaxy.webapps.galaxy.services.library_folders.LibraryFoldersService(security: galaxy.security.idencoding.IdEncodingHelper, folder_manager: galaxy.managers.folders.FolderManager, role_manager: galaxy.managers.roles.RoleManager)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Common interface/service logic for interactions with library folders in the context of the API. Provides the logic of the actions invoked by API controllers and uses type definitions and pydantic models to declare its parameters and return types.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, folder_manager: galaxy.managers.folders.FolderManager, role_manager: galaxy.managers.roles.RoleManager)[source]¶
- show(trans, id: galaxy.schema.fields.EncodedDatabaseIdField) galaxy.schema.schema.LibraryFolderDetails [source]¶
Displays information about a folder.
- Parameters
id (an encoded id string (has to be prefixed by 'F')) – the folder’s encoded id (required)
- Returns
dictionary including details of the folder
- Return type
- create(trans, encoded_parent_folder_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.schema.schema.CreateLibraryFolderPayload) galaxy.schema.schema.LibraryFolderDetails [source]¶
Create a new folder object underneath the one specified in the parameters.
- Parameters
encoded_parent_folder_id (an encoded id string (should be prefixed by 'F')) – (required) the parent folder’s id
payload –
dictionary structure containing:
- param name
(required) the name of the new folder
- type name
str
- param description
the description of the new folder
- type description
str
:type dictionary :returns: information about newly created folder, notably including ID :rtype: dictionary :raises: RequestParameterMissingException
- get_permissions(trans, encoded_folder_id: galaxy.schema.fields.EncodedDatabaseIdField, scope: Optional[galaxy.schema.schema.LibraryPermissionScope] = LibraryPermissionScope.current, page: Optional[int] = 1, page_limit: Optional[int] = 10, query: Optional[str] = None) Union[galaxy.schema.schema.LibraryFolderCurrentPermissions, galaxy.schema.schema.LibraryAvailablePermissions] [source]¶
Load all permissions for the given folder id and return it.
- Parameters
encoded_folder_id (an encoded id string) – the encoded id of the folder
scope (string) – either ‘current’ or ‘available’
- Returns
dictionary with all applicable permissions’ values
- Return type
dictionary
- Raises
InsufficientPermissionsException
- set_permissions(trans, encoded_folder_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: dict) galaxy.schema.schema.LibraryFolderCurrentPermissions [source]¶
Set permissions of the given folder to the given role ids.
- Parameters
encoded_folder_id (an encoded id string) – the encoded id of the folder to set the permissions of
payload –
dictionary structure containing:
- param action
(required) describes what action should be performed
- type action
string
- param add_ids[]
list of Role.id defining roles that should have add item permission on the folder
- type add_ids[]
string or list
- param manage_ids[]
list of Role.id defining roles that should have manage permission on the folder
- type manage_ids[]
string or list
- param modify_ids[]
list of Role.id defining roles that should have modify permission on the folder
- type modify_ids[]
string or list
:type dictionary :returns: dict of current roles for all available permission types. :rtype: dictionary :raises: RequestParameterInvalidException, InsufficientPermissionsException, RequestParameterMissingException
- delete(trans, encoded_folder_id: galaxy.schema.fields.EncodedDatabaseIdField, undelete: Optional[bool] = False) galaxy.schema.schema.LibraryFolderDetails [source]¶
DELETE /api/folders/{encoded_folder_id}
Mark the folder with the given
encoded_folder_id
as deleted (or remove the deleted mark if the undelete param is true).Note
Currently, only admin users can un/delete folders.
- Parameters
encoded_folder_id (an encoded id string) – the encoded id of the folder to un/delete
undelete (bool) – (optional) flag specifying whether the item should be deleted or undeleted, defaults to false:
- Returns
detailed folder information
- Return type
dictionary
- update(trans, encoded_folder_id: galaxy.schema.fields.EncodedDatabaseIdField, payload: galaxy.schema.schema.UpdateLibraryFolderPayload) galaxy.schema.schema.LibraryFolderDetails [source]¶
Update the folder defined by an
encoded_folder_id
with the data in the payload.Note
Currently, only admin users can update library folders. Also the folder must not be deleted.
- param id
the encoded id of the folder
- type id
an encoded id string
- param payload
(required) dictionary structure containing:: ‘name’: new folder’s name, cannot be empty ‘description’: new folder’s description
- type payload
dict
- returns
detailed folder information
- rtype
dict
- raises
RequestParameterMissingException
galaxy.webapps.galaxy.services.pages module¶
- class galaxy.webapps.galaxy.services.pages.PagesService(security: galaxy.security.idencoding.IdEncodingHelper, manager: galaxy.managers.pages.PageManager, serializer: galaxy.managers.pages.PageSerializer)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Common interface/service logic for interactions with pages in the context of the API.
Provides the logic of the actions invoked by API controllers and uses type definitions and pydantic models to declare its parameters and return types.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, manager: galaxy.managers.pages.PageManager, serializer: galaxy.managers.pages.PageSerializer)[source]¶
- index(trans, deleted: bool = False) galaxy.schema.schema.PageSummaryList [source]¶
Return a list of Pages viewable by the user
- Parameters
deleted – Display deleted pages
- Return type
- Returns
dictionaries containing summary or detailed Page information
- create(trans, payload: galaxy.schema.schema.CreatePagePayload) galaxy.schema.schema.PageSummary [source]¶
Create a page and return Page summary
- delete(trans, id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
Deletes a page (or marks it as deleted)
- show(trans, id: galaxy.schema.fields.EncodedDatabaseIdField) galaxy.schema.schema.PageDetails [source]¶
View a page summary and the content of the latest revision
- Parameters
id – ID of page to be displayed
- Return type
- Returns
Dictionary return of the Page.to_dict call with the ‘content’ field populated by the most recent revision
- show_pdf(trans, id: galaxy.schema.fields.EncodedDatabaseIdField)[source]¶
View a page summary and the content of the latest revision as PDF.
- Parameters
id – ID of page to be displayed
- Return type
- Returns
Dictionary return of the Page.to_dict call with the ‘content’ field populated by the most recent revision
galaxy.webapps.galaxy.services.quotas module¶
- class galaxy.webapps.galaxy.services.quotas.QuotasService(security: galaxy.security.idencoding.IdEncodingHelper, quota_manager: galaxy.managers.quotas.QuotaManager)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Interface/service object shared by controllers for interacting with quotas.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, quota_manager: galaxy.managers.quotas.QuotaManager)[source]¶
- index(trans: galaxy.managers.context.ProvidesUserContext, deleted: bool = False) galaxy.quota._schema.QuotaSummaryList [source]¶
Displays a collection (list) of quotas.
- show(trans: galaxy.managers.context.ProvidesUserContext, id: galaxy.schema.fields.EncodedDatabaseIdField, deleted: bool = False) galaxy.quota._schema.QuotaDetails [source]¶
Displays information about a quota.
- create(trans: galaxy.managers.context.ProvidesUserContext, params: galaxy.quota._schema.CreateQuotaParams) galaxy.quota._schema.CreateQuotaResult [source]¶
Creates a new quota.
- update(trans: galaxy.managers.context.ProvidesUserContext, id: galaxy.schema.fields.EncodedDatabaseIdField, params: galaxy.quota._schema.UpdateQuotaParams) str [source]¶
Modifies a quota.
- delete(trans: galaxy.managers.context.ProvidesUserContext, id: galaxy.schema.fields.EncodedDatabaseIdField, payload: Optional[galaxy.quota._schema.DeleteQuotaPayload] = None) str [source]¶
Marks a quota as deleted.
- undelete(trans: galaxy.managers.context.ProvidesUserContext, id: galaxy.schema.fields.EncodedDatabaseIdField) str [source]¶
Restores a previously deleted quota.
galaxy.webapps.galaxy.services.sharable module¶
Bases:
object
Provides the common logic used by the API to share any kind of resource with other users.
The Manager class of the particular resource must implement the SharableModelManager and have a compatible SharableModelSerializer implementation.
Gets the current sharing status of the item with the given id.
Makes this item accessible by link. If this item contains other elements they will be publicly accessible too.
Makes this item publicly accessible. If this item contains other elements they will be publicly accessible too.
galaxy.webapps.galaxy.services.visualizations module¶
- class galaxy.webapps.galaxy.services.visualizations.VisualizationsService(security: galaxy.security.idencoding.IdEncodingHelper, manager: galaxy.managers.visualizations.VisualizationManager, serializer: galaxy.managers.visualizations.VisualizationSerializer)[source]¶
Bases:
galaxy.webapps.galaxy.services.base.ServiceBase
Common interface/service logic for interactions with visualizations in the context of the API.
Provides the logic of the actions invoked by API controllers and uses type definitions and pydantic models to declare its parameters and return types.
- __init__(security: galaxy.security.idencoding.IdEncodingHelper, manager: galaxy.managers.visualizations.VisualizationManager, serializer: galaxy.managers.visualizations.VisualizationSerializer)[source]¶