We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.

SDK ReferencePython SDKFeature ClientsFilters

Filters Client

Bases: BaseRestClient

The filters client is a client for interacting with Hatchet’s filters API.

Methods:

NameDescription
aio_createCreate a new filter.
aio_deleteDelete a filter by its ID.
aio_getGet a filter by its ID.
aio_listList filters for a given tenant.
createCreate a new filter.
deleteDelete a filter by its ID.
getGet a filter by its ID.
listList filters for a given tenant.

Functions

aio_create

Create a new filter.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to associate with the filter.required
expressionstrThe expression to evaluate for the filter.required
scopestrThe scope for the filter.required
payloadJSONSerializableMappingThe payload to send with the filter.{}

Returns:

TypeDescription
V1FilterThe created filter.

aio_delete

Delete a filter by its ID.

Parameters:

NameTypeDescriptionDefault
filter_idstrThe ID of the filter to delete.required

Returns:

TypeDescription
V1FilterThe deleted filter.

aio_get

Get a filter by its ID.

Parameters:

NameTypeDescriptionDefault
filter_idstrThe ID of the filter to retrieve.required

Returns:

TypeDescription
V1FilterThe filter with the specified ID.

aio_list

List filters for a given tenant.

Parameters:

NameTypeDescriptionDefault
limitint | NoneThe maximum number of filters to return.None
offsetint | NoneThe number of filters to skip before starting to collect the result set.None
workflow_id_scope_pairslist[tuple[str, str]] | NoneA list of tuples containing workflow IDs and scopes to filter by. The workflow id is first, then the scope is second.None

Returns:

TypeDescription
V1FilterListA list of filters matching the specified criteria.

create

Create a new filter.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to associate with the filter.required
expressionstrThe expression to evaluate for the filter.required
scopestrThe scope for the filter.required
payloadJSONSerializableMappingThe payload to send with the filter.{}

Returns:

TypeDescription
V1FilterThe created filter.

delete

Delete a filter by its ID.

Parameters:

NameTypeDescriptionDefault
filter_idstrThe ID of the filter to delete.required

Returns:

TypeDescription
V1FilterThe deleted filter.

get

Get a filter by its ID.

Parameters:

NameTypeDescriptionDefault
filter_idstrThe ID of the filter to retrieve.required

Returns:

TypeDescription
V1FilterThe filter with the specified ID.

list

List filters for a given tenant.

Parameters:

NameTypeDescriptionDefault
limitint | NoneThe maximum number of filters to return.None
offsetint | NoneThe number of filters to skip before starting to collect the result set.None
workflow_id_scope_pairslist[tuple[str, str]] | NoneA list of tuples containing workflow IDs and scopes to filter by. The workflow id is first, then the scope is second.None

Returns:

TypeDescription
V1FilterListA list of filters matching the specified criteria.