Skip to content

Tool

get_tool(organization_id, relations=0, id=None, logger=None, session=None, orm_entities=False)

Get detail of tool

:param organization_id: Organization identifier :param relations: Flag sum of associated enities type. Use Entities enum type. :param id: Tool identifier :param session: SQLAlchemy session :param orm_entities: If True, return mapping models, else domain models :return: Dictionary with 2 keys. [Data]: a list of ToolModel entities (if orm_entities==True) or a list of Tool (if orm_entities=False). [Total]: record count.

get_tools(organization_id, relations=0, ids=None, order=None, offset=0, limit=100, filters=None, logger=None, session=None, orm_entities=False)

Get list of tools

:param organization_id: Organization identifier :param relations: Flag sum of associated enities type. Use Entities enum type. :param ids: List of identifiers of tools. If empty, load all data. :param order: Order field :param offset: Index of first record :param limit: Number of records to be returned :param filters: JSON string with query filter :param session: SQLAlchemy session :param orm_entities: If True, return mapping models, else domain models :return: Dictionary with 2 keys. [Data]: a list of ToolModel entities (if orm_entities==True) or a list of Tool (if orm_entities=False). [Total]: record count.

save_tool(organization_id, payload, logger=None, session=None)

Save tool

Parameters:

Name Type Description Default
organization_id uuid

Organization unit identifier

required
obj Tool

Tool object

required
logger

Logger object instance

None
session SQLAlchemy

SQLAlchemy session

None

Returns:

Name Type Description
Tool Tool

Tool object