flowserv.service.group.remote module

Implementation of the group API component that provides access to workflow user groups via a RESTful API.

class flowserv.service.group.remote.RemoteWorkflowGroupService(descriptor: flowserv.service.descriptor.ServiceDescriptor, labels: Optional[Dict] = None)

Bases: flowserv.service.group.base.WorkflowGroupService

API component that provides methods to access and manipulate workflow groups via a RESTful API.

create_group(workflow_id: str, name: str, members: Optional[List[str]] = None, parameters: Optional[List[flowserv.model.parameter.base.Parameter]] = None, engine_config: Optional[Dict] = None, identifier: Optional[str] = None) Dict

Create a new user group for a given workflow. Each group has a a unique name for the workflow, and an optional list of additional group members. The group owener will be the authenticated user based on the access token that is provided in the request header.

Workflow groups also define variants of the original workflow template by allowing to specify a list of additional template parameters.

Parameters
  • workflow_id (string) – Unique workflow identifier

  • name (string) – Unique team name

  • members (list(string), default=None) – List of user identifier for group members

  • parameters (list of flowserv.model.parameter.base.Parameter, default=None) – Optional list of parameter declarations that are used to modify the template parameters for submissions of the created group.

  • engine_config (dict, default=None) – Optional configuration settings that will be used as the default when running a workflow.

  • identifier (string, default=None) – Optional user-provided group identifier.

Return type

dict

delete_group(group_id: str)

Delete a given workflow group and all associated runs and uploaded files. If the user is not a member of the group an unauthorized access error is raised.

Parameters

group_id (string) – Unique workflow group identifier

get_group(group_id: str) Dict

Get handle for workflow group with the given identifier.

Parameters

group_id (string) – Unique workflow group identifier

Return type

dict

list_groups(workflow_id: Optional[str] = None) Dict

Get a listing of all workflow groups. The result contains only those groups that the user is a member of. If the workflow identifier is given as an additional filter, then the result contains a user’s groups for that workflow only.

Parameters

workflow_id (string, optional) – Unique workflow identifier

Return type

dict

update_group(group_id: str, name: Optional[str] = None, members: Optional[List[str]] = None) Dict

Update the name for the workflow group with the given identifier.

Parameters
  • group_id (string) – Unique workflow group identifier

  • name (string, optional) – New workflow group name

  • members (list(string), optional) – Modified list of team members

Return type

dict