sift_client.resources.sync_stubs
¶
| CLASS | DESCRIPTION |
|---|---|
AssetsAPI |
Sync counterpart to |
CalculatedChannelsAPI |
Sync counterpart to |
ChannelsAPI |
Sync counterpart to |
FileAttachmentsAPI |
Sync counterpart to |
PingAPI |
Sync counterpart to |
ReportsAPI |
Sync counterpart to |
RulesAPI |
Sync counterpart to |
RunsAPI |
Sync counterpart to |
TagsAPI |
Sync counterpart to |
TestResultsAPI |
Sync counterpart to |
AssetsAPI
¶
AssetsAPI(sift_client: SiftClient)
Sync counterpart to AssetsAPIAsync.
High-level API for interacting with assets.
This class provides a Pythonic, notebook-friendly interface for interacting with the AssetsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Asset class from the low-level wrapper, which is a user-friendly representation of an asset using standard Python data structures and types.
Initialize the AssetsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive an asset. |
find |
Find a single asset matching the given query. Takes the same arguments as |
get |
Get an Asset. |
list_ |
List assets with optional filtering. |
unarchive |
Unarchive an asset. |
update |
Update an Asset. |
archive
¶
find
¶
find(**kwargs) -> Asset | None
Find a single asset matching the given query. Takes the same arguments as list_. If more than one asset is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Asset | None
|
The Asset found or None. |
get
¶
get(
*, asset_id: str | None = None, name: str | None = None
) -> Asset
Get an Asset.
| PARAMETER | DESCRIPTION |
|---|---|
asset_id
|
The ID of the asset.
TYPE:
|
name
|
The name of the asset.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Asset
|
The Asset. |
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
asset_ids: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | str | None = None,
modified_by: Any | str | None = None,
tags: list[Any] | list[str] | list[Tag] | None = None,
metadata: list[Any] | None = None,
description_contains: str | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Asset]
List assets with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the asset.
TYPE:
|
names
|
List of asset names to filter by.
TYPE:
|
name_contains
|
Partial name of the asset.
TYPE:
|
name_regex
|
Regular expression to filter assets by name.
TYPE:
|
asset_ids
|
Filter to assets with any of these Ids.
TYPE:
|
created_after
|
Filter assets created after this datetime.
TYPE:
|
created_before
|
Filter assets created before this datetime.
TYPE:
|
modified_after
|
Filter assets modified after this datetime.
TYPE:
|
modified_before
|
Filter assets modified before this datetime.
TYPE:
|
created_by
|
Filter assets created by this User or user ID.
TYPE:
|
modified_by
|
Filter assets last modified by this User or user ID.
TYPE:
|
tags
|
Filter assets with any of these Tags or tag names.
TYPE:
|
metadata
|
Filter assets by metadata criteria.
TYPE:
|
description_contains
|
Partial description of the asset.
TYPE:
|
include_archived
|
If True, include archived assets in results.
TYPE:
|
filter_query
|
Explicit CEL query to filter assets.
TYPE:
|
order_by
|
Field and direction to order results by.
TYPE:
|
limit
|
Maximum number of assets to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Asset]
|
A list of Asset objects that match the filter criteria. |
unarchive
¶
update
¶
update(
asset: str | Asset, update: AssetUpdate | dict
) -> Asset
Update an Asset.
| PARAMETER | DESCRIPTION |
|---|---|
asset
|
The Asset or asset ID to update.
TYPE:
|
update
|
Updates to apply to the Asset.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Asset
|
The updated Asset. |
CalculatedChannelsAPI
¶
CalculatedChannelsAPI(sift_client: SiftClient)
Sync counterpart to CalculatedChannelsAPIAsync.
High-level API for interacting with calculated channels.
This class provides a Pythonic, notebook-friendly interface for interacting with the CalculatedChannelsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the CalculatedChannel class from the low-level wrapper, which is a user-friendly representation of a calculated channel using standard Python data structures and types.
Initialize the CalculatedChannelsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive a calculated channel. |
create |
Create a calculated channel. |
find |
Find a single calculated channel matching the given query. Takes the same arguments as |
get |
Get a Calculated Channel. |
list_ |
List calculated channels with optional filtering. This will return the latest version. To find all versions, use |
list_versions |
List versions of a calculated channel. |
unarchive |
Unarchive a calculated channel. |
update |
Update a Calculated Channel. |
archive
¶
archive(
calculated_channel: str | CalculatedChannel,
) -> CalculatedChannel
Archive a calculated channel.
| PARAMETER | DESCRIPTION |
|---|---|
calculated_channel
|
The id or CalculatedChannel object of the calculated channel to archive.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
CalculatedChannel
|
The archived CalculatedChannel. |
create
¶
create(
create: CalculatedChannelCreate | dict,
) -> CalculatedChannel
Create a calculated channel.
| PARAMETER | DESCRIPTION |
|---|---|
create
|
A CalculatedChannelCreate object or dictionary with configuration for the new calculated channel. This should include properties like name, expression, channel_references, etc.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
CalculatedChannel
|
The created CalculatedChannel. |
find
¶
find(**kwargs) -> CalculatedChannel | None
Find a single calculated channel matching the given query. Takes the same arguments as list but handles checking for multiple matches.
Will raise an error if multiple calculated channels are found.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
CalculatedChannel | None
|
The CalculatedChannel found or None. |
get
¶
get(
*,
calculated_channel_id: str | None = None,
client_key: str | None = None,
) -> CalculatedChannel
Get a Calculated Channel.
| PARAMETER | DESCRIPTION |
|---|---|
calculated_channel_id
|
The ID of the calculated channel.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
CalculatedChannel
|
The CalculatedChannel. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If neither calculated_channel_id nor client_key is provided. |
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
calculated_channel_ids: list[str] | None = None,
client_keys: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | str | None = None,
modified_by: Any | str | None = None,
tags: list[Any] | list[str] | list[Tag] | None = None,
metadata: list[Any] | None = None,
asset: Asset | str | None = None,
run: Run | str | None = None,
version: int | None = None,
description_contains: str | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[CalculatedChannel]
List calculated channels with optional filtering. This will return the latest version. To find all versions, use list_versions.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the calculated channel.
TYPE:
|
names
|
List of calculated channel names to filter by.
TYPE:
|
name_contains
|
Partial name of the calculated channel.
TYPE:
|
name_regex
|
Regular expression string to filter calculated channels by name.
TYPE:
|
calculated_channel_ids
|
Filter to calculated channels with any of these IDs.
TYPE:
|
client_keys
|
Filter to calculated channels with any of these client keys.
TYPE:
|
created_after
|
Created after this date.
TYPE:
|
created_before
|
Created before this date.
TYPE:
|
modified_after
|
Modified after this date.
TYPE:
|
modified_before
|
Modified before this date.
TYPE:
|
created_by
|
Calculated channels created by this user.
TYPE:
|
modified_by
|
Calculated channels last modified by this user.
TYPE:
|
tags
|
Filter calculated channels with any of these Tags or tag names.
TYPE:
|
metadata
|
Filter calculated channels by metadata criteria.
TYPE:
|
asset
|
Filter calculated channels associated with this Asset or asset ID.
TYPE:
|
run
|
Filter calculated channels associated with this Run or run ID.
TYPE:
|
version
|
The version of the calculated channel.
TYPE:
|
description_contains
|
Partial description of the calculated channel.
TYPE:
|
include_archived
|
Include archived calculated channels.
TYPE:
|
filter_query
|
Explicit CEL query to filter calculated channels.
TYPE:
|
order_by
|
How to order the retrieved calculated channels.
TYPE:
|
limit
|
How many calculated channels to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[CalculatedChannel]
|
A list of CalculatedChannels that matches the filter. |
list_versions
¶
list_versions(
*,
calculated_channel: CalculatedChannel
| str
| None = None,
client_key: str | None = None,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | str | None = None,
modified_by: Any | str | None = None,
tags: list[Any] | list[str] | list[Tag] | None = None,
metadata: list[Any] | None = None,
description_contains: str | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[CalculatedChannel]
List versions of a calculated channel.
| PARAMETER | DESCRIPTION |
|---|---|
calculated_channel
|
The CalculatedChannel or ID of the calculated channel to get versions for.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
name
|
Exact name of the calculated channel.
TYPE:
|
names
|
List of calculated channel names to filter by.
TYPE:
|
name_contains
|
Partial name of the calculated channel.
TYPE:
|
name_regex
|
Regular expression string to filter calculated channels by name.
TYPE:
|
created_after
|
Filter versions created after this datetime.
TYPE:
|
created_before
|
Filter versions created before this datetime.
TYPE:
|
modified_after
|
Filter versions modified after this datetime.
TYPE:
|
modified_before
|
Filter versions modified before this datetime.
TYPE:
|
created_by
|
Filter versions created by this user or user ID.
TYPE:
|
modified_by
|
Filter versions modified by this user or user ID.
TYPE:
|
tags
|
Filter versions with any of these Tags or tag names.
TYPE:
|
metadata
|
Filter versions by metadata criteria.
TYPE:
|
description_contains
|
Partial description of the calculated channel.
TYPE:
|
include_archived
|
Include archived versions.
TYPE:
|
filter_query
|
Explicit CEL query to filter versions.
TYPE:
|
order_by
|
How to order the retrieved versions.
TYPE:
|
limit
|
Maximum number of versions to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[CalculatedChannel]
|
A list of CalculatedChannel versions that match the filter criteria. |
unarchive
¶
unarchive(
calculated_channel: str | CalculatedChannel,
) -> CalculatedChannel
Unarchive a calculated channel.
| PARAMETER | DESCRIPTION |
|---|---|
calculated_channel
|
The id or CalculatedChannel object of the calculated channel to unarchive.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
CalculatedChannel
|
The unarchived CalculatedChannel. |
update
¶
update(
calculated_channel: CalculatedChannel | str,
update: CalculatedChannelUpdate | dict,
*,
user_notes: str | None = None,
) -> CalculatedChannel
Update a Calculated Channel.
| PARAMETER | DESCRIPTION |
|---|---|
calculated_channel
|
The CalculatedChannel or id of the CalculatedChannel to update.
TYPE:
|
update
|
Updates to apply to the CalculatedChannel.
TYPE:
|
user_notes
|
User notes for the update.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
CalculatedChannel
|
The updated CalculatedChannel. |
ChannelsAPI
¶
ChannelsAPI(sift_client: SiftClient)
Sync counterpart to ChannelsAPIAsync.
High-level API for interacting with channels.
This class provides a Pythonic, notebook-friendly interface for interacting with the ChannelsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Channel class from the low-level wrapper, which is a user-friendly representation of a channel using standard Python data structures and types.
Initialize the ChannelsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
find |
Find a single channel matching the given query. Takes the same arguments as |
get |
Get a Channel. |
get_data |
Get data for one or more channels. |
get_data_as_arrow |
Get data for one or more channels as pyarrow tables. |
list_ |
List channels with optional filtering. |
find
¶
find(**kwargs) -> Channel | None
Find a single channel matching the given query. Takes the same arguments as list. If more than one channel is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Channel | None
|
The Channel found or None. |
get
¶
get(*, channel_id: str) -> Channel
Get a Channel.
| PARAMETER | DESCRIPTION |
|---|---|
channel_id
|
The ID of the channel.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Channel
|
The Channel. |
get_data
¶
get_data(
*,
channels: list[Channel],
run: Run | str | None = None,
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
ignore_cache: bool = False,
) -> dict[str, DataFrame]
Get data for one or more channels.
| PARAMETER | DESCRIPTION |
|---|---|
channels
|
The channels to get data for.
TYPE:
|
run
|
The Run or run_id to get data for.
TYPE:
|
start_time
|
The start time to get data for.
TYPE:
|
end_time
|
The end time to get data for.
TYPE:
|
limit
|
The maximum number of data points to return. Will be in increments of page_size or default page size defined by the call if no page_size is provided.
TYPE:
|
ignore_cache
|
Whether to ignore cached data and fetch fresh data from the server.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, DataFrame]
|
A dictionary mapping channel names to pandas DataFrames containing the channel data. |
get_data_as_arrow
¶
get_data_as_arrow(
*,
channels: list[Channel],
run: Run | str | None = None,
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
ignore_cache: bool = False,
) -> dict[str, Table]
Get data for one or more channels as pyarrow tables.
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
channel_ids: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
asset: Asset | str | None = None,
assets: list[str | Asset] | None = None,
run: Run | str | None = None,
description_contains: str | None = None,
include_archived: bool | None = None,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Channel]
List channels with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the channel.
TYPE:
|
names
|
List of channel names to filter by.
TYPE:
|
name_contains
|
Partial name of the channel.
TYPE:
|
name_regex
|
Regular expression to filter channels by name.
TYPE:
|
channel_ids
|
Filter to channels with any of these IDs.
TYPE:
|
created_after
|
Filter channels created after this datetime. Note: This is related to the channel creation time, not the timestamp of the underlying data.
TYPE:
|
created_before
|
Filter channels created before this datetime. Note: This is related to the channel creation time, not the timestamp of the underlying data.
TYPE:
|
modified_after
|
Filter channels modified after this datetime.
TYPE:
|
modified_before
|
Filter channels modified before this datetime.
TYPE:
|
asset
|
Filter channels associated with this Asset or asset ID.
TYPE:
|
assets
|
Filter channels associated with these Assets or asset IDs.
TYPE:
|
run
|
Filter channels associated with this Run or run ID.
TYPE:
|
description_contains
|
Partial description of the channel.
TYPE:
|
include_archived
|
If True, include archived channels in results.
TYPE:
|
filter_query
|
Explicit CEL query to filter channels.
TYPE:
|
order_by
|
Field and direction to order results by.
TYPE:
|
limit
|
Maximum number of channels to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Channel]
|
A list of Channels that matches the filter criteria. |
FileAttachmentsAPI
¶
FileAttachmentsAPI(sift_client: SiftClient)
Sync counterpart to FileAttachmentsAPIAsync.
High-level API for interacting with file attachments (remote files).
This class provides a Pythonic interface for managing file attachments on Sift entities like runs, assets, and test reports.
Initialize the FileAttachmentsAPIAsync.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
delete |
Batch delete multiple file attachments. |
download |
Download a file attachment to a local path. |
get |
Get a file attachment by ID. |
get_download_url |
Get a download URL for a file attachment. |
list_ |
List file attachments with optional filtering. |
update |
Update a file attachment. |
upload |
Upload a file attachment to a remote file. |
delete
¶
delete(
*,
file_attachments: list[FileAttachment | str]
| FileAttachment
| str,
) -> None
Batch delete multiple file attachments.
| PARAMETER | DESCRIPTION |
|---|---|
file_attachments
|
List of FileAttachments or the IDs of the file attachments to delete (up to 1000).
TYPE:
|
download
¶
download(
*,
file_attachment: FileAttachment | str,
output_path: str | Path,
) -> None
Download a file attachment to a local path.
| PARAMETER | DESCRIPTION |
|---|---|
file_attachment
|
The FileAttachment or the ID of the file attachment to download.
TYPE:
|
output_path
|
The path to download the file attachment to.
TYPE:
|
get
¶
get(*, file_attachment_id: str) -> FileAttachment
Get a file attachment by ID.
| PARAMETER | DESCRIPTION |
|---|---|
file_attachment_id
|
The ID of the file attachment to retrieve.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
FileAttachment
|
The FileAttachment. |
get_download_url
¶
get_download_url(
*, file_attachment: FileAttachment | str
) -> str
Get a download URL for a file attachment.
| PARAMETER | DESCRIPTION |
|---|---|
file_attachment
|
The FileAttachment or the ID of the file attachment.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The download URL for the file attachment. |
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
remote_file_ids: list[str] | None = None,
entities: list[Run | Asset | TestReport] | None = None,
entity_type: RemoteFileEntityType | None = None,
entity_ids: list[str] | None = None,
description_contains: str | None = None,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[FileAttachment]
List file attachments with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the file attachment.
TYPE:
|
names
|
List of file attachment names to filter by.
TYPE:
|
name_contains
|
Partial name of the file attachment.
TYPE:
|
name_regex
|
Regular expression to filter file attachments by name.
TYPE:
|
remote_file_ids
|
Filter to file attachments with any of these IDs.
TYPE:
|
entities
|
Filter to file attachments associated with these entities.
TYPE:
|
entity_type
|
Filter to file attachments associated with this entity type.
TYPE:
|
entity_ids
|
Filter to file attachments associated with these entity IDs.
TYPE:
|
description_contains
|
Partial description of the file attachment.
TYPE:
|
filter_query
|
Explicit CEL query to filter file attachments.
TYPE:
|
order_by
|
Field and direction to order results by. Note: Not supported by the backend, but it is here for API consistency.
TYPE:
|
limit
|
Maximum number of file attachments to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[FileAttachment]
|
A list of FileAttachment objects that match the filter criteria. |
update
¶
update(
*, file_attachment: FileAttachmentUpdate | dict
) -> FileAttachment
Update a file attachment.
| PARAMETER | DESCRIPTION |
|---|---|
file_attachment
|
The FileAttachmentUpdate with fields to update.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
FileAttachment
|
The updated FileAttachment. |
upload
¶
upload(
*,
path: str | Path,
entity: Asset | Run | TestReport,
metadata: dict[str, Any] | None = None,
description: str | None = None,
organization_id: str | None = None,
) -> FileAttachment
Upload a file attachment to a remote file.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
The path to the file to upload.
TYPE:
|
entity
|
The entity that the file is attached to.
TYPE:
|
metadata
|
Optional metadata for the file (e.g., video/image metadata).
TYPE:
|
description
|
Optional description of the file.
TYPE:
|
organization_id
|
Optional organization ID.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
FileAttachment
|
The uploaded FileAttachment. |
PingAPI
¶
PingAPI(sift_client: SiftClient)
Sync counterpart to PingAPIAsync.
High-level API for performing health checks.
Initialize the AssetsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
ping |
Send a ping request to the server. |
ping
¶
Send a ping request to the server.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The response from the server. |
ReportsAPI
¶
ReportsAPI(sift_client: SiftClient)
Sync counterpart to ReportsAPIAsync.
High-level API for interacting with reports.
Initialize the ReportsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive a report. |
cancel |
Cancel a report. |
create_from_applicable_rules |
Create a new report from applicable rules based on a run. |
create_from_rules |
Create a new report from rules. |
create_from_template |
Create a new report from a report template. |
find |
Find a single report matching the given query. Takes the same arguments as |
get |
Get a Report. |
list_ |
List reports with optional filtering. |
rerun |
Rerun a report. |
unarchive |
Unarchive a report. |
update |
Update a report. |
cancel
¶
cancel(*, report: str | Report) -> None
Cancel a report.
| PARAMETER | DESCRIPTION |
|---|---|
report
|
The Report or report ID to cancel.
TYPE:
|
create_from_applicable_rules
¶
create_from_applicable_rules(
*,
run: Run | str | None = None,
organization_id: str | None = None,
name: str | None = None,
start_time: datetime | None = None,
end_time: datetime | None = None,
) -> Report | None
Create a new report from applicable rules based on a run. If you want to evaluate against assets, use the rules client instead since no report is created in that case.
| PARAMETER | DESCRIPTION |
|---|---|
run
|
The run or run ID to associate with the report.
TYPE:
|
organization_id
|
The organization ID.
TYPE:
|
name
|
Optional name for the report.
TYPE:
|
start_time
|
Optional start time to evaluate rules against.
TYPE:
|
end_time
|
Optional end time to evaluate rules against.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Report | None
|
The created Report or None if no report was created. |
create_from_rules
¶
create_from_rules(
*,
name: str,
run: Run | str | None = None,
organization_id: str | None = None,
rules: list[Rule] | list[str],
) -> Report | None
Create a new report from rules.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name of the report.
TYPE:
|
run
|
The run or run ID to associate with the report.
TYPE:
|
organization_id
|
The organization ID.
TYPE:
|
rules
|
List of rules or rule IDs to include in the report.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Report | None
|
The created Report or None if no report was created. |
create_from_template
¶
create_from_template(
*,
report_template_id: str,
run_id: str,
organization_id: str | None = None,
name: str | None = None,
) -> Report | None
Create a new report from a report template.
| PARAMETER | DESCRIPTION |
|---|---|
report_template_id
|
The ID of the report template to use.
TYPE:
|
run_id
|
The run ID to associate with the report.
TYPE:
|
organization_id
|
The organization ID.
TYPE:
|
name
|
Optional name for the report.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Report | None
|
The created Report or None if no report was created. |
find
¶
find(**kwargs) -> Report | None
Find a single report matching the given query. Takes the same arguments as list. If more than one report is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Report | None
|
The Report found or None. |
get
¶
get(*, report_id: str) -> Report
Get a Report.
| PARAMETER | DESCRIPTION |
|---|---|
report_id
|
The ID of the report.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Report
|
The Report. |
list_
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
names: list[str] | None = None,
description_contains: str | None = None,
run: Run | str | None = None,
organization_id: str | None = None,
report_ids: list[str] | None = None,
report_template_id: str | None = None,
metadata: dict[str, str | float | bool] | None = None,
tag_names: list[str] | list[Tag] | None = None,
created_by: str | None = None,
modified_by: str | None = None,
order_by: str | None = None,
limit: int | None = None,
include_archived: bool = False,
filter_query: str | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
) -> list[Report]
List reports with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the report.
TYPE:
|
name_contains
|
Partial name of the report.
TYPE:
|
name_regex
|
Regular expression string to filter reports by name.
TYPE:
|
names
|
List of report names to filter by.
TYPE:
|
description_contains
|
Partial description of the report.
TYPE:
|
run
|
Run/run ID to filter by.
TYPE:
|
organization_id
|
Organization ID to filter by.
TYPE:
|
report_ids
|
List of report IDs to filter by.
TYPE:
|
report_template_id
|
Report template ID to filter by.
TYPE:
|
metadata
|
Metadata to filter by.
TYPE:
|
tag_names
|
List of tags or tag names to filter by.
TYPE:
|
created_by
|
The user ID of the creator of the reports.
TYPE:
|
modified_by
|
The user ID of the last modifier of the reports.
TYPE:
|
order_by
|
How to order the retrieved reports.
TYPE:
|
limit
|
How many reports to retrieve. If None, retrieves all matches.
TYPE:
|
include_archived
|
Whether to include archived reports.
TYPE:
|
filter_query
|
Explicit CEL query to filter reports.
TYPE:
|
created_after
|
Filter reports created after this datetime.
TYPE:
|
created_before
|
Filter reports created before this datetime.
TYPE:
|
modified_after
|
Filter reports modified after this datetime.
TYPE:
|
modified_before
|
Filter reports modified before this datetime.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Report]
|
A list of Reports that matches the filter. |
rerun
¶
rerun(*, report: str | Report) -> tuple[str, str]
Rerun a report.
| PARAMETER | DESCRIPTION |
|---|---|
report
|
The Report or report ID to rerun.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[str, str]
|
A tuple of (job_id, new_report_id). |
update
¶
update(
report: str | Report, update: ReportUpdate | dict
) -> Report
Update a report.
| PARAMETER | DESCRIPTION |
|---|---|
report
|
The Report or report ID to update.
TYPE:
|
update
|
The updates to apply.
TYPE:
|
RulesAPI
¶
RulesAPI(sift_client: SiftClient)
Sync counterpart to RulesAPIAsync.
High-level API for interacting with rules.
This class provides a Pythonic, notebook-friendly interface for interacting with the RulesAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Rule class from the low-level wrapper, which is a user-friendly representation of a rule using standard Python data structures and types.
Initialize the RulesAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive a rule. |
create |
Create a new rule. |
find |
Find a single rule matching the given query. Takes the same arguments as |
get |
Get a Rule. |
list_ |
List rules with optional filtering. |
unarchive |
Unarchive a rule. |
update |
Update a Rule. |
archive
¶
create
¶
create(create: RuleCreate | dict) -> Rule
Create a new rule.
| PARAMETER | DESCRIPTION |
|---|---|
create
|
A RuleCreate object or dictionary with configuration for the new rule.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Rule
|
The created Rule. |
find
¶
find(**kwargs) -> Rule | None
Find a single rule matching the given query. Takes the same arguments as list. If more than one rule is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Rule | None
|
The Rule found or None. |
get
¶
get(
*,
rule_id: str | None = None,
client_key: str | None = None,
) -> Rule
Get a Rule.
| PARAMETER | DESCRIPTION |
|---|---|
rule_id
|
The ID of the rule.
TYPE:
|
client_key
|
The client key of the rule.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Rule
|
The Rule. |
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
rule_ids: list[str] | None = None,
client_keys: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | str | None = None,
modified_by: Any | str | None = None,
metadata: list[Any] | None = None,
assets: list[str] | list[Asset] | None = None,
asset_tags: list[str | Tag] | None = None,
description_contains: str | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Rule]
List rules with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the rule.
TYPE:
|
names
|
List of rule names to filter by.
TYPE:
|
name_contains
|
Partial name of the rule.
TYPE:
|
name_regex
|
Regular expression string to filter rules by name.
TYPE:
|
client_keys
|
Client keys of rules to filter to.
TYPE:
|
rule_ids
|
IDs of rules to filter to.
TYPE:
|
created_after
|
Rules created after this datetime.
TYPE:
|
created_before
|
Rules created before this datetime.
TYPE:
|
modified_after
|
Rules modified after this datetime.
TYPE:
|
modified_before
|
Rules modified before this datetime.
TYPE:
|
created_by
|
Filter rules created by this User or user ID.
TYPE:
|
modified_by
|
Filter rules last modified by this User or user ID.
TYPE:
|
metadata
|
Filter rules by metadata criteria.
TYPE:
|
assets
|
Filter rules associated with any of these Assets.
TYPE:
|
asset_tags
|
Filter rules associated with any Assets that have these Tag IDs.
TYPE:
|
description_contains
|
Partial description of the rule.
TYPE:
|
include_archived
|
If True, include archived rules in results.
TYPE:
|
filter_query
|
Explicit CEL query to filter rules.
TYPE:
|
order_by
|
Field and direction to order results by.
TYPE:
|
limit
|
Maximum number of rules to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Rule]
|
A list of Rules that matches the filter. |
unarchive
¶
update
¶
update(
rule: Rule | str,
update: RuleUpdate | dict,
*,
version_notes: str | None = None,
) -> Rule
Update a Rule.
| PARAMETER | DESCRIPTION |
|---|---|
rule
|
The Rule or rule ID to update.
TYPE:
|
update
|
Updates to apply to the Rule.
TYPE:
|
version_notes
|
Notes to include in the rule version.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Rule
|
The updated Rule. |
RunsAPI
¶
RunsAPI(sift_client: SiftClient)
Sync counterpart to RunsAPIAsync.
High-level API for interacting with runs.
This class provides a Pythonic, notebook-friendly interface for interacting with the RunsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Run class from the low-level wrapper, which is a user-friendly representation of a run using standard Python data structures and types.
Initialize the RunsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive a run. |
create |
Create a new run. |
find |
Find a single run matching the given query. Takes the same arguments as |
get |
Get a Run. |
list_ |
List runs with optional filtering. |
stop |
Stop a run by setting its stop time to the current time. |
unarchive |
Unarchive a run. |
update |
Update a Run. |
create
¶
create(
create: RunCreate | dict,
assets: list[str | Asset] | None = None,
associate_new_data: bool = False,
) -> Run
Create a new run.
Note on assets: You do not need to provide asset info when creating a run. If you pass a Run to future ingestion configs associated with assets, the association will happen automatically then. However, if you do pass assets and set associate_new_data=True, future ingested data that falls within the Run's time period will be associated with the Run. Even if that data's timestamp is in the past, if it has not been ingested yet and the Run's timestamp envelopes it, it will be associated with the Run. This may be useful if you want to capture a time range for a specific asset or won't know about this Run when ingesting to that asset. If the data has already been ingested, leave associate_new_data=False.
| PARAMETER | DESCRIPTION |
|---|---|
create
|
The Run definition to create.
TYPE:
|
assets
|
List of assets to associate with the run. Note: if you are associating new data, you must provide assets/asset names.
TYPE:
|
associate_new_data
|
If True, future ingested data that falls within the Run's time period will be associated with the Run. Even if that data's timestamp is in the past, if it has not been ingested yet and the Run's timestamp envelopes it, it will be associated with the Run.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Run
|
The created Run. |
find
¶
find(**kwargs) -> Run | None
Find a single run matching the given query. Takes the same arguments as list_. If more than one run is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Run | None
|
The Run found or None. |
get
¶
get(
*,
run_id: str | None = None,
client_key: str | None = None,
) -> Run
Get a Run.
| PARAMETER | DESCRIPTION |
|---|---|
run_id
|
The ID of the run.
TYPE:
|
client_key
|
The client key of the run.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Run
|
The Run. |
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
run_ids: list[str] | None = None,
client_keys: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | str | None = None,
modified_by: Any | str | None = None,
tags: list[str | Tag] | None = None,
metadata: list[Any] | None = None,
assets: list[Asset] | list[str] | None = None,
asset_tags: list[str | Tag] | None = None,
duration_less_than: timedelta | None = None,
duration_greater_than: timedelta | None = None,
start_time_after: datetime | None = None,
start_time_before: datetime | None = None,
stop_time_after: datetime | None = None,
stop_time_before: datetime | None = None,
is_stopped: bool | None = None,
description_contains: str | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Run]
List runs with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the run.
TYPE:
|
names
|
List of run names to filter by.
TYPE:
|
name_contains
|
Partial name of the run.
TYPE:
|
name_regex
|
Regular expression to filter runs by name.
TYPE:
|
run_ids
|
Filter to runs with any of these IDs.
TYPE:
|
client_keys
|
Filter to runs with any of these client keys.
TYPE:
|
created_after
|
Filter runs created after this datetime.
TYPE:
|
created_before
|
Filter runs created before this datetime.
TYPE:
|
modified_after
|
Filter runs modified after this datetime.
TYPE:
|
modified_before
|
Filter runs modified before this datetime.
TYPE:
|
created_by
|
Filter runs created by this User or user ID.
TYPE:
|
modified_by
|
Filter runs last modified by this User or user ID.
TYPE:
|
tags
|
Filter runs with any of these Tags IDs.
TYPE:
|
metadata
|
Filter runs by metadata criteria.
TYPE:
|
assets
|
Filter runs associated with any of these Assets or asset IDs.
TYPE:
|
asset_tags
|
Filter runs associated with any Assets that have these Tag IDs.
TYPE:
|
duration_less_than
|
Filter runs with duration less than this time.
TYPE:
|
duration_greater_than
|
Filter runs with duration greater than this time.
TYPE:
|
start_time_after
|
Filter runs that started after this datetime.
TYPE:
|
start_time_before
|
Filter runs that started before this datetime.
TYPE:
|
stop_time_after
|
Filter runs that stopped after this datetime.
TYPE:
|
stop_time_before
|
Filter runs that stopped before this datetime.
TYPE:
|
is_stopped
|
Whether the run is stopped.
TYPE:
|
description_contains
|
Partial description of the run.
TYPE:
|
include_archived
|
If True, include archived runs in results.
TYPE:
|
filter_query
|
Explicit CEL query to filter runs.
TYPE:
|
order_by
|
Field and direction to order results by.
TYPE:
|
limit
|
Maximum number of runs to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Run]
|
A list of Run objects that match the filter criteria. |
stop
¶
Stop a run by setting its stop time to the current time.
| PARAMETER | DESCRIPTION |
|---|---|
run
|
The Run or run ID to stop.
TYPE:
|
TagsAPI
¶
TagsAPI(sift_client: SiftClient)
Sync counterpart to TagsAPIAsync.
High-level API for interacting with tags.
Initialize the TagsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
create |
Create a new tag. |
find |
Find a single tag matching the given query. Takes the same arguments as |
find_or_create |
Find tags by name or create them if they don't exist. |
list_ |
List tags with optional filtering. |
update |
Update a Tag. |
create
¶
create(name: str) -> Tag
Create a new tag.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name of the tag.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tag
|
The created Tag. |
find
¶
find(**kwargs) -> Tag | None
Find a single tag matching the given query. Takes the same arguments as list. If more than one tag is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Tag | None
|
The Tag found or None. |
find_or_create
¶
find_or_create(names: list[str]) -> list[Tag]
Find tags by name or create them if they don't exist.
| PARAMETER | DESCRIPTION |
|---|---|
names
|
List of tag names to find or create.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Tag]
|
List of Tags that were found or created. |
list_
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
names: list[str] | None = None,
tag_ids: list[str] | None = None,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Tag]
List tags with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the tag.
TYPE:
|
name_contains
|
Partial name of the tag.
TYPE:
|
name_regex
|
Regular expression string to filter tags by name.
TYPE:
|
names
|
List of tag names to filter by.
TYPE:
|
tag_ids
|
List of tag IDs to filter by.
TYPE:
|
filter_query
|
Explicit CEL query to filter tags.
TYPE:
|
order_by
|
How to order the retrieved tags.
TYPE:
|
limit
|
How many tags to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Tag]
|
A list of Tags that matches the filter. |
update
¶
Update a Tag.
| PARAMETER | DESCRIPTION |
|---|---|
tag
|
The Tag or tag ID to update.
TYPE:
|
update
|
Updates to apply to the Tag.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tag
|
The updated Tag. |
Note
The tags API doesn't have an update method in the proto, so this would need to be implemented if the API supports it.
TestResultsAPI
¶
TestResultsAPI(sift_client: SiftClient)
Sync counterpart to TestResultsAPIAsync.
High-level API for interacting with test reports, steps, and measurements.
Initialize the TestResultsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive a test report. |
create |
Create a new test report. |
create_measurement |
Create a new test measurement. |
create_measurements |
Create multiple test measurements in a single request. |
create_step |
Create a new test step. |
delete |
Delete a test report. |
delete_measurement |
Delete a test measurement. |
delete_step |
Delete a test step. |
find |
Find a single test report matching the given query. Takes the same arguments as |
get |
Get a TestReport. |
get_step |
Get a TestStep. |
import_ |
Import a test report from an already-uploaded file. |
list_ |
List test reports with optional filtering. |
list_measurements |
List test measurements with optional filtering. |
list_steps |
List test steps with optional filtering. |
unarchive |
Unarchive a test report. |
update |
Update a TestReport. |
update_measurement |
Update a TestMeasurement. |
update_step |
Update a TestStep. |
archive
¶
archive(*, test_report: str | TestReport) -> TestReport
Archive a test report.
| PARAMETER | DESCRIPTION |
|---|---|
test_report
|
The TestReport or test report ID to archive.
TYPE:
|
create
¶
create(test_report: TestReportCreate | dict) -> TestReport
Create a new test report.
| PARAMETER | DESCRIPTION |
|---|---|
test_report
|
The test report to create (can be TestReport or TestReportCreate).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestReport
|
The created TestReport. |
create_measurement
¶
create_measurement(
test_measurement: TestMeasurementCreate | dict,
update_step: bool = False,
) -> TestMeasurement
Create a new test measurement.
| PARAMETER | DESCRIPTION |
|---|---|
test_measurement
|
The test measurement to create (can be TestMeasurement or TestMeasurementCreate).
TYPE:
|
update_step
|
Whether to update the step to failed if the measurement is being created is failed.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestMeasurement
|
The created TestMeasurement. |
create_measurements
¶
create_measurements(
test_measurements: list[TestMeasurementCreate],
) -> tuple[int, list[str]]
Create multiple test measurements in a single request.
| PARAMETER | DESCRIPTION |
|---|---|
test_measurements
|
The test measurements to create.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[int, list[str]]
|
A tuple of (measurements_created_count, measurement_ids). |
create_step
¶
create_step(test_step: TestStepCreate | dict) -> TestStep
Create a new test step.
| PARAMETER | DESCRIPTION |
|---|---|
test_step
|
The test step to create (can be TestStep or TestStepCreate).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestStep
|
The created TestStep. |
delete
¶
delete(*, test_report: str | TestReport) -> None
Delete a test report.
| PARAMETER | DESCRIPTION |
|---|---|
test_report
|
The TestReport or test report ID to delete.
TYPE:
|
delete_measurement
¶
delete_measurement(
*, test_measurement: str | TestMeasurement
) -> None
Delete a test measurement.
| PARAMETER | DESCRIPTION |
|---|---|
test_measurement
|
The TestMeasurement or measurement ID to delete.
TYPE:
|
delete_step
¶
delete_step(*, test_step: str | TestStep) -> None
Delete a test step.
| PARAMETER | DESCRIPTION |
|---|---|
test_step
|
The TestStep or test step ID to delete.
TYPE:
|
find
¶
find(**kwargs) -> TestReport | None
Find a single test report matching the given query. Takes the same arguments as list_. If more than one test report is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
TestReport | None
|
The TestReport found or None. |
get
¶
get(*, test_report_id: str) -> TestReport
Get a TestReport.
| PARAMETER | DESCRIPTION |
|---|---|
test_report_id
|
The ID of the test report.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestReport
|
The TestReport. |
get_step
¶
Get a TestStep.
| PARAMETER | DESCRIPTION |
|---|---|
test_step
|
The TestStep or test step ID to get.
TYPE:
|
import_
¶
import_(test_file: str | Path) -> TestReport
Import a test report from an already-uploaded file.
| PARAMETER | DESCRIPTION |
|---|---|
test_file
|
The path to the test report file to import. We currently only support XML files exported from NI TestStand.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestReport
|
The imported TestReport. |
list_
¶
list_(
*,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
test_report_ids: list[str] | None = None,
status: TestStatus | None = None,
test_system_name: str | None = None,
test_case: str | None = None,
serial_numbers: list[str] | None = None,
part_numbers: list[str] | None = None,
system_operator: str | None = None,
created_by: str | None = None,
modified_by: str | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
metadata: list[Any] | dict[str, Any] | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[TestReport]
List test reports with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the test report.
TYPE:
|
names
|
List of test report names to filter by.
TYPE:
|
name_contains
|
Partial name of the test report.
TYPE:
|
name_regex
|
Regular expression string to filter test reports by name.
TYPE:
|
test_report_ids
|
Test report IDs to filter by.
TYPE:
|
status
|
Status to filter by (TestStatus enum).
TYPE:
|
test_system_name
|
Test system name to filter by.
TYPE:
|
test_case
|
Test case to filter by.
TYPE:
|
serial_numbers
|
Serial numbers to filter by.
TYPE:
|
part_numbers
|
Part numbers to filter by.
TYPE:
|
system_operator
|
System operator to filter by.
TYPE:
|
created_by
|
User ID who created the test report.
TYPE:
|
modified_by
|
User ID who last modified the test report.
TYPE:
|
created_after
|
Filter test reports created after this datetime.
TYPE:
|
created_before
|
Filter test reports created before this datetime.
TYPE:
|
modified_after
|
Filter test reports modified after this datetime.
TYPE:
|
modified_before
|
Filter test reports modified before this datetime.
TYPE:
|
metadata
|
Filter test reports by metadata criteria.
TYPE:
|
include_archived
|
Whether to include only archived or non-archived reports.
TYPE:
|
filter_query
|
Custom filter to apply to the test reports.
TYPE:
|
order_by
|
How to order the retrieved test reports. If used, this will override the other filters.
TYPE:
|
limit
|
How many test reports to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[TestReport]
|
A list of TestReports that matches the filter. |
list_measurements
¶
list_measurements(
*,
measurements: list[str]
| list[TestMeasurement]
| None = None,
test_steps: list[str] | list[TestStep] | None = None,
test_reports: list[str]
| list[TestReport]
| None = None,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
measurement_type: TestMeasurementType | None = None,
passed: bool | None = None,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[TestMeasurement]
List test measurements with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
measurements
|
Measurements to filter by.
TYPE:
|
test_steps
|
Test steps to filter by.
TYPE:
|
test_reports
|
Test reports to filter by.
TYPE:
|
name
|
Exact name of the test measurement.
TYPE:
|
names
|
List of test measurement names to filter by.
TYPE:
|
name_contains
|
Partial name of the test measurement.
TYPE:
|
name_regex
|
Regular expression string to filter test measurements by name.
TYPE:
|
measurement_type
|
Measurement type to filter by (TestMeasurementType enum).
TYPE:
|
passed
|
Whether the measurement passed.
TYPE:
|
filter_query
|
Explicit CEL query to filter test measurements.
TYPE:
|
order_by
|
How to order the retrieved test measurements.
TYPE:
|
limit
|
How many test measurements to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[TestMeasurement]
|
A list of TestMeasurements that matches the filter. |
list_steps
¶
list_steps(
*,
test_steps: list[str] | list[TestStep] | None = None,
test_reports: list[str]
| list[TestReport]
| None = None,
parent_steps: list[str] | list[TestStep] | None = None,
name: str | None = None,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
status: TestStatus | None = None,
step_type: TestStepType | None = None,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[TestStep]
List test steps with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
test_steps
|
Test steps to filter by.
TYPE:
|
test_reports
|
Test reports to filter by.
TYPE:
|
parent_steps
|
Parent steps to filter by.
TYPE:
|
name
|
Exact name of the test step.
TYPE:
|
names
|
List of test step names to filter by.
TYPE:
|
name_contains
|
Partial name of the test step.
TYPE:
|
name_regex
|
Regular expression string to filter test steps by name.
TYPE:
|
status
|
Status to filter by (TestStatus enum).
TYPE:
|
step_type
|
Step type to filter by (TestStepType enum).
TYPE:
|
filter_query
|
Explicit CEL query to filter test steps.
TYPE:
|
order_by
|
How to order the retrieved test steps.
TYPE:
|
limit
|
How many test steps to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[TestStep]
|
A list of TestSteps that matches the filter. |
unarchive
¶
unarchive(*, test_report: str | TestReport) -> TestReport
Unarchive a test report.
| PARAMETER | DESCRIPTION |
|---|---|
test_report
|
The TestReport or test report ID to unarchive.
TYPE:
|
update
¶
update(
test_report: str | TestReport,
update: TestReportUpdate | dict,
) -> TestReport
Update a TestReport.
| PARAMETER | DESCRIPTION |
|---|---|
test_report
|
The TestReport or test report ID to update.
TYPE:
|
update
|
Updates to apply to the TestReport.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestReport
|
The updated TestReport. |
update_measurement
¶
update_measurement(
test_measurement: TestMeasurement,
update: TestMeasurementUpdate | dict,
update_step: bool = False,
) -> TestMeasurement
Update a TestMeasurement.
| PARAMETER | DESCRIPTION |
|---|---|
test_measurement
|
The TestMeasurement or measurement ID to update.
TYPE:
|
update
|
Updates to apply to the TestMeasurement.
TYPE:
|
update_step
|
Whether to update the step to failed if the measurement is being updated to failed.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestMeasurement
|
The updated TestMeasurement. |
update_step
¶
update_step(
test_step: str | TestStep, update: TestStepUpdate | dict
) -> TestStep
Update a TestStep.
| PARAMETER | DESCRIPTION |
|---|---|
test_step
|
The TestStep or test step ID to update.
TYPE:
|
update
|
Updates to apply to the TestStep.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TestStep
|
The updated TestStep. |