Skip to main content

sasvi.admin

Public surface for the admin (tenant-configuration) feature layer.

Re-exports the configuration record types and the service handles that read and mutate VI tenant metadata -- entity and relationship types, domains, queues, strategies, scenarios, data stores, icons, shapes, synonyms, the alert-configuration package/bundle helpers, and the full-solution transport service -- so callers can import them from sasvi.admin without reaching into private submodules.

Alert metadata, alerting-event, scenario, scenario-tag, and action services.

AlertMetadataService Objects​

class AlertMetadataService(_AdminServiceBase)

Service for alert stored-object metadata lookups.

Arguments:

  • alerts_api - Generated Alerts API namespace used for metadata calls.

fields​

def fields() -> object | None

Return alert metadata field definitions.

Returns:

The generated field-description payload.

Raises:

  • AdminOperationError - When the server rejects the call.

fields_async​

async def fields_async() -> object | None

Asynchronously return alert metadata field definitions.

Returns:

The generated field-description payload.

Raises:

  • AdminOperationError - When the server rejects the call.

stored_object​

def stored_object() -> object | None

Return the alert stored-object definition when available.

Returns:

The generated stored-object payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

stored_object_async​

async def stored_object_async() -> object | None

Asynchronously return the alert stored-object definition when available.

Returns:

The generated stored-object payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

AlertingEventMetadataService Objects​

class AlertingEventMetadataService(_AdminServiceBase)

Service for alerting-event stored-object metadata lookups.

Arguments:

  • alerts_api - Generated Alerts API namespace used for metadata calls.

fields​

def fields() -> object | None

Return alerting-event metadata field definitions.

Returns:

The generated field-description payload.

Raises:

  • AdminOperationError - When the server rejects the call.

fields_async​

async def fields_async() -> object | None

Asynchronously return alerting-event metadata field definitions.

Returns:

The generated field-description payload.

Raises:

  • AdminOperationError - When the server rejects the call.

ScenariosService Objects​

class ScenariosService(_AdminServiceBase)

Service for scenario-related admin lookups.

Arguments:

  • alerts_api - Generated Alerts API namespace used for scenario calls.

summaries​

def summaries(*, body: Any) -> object | None

Request scenario summary information for a supplied payload.

Arguments:

  • body - Raw or generated scenario-summary request payload.

Returns:

The generated summary response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

summaries_async​

async def summaries_async(*, body: Any) -> object | None

Asynchronously request scenario summary information for a supplied payload.

Arguments:

  • body - Raw or generated scenario-summary request payload.

Returns:

The generated summary response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

list_dispositions​

def list_dispositions(*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> object | None

List available scenario dispositions.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

The generated disposition collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

list_dispositions_async​

async def list_dispositions_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> object | None

Asynchronously list available scenario dispositions.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

The generated disposition collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

get_disposition​

def get_disposition(*, scenario_id: str) -> object | None

Fetch the default disposition for one scenario id.

Arguments:

  • scenario_id - Scenario identifier.

Returns:

The generated disposition payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_disposition_async​

async def get_disposition_async(*, scenario_id: str) -> object | None

Asynchronously fetch the default disposition for one scenario id.

Arguments:

  • scenario_id - Scenario identifier.

Returns:

The generated disposition payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

AlertActionsService Objects​

class AlertActionsService(_AdminServiceBase)

Service for executing alert actions from admin-style payloads.

Arguments:

  • alerts_api - Generated Alerts API namespace used for action calls.

perform​

def perform(
*, action_type: CreatePerformActionsActionType,
body: ActionRequestCollectionRep | Mapping[str, Any]) -> object | None

Perform one action on a group of alerts.

Sends POST /alertActions/{actionType}. A mapping body is in wire form, for example {"items": [{"alertIds": [...], "actionType": "CHECKOUT"}]}.

Arguments:

  • action_type - The action to perform, one of "ASSIGNMENT", "CHECKIN", "CHECKOUT" or "REACTIVATE". It is the last segment of the request path.
  • body - The action request collection, as the generated model or as a mapping in wire form.

Returns:

The service response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

perform_async​

async def perform_async(
*, action_type: CreatePerformActionsActionType,
body: ActionRequestCollectionRep | Mapping[str, Any]) -> object | None

Asynchronously perform one action on a group of alerts.

Arguments:

  • action_type - The action to perform; see perform.
  • body - The action request collection, as the generated model or as a mapping in wire form.

Returns:

The service response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

ScenarioTagsService Objects​

class ScenarioTagsService(_AdminServiceBase)

Service for listing configured scenario tags.

list​

def list(*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[ScenarioTagRecord]

List scenario tags.

Reads one page. A WARNING is logged when the server reports more scenario tags than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[ScenarioTagRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[ScenarioTagRecord]

List every one of the scenario tags, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[ScenarioTagRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, scenario_tag_id: str) -> ScenarioTagRecord | None

Fetch one scenario tag by id.

Arguments:

  • scenario_tag_id - Scenario-tag identifier.

Returns:

The bound scenario-tag record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(*, scenario_tag_id: str) -> ScenarioTagRecord | None

Asynchronously fetch one scenario tag by id.

Arguments:

  • scenario_tag_id - Scenario-tag identifier.

Returns:

The bound scenario-tag record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
body: Any,
accept_item: str | None = None) -> ScenarioTagRecord | None

Create a scenario tag from a raw/generated payload.

Arguments:

  • body - Raw or generated scenario-tag payload.
  • accept_item - Optional accept header override.

Returns:

The created bound scenario-tag record.

Raises:

  • AdminOperationError - When the server rejects the call.

create_async​

async def create_async(
*,
body: Any,
accept_item: str | None = None) -> ScenarioTagRecord | None

Asynchronously create a scenario tag from a raw/generated payload.

Arguments:

  • body - Raw or generated scenario-tag payload.
  • accept_item - Optional accept header override.

Returns:

The created bound scenario-tag record.

Raises:

  • AdminOperationError - When the server rejects the call.

update​

def update(*,
scenario_tag_id: str,
body: Any,
if_match: str | None = None,
force: bool = False) -> ScenarioTagRecord | None

Update a scenario tag by id.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • scenario_tag_id - Scenario-tag identifier.
  • body - Raw or generated replacement payload.
  • if_match - ETag the scenario tag must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound scenario-tag record.

Raises:

  • AdminConflictError - When the scenario tag changed since the ETag was read (HTTP 412).
  • AdminOperationError - When the server rejects the call.

update_async​

async def update_async(*,
scenario_tag_id: str,
body: Any,
if_match: str | None = None,
force: bool = False) -> ScenarioTagRecord | None

Asynchronously update a scenario tag by id.

Arguments:

  • scenario_tag_id - Scenario-tag identifier.
  • body - Raw or generated replacement payload.
  • if_match - ETag the scenario tag must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound scenario-tag record.

Raises:

  • AdminConflictError - When the scenario tag changed since the ETag was read (HTTP 412).
  • AdminOperationError - When the server rejects the call.

delete​

def delete(*, scenario_tag_id: str) -> None

Delete a scenario tag by id.

The SDK runs no referential pre-check; the server refuses a tag that is still in use.

Arguments:

  • scenario_tag_id - Scenario-tag identifier.

Raises:

  • AdminNotFoundError - When no scenario tag has that id (HTTP 404).
  • AdminConflictError - When the server reports a conflict (HTTP 409).
  • AdminOperationError - When the server refuses the delete for any other reason (HTTP 400).

delete_async​

async def delete_async(*, scenario_tag_id: str) -> None

Asynchronously delete a scenario tag by id.

Arguments:

  • scenario_tag_id - Scenario-tag identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminConflictError - As for delete.
  • AdminOperationError - As for delete.

Shared base classes, helpers, and constants for the admin service layer.

The common _AdminServiceBase / _AlertAdminRecord couplers, the configuration-bundle component constants, and the small binary/JSON/path helpers that the per-domain admin modules build on.

CONFIGURATION_BUNDLE_FORMAT​

CONFIGURATION_BUNDLE_FORMAT_VERSION​

SAND_COMPONENT​

ALERTS_COMPONENT​

CONFIGURATION_COMPONENTS​

SAND_CONFIG_MEDIA_TYPE​

ALERTS_CONFIG_MEDIA_TYPE​

Icon, solution, and search-type catalog admin services.

SearchTypesService Objects​

class SearchTypesService(_AdminServiceBase)

Service for SAND search-type configuration records.

Arguments:

  • sand_api - Generated SAND API namespace used for configuration calls.

list​

def list(*,
start: int | None = None,
limit: int | None = None,
names_only: bool | None = None) -> builtins.list[SearchTypeRecord]

List SAND type configurations.

Reads one page of 20 unless limit says otherwise. A WARNING is logged when the server reports more types than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional maximum number of types to return.
  • names_only - Whether only names should be returned.

Returns:

Bound search-type records for one page.

Raises:

  • AdminOperationError - When the server rejects the call or answers with a body that is not a collection.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
names_only: bool | None = None) -> builtins.list[SearchTypeRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional maximum number of types to return.
  • names_only - Whether only names should be returned.

Returns:

Bound search-type records for one page.

Raises:

  • AdminOperationError - As for list.

list_all​

def list_all(
*,
batch_size: int = 100,
max_items: int | None = None,
names_only: bool | None = None) -> builtins.list[SearchTypeRecord]

List every SAND type configuration, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • names_only - Whether only names should be returned.

Returns:

Bound search-type records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
names_only: bool | None = None) -> builtins.list[SearchTypeRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • names_only - Whether only names should be returned.

Returns:

Bound search-type records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, name: str) -> SearchTypeRecord | None

Fetch one SAND type configuration by name, keeping its ETag.

Arguments:

  • name - Search type name.

Returns:

The search type record with etag set, or None when not found.

get_async​

async def get_async(*, name: str) -> SearchTypeRecord | None

Async variant of get.

Arguments:

  • name - Search type name.

Returns:

The search type record with etag set, or None when not found.

create​

def create(*,
body: Any,
validate_only: bool = False) -> SearchTypeRecord | None

Create a SAND type configuration.

Arguments:

  • body - Raw or generated type-definition payload.
  • validate_only - Whether to validate without persisting.

Returns:

The bound search-type record, or None when the server sent no body.

Raises:

  • AdminOperationError - When the server rejects the definition.

create_async​

async def create_async(*,
body: Any,
validate_only: bool = False) -> SearchTypeRecord | None

Asynchronously create a SAND type configuration.

Arguments:

  • body - Raw or generated type-definition payload.
  • validate_only - Whether to validate without persisting.

Returns:

The bound search-type record, or None when the server sent no body.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
name: str,
body: Any,
validate_only: bool = False,
wait_for_refresh: bool = False,
if_match: str | None = None) -> SearchTypeRecord | None

Update a SAND type configuration.

Arguments:

  • name - Search type name.
  • body - Raw or generated replacement payload.
  • validate_only - Whether to validate without persisting.
  • wait_for_refresh - Whether the service should wait for index refresh.
  • if_match - ETag the type must still have, from SearchTypeRecord.etag. SAND requires the header, so it is read with a get just before the PUT when omitted, which only covers the time between those two requests.

Returns:

The bound search-type record, or None when the server sent no body.

Raises:

  • AdminNotFoundError - When no ETag was passed and the type does not exist.
  • AdminConflictError - When the type changed since the ETag was read (HTTP 412).
  • AdminOperationError - When the server rejects the call, or sent no ETag to read.

update_async​

async def update_async(*,
name: str,
body: Any,
validate_only: bool = False,
wait_for_refresh: bool = False,
if_match: str | None = None) -> SearchTypeRecord | None

Asynchronously update a SAND type configuration.

Arguments:

  • name - Search type name.
  • body - Raw or generated replacement payload.
  • validate_only - Whether to validate without persisting.
  • wait_for_refresh - Whether the service should wait for index refresh.
  • if_match - ETag the type must still have, from SearchTypeRecord.etag. SAND requires the header, so it is read with a get just before the PUT when omitted, which only covers the time between those two requests.

Returns:

The bound search-type record, or None when the server sent no body.

Raises:

  • AdminNotFoundError - When no ETag was passed and the type does not exist.
  • AdminConflictError - When the type changed since the ETag was read (HTTP 412).
  • AdminOperationError - When the server rejects the call, or sent no ETag to read.

delete​

def delete(*, name: str) -> None

Delete a SAND type configuration by name.

Arguments:

  • name - Search type name.

Raises:

  • AdminNotFoundError - When no type of that name exists (HTTP 404).
  • AdminOperationError - When the server refuses the delete.

delete_async​

async def delete_async(*, name: str) -> None

Asynchronously delete a SAND type configuration by name.

Arguments:

  • name - Search type name.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminOperationError - As for delete.

IconsService Objects​

class IconsService(_AdminServiceBase)

Service for icon metadata and binary content lookups.

Arguments:

  • datahub_api - Generated Data Hub API namespace used for icon calls.

list​

def list(*, object_type_name: str | None = None) -> builtins.list[IconRecord]

List icon metadata, optionally scoped to one object type.

Arguments:

  • object_type_name - Optional entity/object type name.

Returns:

Bound icon records.

list_async​

async def list_async(*,
object_type_name: str | None = None
) -> builtins.list[IconRecord]

Async variant of list.

Arguments:

  • object_type_name - Optional entity/object type name.

Returns:

Bound icon records.

get​

def get(*, name: str) -> IconRecord | None

Fetch icon metadata by icon name.

Arguments:

  • name - Icon name.

Returns:

The bound icon record, or None when not found.

get_async​

async def get_async(*, name: str) -> IconRecord | None

Async variant of get.

Arguments:

  • name - Icon name.

Returns:

The bound icon record, or None when not found.

bytes​

def bytes(*, name: str) -> builtins.bytes | object | None

Fetch raw icon bytes by icon name.

Arguments:

  • name - Icon name.

Returns:

The icon's bytes (the image file), None when the server sent no body, or the parsed payload when the generated operation decoded a non-binary answer.

Raises:

  • AdminNotFoundError - When no icon of that name exists (HTTP 404).
  • AdminOperationError - When the server rejects the call.

bytes_async​

async def bytes_async(*, name: str) -> builtins.bytes | object | None

Async variant of bytes.

Arguments:

  • name - Icon name.

Returns:

As for bytes.

Raises:

  • AdminNotFoundError - As for bytes.
  • AdminOperationError - As for bytes.

bytes_by_name​

def bytes_by_name(*, object_type_name: str) -> builtins.bytes | object | None

Fetch raw icon bytes for an object type's default icon.

Arguments:

  • object_type_name - Entity/object type name.

Returns:

The icon's bytes, None when the server sent no body, or the parsed payload when the generated operation decoded a non-binary answer.

Raises:

  • AdminNotFoundError - When the object type has no icon (HTTP 404).
  • AdminOperationError - When the server rejects the call.

bytes_by_name_async​

async def bytes_by_name_async(
*, object_type_name: str) -> builtins.bytes | object | None

Async variant of bytes_by_name.

Arguments:

  • object_type_name - Entity/object type name.

Returns:

As for bytes_by_name.

Raises:

  • AdminNotFoundError - As for bytes_by_name.
  • AdminOperationError - As for bytes_by_name.

decoration​

def decoration(*, object_type_name: str) -> IconDecorationRecord | None

Fetch icon decoration metadata for an object type.

Arguments:

  • object_type_name - Entity/object type name.

Returns:

The bound icon-decoration record, or None when not found.

decoration_async​

async def decoration_async(
*, object_type_name: str) -> IconDecorationRecord | None

Async variant of decoration.

Arguments:

  • object_type_name - Entity/object type name.

Returns:

The bound icon-decoration record, or None when not found.

SolutionPublishRecord Objects​

class SolutionPublishRecord(RawBackedHandle)

Result of one solution publish: counts and the items that failed.

Arguments:

  • raw - Generated SolutionPublishResult payload or mapping.

solution_name​

@property
def solution_name() -> str | None

The published solution's name.

solution_label​

@property
def solution_label() -> str | None

The published solution's localized label.

successful​

@property
def successful() -> int | None

How many items the server published.

failed​

@property
def failed() -> int | None

How many items the server could not publish.

results​

@property
def results() -> builtins.list[JsonObject]

The per-item results as plain dicts, as the server listed them.

errors​

@property
def errors() -> builtins.list[JsonObject]

Every error the server reported, one dict per failed item error.

Each dict carries the item's type, name and label next to the error's own name and message.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the publish result.

SolutionsService Objects​

class SolutionsService(_AdminServiceBase)

Service for solution publishing operations.

Arguments:

  • datahub_api - Generated Data Hub API namespace used for solution calls.

publish​

def publish(*,
solution_name: str,
body: Any | None = None) -> SolutionPublishRecord | None

Publish a solution's configuration (POST /solutions/{name}/publish).

The operation is synchronous: the server answers with the counts once every item has been tried.

Arguments:

  • solution_name - Solution name.
  • body - Optional raw payload. The spec says the request body is empty, so an empty JSON object is sent when omitted.

Returns:

The publish result, or None when the server sent no body.

Raises:

  • AdminOperationError - When the server rejects the call, or when it answers 200 with failed > 0; the message and details then name every failed item, and raw holds the result.

publish_async​

async def publish_async(
*,
solution_name: str,
body: Any | None = None) -> SolutionPublishRecord | None

Async variant of publish.

Arguments:

  • solution_name - Solution name.
  • body - Optional raw payload; an empty JSON object when omitted.

Returns:

The publish result, or None when the server sent no body.

Raises:

  • AdminOperationError - As for publish.

Styling-condition records and the ConditionsService handle.

ConditionsService Objects​

class ConditionsService(_AdminServiceBase)

Service for evaluating configuration conditions.

Arguments:

  • datahub_api - Generated Data Hub API namespace used for condition calls.

evaluate​

def evaluate(*, body: Any) -> object | None

Evaluate a configuration condition payload.

Arguments:

  • body - Raw or generated condition-evaluation payload.

Returns:

The generated evaluation response payload.

Raises:

  • AdminOperationError - When body is neither the generated model nor a mapping it accepts (nothing is sent), or the server rejects the evaluation.

evaluate_async​

async def evaluate_async(*, body: Any) -> object | None

Asynchronously evaluate a configuration condition payload.

Arguments:

  • body - Raw or generated condition-evaluation payload.

Returns:

The generated evaluation response payload.

Raises:

  • AdminOperationError - When body is neither the generated model nor a mapping it accepts (nothing is sent), or the server rejects the evaluation.

Task-named configuration export and import: client.admin.config.

One entry point for both export formats, so a caller looking for "export the configuration" does not need to know which SAS service produces it:

  • the archive: the complete SAS transport archive, delegated to TransportService (client.admin.transport);
  • the bundle: the SDK's SAND/alerts bundle, built from the SAND and alerts configuration endpoints.

ConfigService Objects​

class ConfigService()

Export and import tenant configuration as an archive or a bundle.

Arguments:

  • sand_api - Generated SAND namespace.
  • alerts_api - Generated alerts namespace.
  • transport - The transport service that produces and applies archives.

export_archive​

@overload
def export_archive(*,
timeout: float = ...,
to_path: None = None,
overwrite: bool = ...) -> TransportArchive

export_archive​

@overload
def export_archive(*,
timeout: float = ...,
to_path: str | PathLike[str],
overwrite: bool = ...) -> Path

export_archive​

def export_archive(*,
timeout: float = DEFAULT_EXPORT_TIMEOUT_SECONDS,
to_path: str | PathLike[str] | None = None,
overwrite: bool = False) -> TransportArchive | Path

Export the tenant's complete configuration as a transport archive.

Arguments:

  • timeout - Per-request timeout in seconds.
  • to_path - Stream the archive to this file instead of returning it, so it is never held in memory. See TransportService.export_all.
  • overwrite - With to_path, replace an existing file.

Returns:

The validated transport archive (save it with save_zip), or the path written when to_path is given.

Raises:

  • ValueError - If timeout is not a positive number.
  • AdminOperationError - If the server rejects the export or returns something that is not a transport archive.
  • AdminNotFoundError - If the tenant has no svi-transport service.
  • ResponseTooLargeError - If the archive exceeds max_response_bytes.
  • FileExistsError - If to_path exists and overwrite is False.
  • NetworkError - If the request failed before a complete response arrived. The export is a POST and is never retried.

export_archive_async​

@overload
async def export_archive_async(*,
timeout: float = ...,
to_path: None = None,
overwrite: bool = ...) -> TransportArchive

export_archive_async​

@overload
async def export_archive_async(*,
timeout: float = ...,
to_path: str | PathLike[str],
overwrite: bool = ...) -> Path

export_archive_async​

async def export_archive_async(
*,
timeout: float = DEFAULT_EXPORT_TIMEOUT_SECONDS,
to_path: str | PathLike[str] | None = None,
overwrite: bool = False) -> TransportArchive | Path

Async variant of export_archive.

Arguments:

  • timeout - Seconds to allow for the export. Tenant-wide exports are slow; the default is generous for that reason.
  • to_path - Stream the archive to this file instead of returning it.
  • overwrite - With to_path, replace an existing file.

Returns:

The exported transport archive, or the path written when to_path is given.

import_archive​

def import_archive(
source: TransportArchive | str | PathLike[str] | bytes | BinaryIO,
*,
wait: bool = True,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS,
poll_interval: float = DEFAULT_POLL_INTERVAL_SECONDS
) -> TransportImportResult

Import a transport archive into the tenant.

The import is an upsert: objects whose natural key matches are replaced, new ones are added, and existing objects missing from the archive are left alone. See TransportService.import_all for the full contract.

Arguments:

  • source - Transport archive, ZIP path, ZIP bytes, or binary file.
  • wait - Poll a queued (HTTP 202) import job until it finishes.
  • timeout - Upload timeout, and the overall job-polling budget, in seconds.
  • poll_interval - Base seconds between job status checks (jittered).

Returns:

The import result.

import_archive_async​

async def import_archive_async(
source: TransportArchive | str | PathLike[str] | bytes | BinaryIO,
*,
wait: bool = True,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS,
poll_interval: float = DEFAULT_POLL_INTERVAL_SECONDS
) -> TransportImportResult

Async variant of import_archive.

Arguments:

  • source - The archive to import, as a TransportArchive, a path, raw bytes, or an open binary file.
  • wait - Whether to poll until the import job finishes.
  • timeout - Seconds to allow for the import, including any wait.
  • poll_interval - Seconds between job-status polls when wait.

Returns:

The import result.

load_archive​

def load_archive(
source: str | PathLike[str] | bytes | BinaryIO) -> TransportArchive

Load a transport archive ZIP from a path, bytes, or binary file.

Arguments:

  • source - Path to the ZIP, its bytes, or an open binary file.

Returns:

The loaded transport archive.

export_bundle​

def export_bundle(
*, include: Sequence[str] = (SAND_COMPONENT, ALERTS_COMPONENT)
) -> ConfigurationBundle

Export SAND and/or alerts configuration into an SDK bundle.

Arguments:

  • include - Components to export: "sand", "alerts", or both.

Returns:

A portable configuration bundle that can be saved as a ZIP.

Raises:

  • AdminOperationError - If include names an unknown component or none, or the server rejects an export or answers with no payload.

export_bundle_async​

async def export_bundle_async(
*, include: Sequence[str] = (SAND_COMPONENT, ALERTS_COMPONENT)
) -> ConfigurationBundle

Asynchronously export SAND and/or alerts configuration into an SDK bundle.

Arguments:

  • include - Components to export: "sand", "alerts", or both.

Returns:

A portable configuration bundle that can be saved as a ZIP.

Raises:

  • AdminOperationError - If include names an unknown component or none, or the server rejects an export or answers with no payload.

export_bundle_zip​

def export_bundle_zip(path: str | PathLike[str],
*,
include: Sequence[str] = (SAND_COMPONENT,
ALERTS_COMPONENT),
overwrite: bool = False) -> ConfigurationBundle

Export an SDK bundle and save it as a ZIP.

Arguments:

  • path - Destination file to write the ZIP to.
  • include - Components to export; defaults to SAND and alerts.
  • overwrite - Whether to replace path when it already exists.

Returns:

The exported bundle; the ZIP is at path.

Raises:

  • AdminOperationError - As for export_bundle.
  • FileExistsError - If path exists and overwrite is False.

export_bundle_zip_async​

async def export_bundle_zip_async(
path: str | PathLike[str],
*,
include: Sequence[str] = (SAND_COMPONENT, ALERTS_COMPONENT),
overwrite: bool = False) -> ConfigurationBundle

Asynchronously export an SDK bundle and save it as a ZIP.

The exports are awaited; writing the ZIP is a local file write.

Arguments:

  • path - Destination file to write the ZIP to.
  • include - Components to export; defaults to SAND and alerts.
  • overwrite - Whether to replace path when it already exists.

Returns:

The exported bundle; the ZIP is at path.

Raises:

  • AdminOperationError - As for export_bundle_async.
  • FileExistsError - If path exists and overwrite is False.

load_bundle​

def load_bundle(
source: str | PathLike[str] | bytes | BinaryIO) -> ConfigurationBundle

Load an SDK configuration bundle ZIP from a path, bytes, or binary file.

Arguments:

  • source - Path to the ZIP, its bytes, or an open binary file.

Returns:

The loaded configuration bundle.

import_bundle​

def import_bundle(
source: ConfigurationBundle | str | PathLike[str] | bytes | BinaryIO,
*,
include: Sequence[str] | None = None,
validate_only: bool = False,
wait_for_refresh: bool = False,
alerts_async: bool = False,
job_id: str | None = None,
task_id: str | None = None,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS
) -> ConfigurationImportResult

Import one or more configuration components from an SDK bundle.

Arguments:

  • source - Bundle object, ZIP path, ZIP bytes, or binary file.
  • include - Optional subset of bundle components to import.
  • validate_only - Validate SAND configuration without persisting it. Alerts are skipped.
  • wait_for_refresh - Whether SAND import should wait for index refresh.
  • alerts_async - Queue the alerts import as a server job instead of waiting for it. Needs job_id and task_id.
  • job_id - Job id the server tracks the queued alerts import under.
  • task_id - Task id within that job.
  • timeout - Timeout in seconds for each component's import request. A SAND import rewrites every entity type and can run for minutes, well past the client-wide SVIConfig.timeout.

Returns:

Typed import result for all attempted components. When the server queued a component (HTTP 202), that component and the result are pending and success is False: nothing confirms the import was applied yet. A validated SAND component carries validated_only=True. When every selected component was skipped (validate_only=True on an alerts-only selection), nothing was checked and success is False.

Raises:

  • AdminOperationError - If alerts_async is set without both job_id and task_id. Nothing is sent in that case.
  • ValueError - If timeout is not a positive number. Nothing is sent.
  • ConfigurationImportError - If the server rejects a component. It carries the rejection's status_code, error_code and details, and result holds every component attempted.
  • NetworkError - If a component's request failed without a complete response. result holds the partial import; when outcome_unknown is true the failed component is pending, because the server may have applied it.
  • MalformedResponseError - If a component's success response could not be read. result is attached the same way.

import_bundle_async​

async def import_bundle_async(
source: ConfigurationBundle | str | PathLike[str] | bytes | BinaryIO,
*,
include: Sequence[str] | None = None,
validate_only: bool = False,
wait_for_refresh: bool = False,
alerts_async: bool = False,
job_id: str | None = None,
task_id: str | None = None,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS
) -> ConfigurationImportResult

Asynchronously import one or more configuration components from an SDK bundle.

The coroutine twin of import_bundle, with the same arguments, result and errors. Reading a bundle from a path is a local file read.

Arguments:

  • source - Bundle object, ZIP path, ZIP bytes, or binary file.
  • include - Optional subset of bundle components to import.
  • validate_only - Validate SAND configuration without persisting it. Alerts are skipped.
  • wait_for_refresh - Whether SAND import should wait for index refresh.
  • alerts_async - Queue the alerts import as a server job instead of waiting for it. Needs job_id and task_id.
  • job_id - Job id the server tracks the queued alerts import under.
  • task_id - Task id within that job.
  • timeout - Timeout in seconds for each component's import request.

Returns:

Typed import result for all attempted components; see import_bundle for pending, validated_only and success.

Raises:

  • AdminOperationError - If alerts_async is set without both job_id and task_id. Nothing is sent in that case.
  • ValueError - If timeout is not a positive number. Nothing is sent.
  • ConfigurationImportError - If the server rejects a component. result holds every component attempted.
  • NetworkError - If a component's request failed without a complete response. result holds the partial import.
  • MalformedResponseError - If a component's success response could not be read. result is attached the same way.

import_bundle_zip​

def import_bundle_zip(path: str | PathLike[str],
**import_options: Any) -> ConfigurationImportResult

Load and import an SDK configuration bundle ZIP.

Arguments:

  • path - Path to the bundle ZIP to load and import.
  • **import_options - Options forwarded to import_bundle.

Returns:

The import result.

Raises:

  • AdminOperationError - As for import_bundle, or when the ZIP is not a configuration bundle.
  • ConfigurationImportError - If the server rejects a component.

import_bundle_zip_async​

async def import_bundle_zip_async(
path: str | PathLike[str],
**import_options: Any) -> ConfigurationImportResult

Asynchronously load and import an SDK configuration bundle ZIP.

Loading the ZIP is a local file read; the import is awaited.

Arguments:

  • path - Path to the bundle ZIP to load and import.
  • **import_options - Options forwarded to import_bundle_async.

Returns:

The import result.

Raises:

  • AdminOperationError - As for import_bundle_async, or when the ZIP is not a configuration bundle.
  • ConfigurationImportError - If the server rejects a component.

SAND/alerts configuration packages, bundles, and the alerts package service.

SandConfigurationPackage Objects​

@dataclass(frozen=True)
class SandConfigurationPackage()

SAND search/entity visualization configuration payload.

payload​

version​

@property
def version() -> int | None

The SAND configuration schema version, if present.

type_names​

@property
def type_names() -> tuple[str, ...]

The names of the object types defined in this SAND configuration.

type_count​

@property
def type_count() -> int

The number of object types defined in this SAND configuration.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the package.

raw_dict​

def raw_dict() -> JsonObject

Return a deep copy of the full SAND configuration payload.

to_model​

def to_model() -> SandConfiguration

Return the payload as a generated SandConfiguration model.

save_json​

def save_json(path: str | PathLike[str], *, overwrite: bool = False) -> None

Write the SAND configuration to path as JSON.

Arguments:

  • path - Destination file path.
  • overwrite - Replace an existing file when True; otherwise a pre-existing file raises FileExistsError.

AlertsConfigurationPackage Objects​

@dataclass(frozen=True)
class AlertsConfigurationPackage()

Alerts native configuration ZIP package.

payload​

byte_size​

@property
def byte_size() -> int

The size of the alerts configuration ZIP in bytes.

sha256​

@property
def sha256() -> str

The hex-encoded SHA-256 digest of the alerts configuration ZIP.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the package.

raw_bytes​

def raw_bytes() -> bytes

Return a copy of the raw alerts configuration ZIP bytes.

save_zip​

def save_zip(path: str | PathLike[str], *, overwrite: bool = False) -> None

Write the alerts configuration ZIP to path.

Arguments:

  • path - Destination file path.
  • overwrite - Replace an existing file when True; otherwise a pre-existing file raises FileExistsError.

ConfigurationComponentImportResult Objects​

@dataclass(frozen=True)
class ConfigurationComponentImportResult()

Import outcome for a single configuration component (sand or alerts).

component​

success​

skipped​

message​

status_code​

raw​

pending​

job_id​

task_id​

validated_only​

state​

@property
def state() -> str

One word for the outcome: skipped, pending, validated, ok or failed.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the component result.

raw_dict​

def raw_dict() -> JsonObject

Return the component result including the raw server response.

ConfigurationImportResult Objects​

@dataclass(frozen=True)
class ConfigurationImportResult()

Aggregate outcome of importing a configuration bundle's components.

components​

success​

@property
def success() -> bool

Whether every component imported or was skipped, none is queued, and one at least ran.

validated_only​

@property
def validated_only() -> bool

Whether every component that ran was only validated, not applied.

pending​

@property
def pending() -> bool

Whether the server queued a component and has not reported it finished.

sand​

@property
def sand() -> ConfigurationComponentImportResult | None

The SAND component's import result, or None if not included.

alerts​

@property
def alerts() -> ConfigurationComponentImportResult | None

The alerts component's import result, or None if not included.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the import result.

raw_dict​

def raw_dict() -> JsonObject

Return the import result including each component's raw response.

ConfigurationBundle Objects​

class ConfigurationBundle()

Portable SDK-owned bundle for SAND JSON and alerts ZIP configuration.

components​

@property
def components() -> tuple[str, ...]

The component names present in this bundle (sand and/or alerts).

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the bundle.

to_zip_bytes​

def to_zip_bytes() -> bytes

Serialize the bundle (manifest plus components) to ZIP bytes.

save_zip​

def save_zip(path: str | PathLike[str], *, overwrite: bool = False) -> None

Write the bundle ZIP to path.

Arguments:

  • path - Destination file path.
  • overwrite - Replace an existing file when True; otherwise a pre-existing file raises FileExistsError.

from_zip​

@classmethod
def from_zip(cls,
source: str | PathLike[str] | bytes | BinaryIO,
*,
max_bytes: int | None = None) -> ConfigurationBundle

Load a configuration bundle previously written by to_zip_bytes.

Arguments:

  • source - Bundle ZIP as a path, raw bytes, or binary file object.
  • max_bytes - Largest source ZIP to read, in bytes. Defaults to 256 MiB. client.admin.config.load_bundle passes the client's max_response_bytes when that is larger. The limits on how far each entry may expand are separate and do not move.

Returns:

The reconstructed ConfigurationBundle.

Raises:

  • AdminOperationError - If the source is not a valid bundle ZIP, is larger than max_bytes, is missing its manifest, has an unexpected manifest format, cannot be read from its path, or is corrupt, encrypted or otherwise unreadable.

AlertsPackageService Objects​

class AlertsPackageService(_AdminServiceBase)

Service for importing and exporting alerts configuration packages.

Arguments:

  • alerts_api - Generated Alerts API namespace used for package operations.

export_package​

def export_package() -> AlertsConfigurationPackage

Export the alerts configuration package.

Returns:

The package, whose raw_bytes() is the ZIP the service sent. Pass it back to import_package to import it elsewhere.

Raises:

  • AdminOperationError - When the server rejects the call or answers with no ZIP payload.

export_package_async​

async def export_package_async() -> AlertsConfigurationPackage

Asynchronously export the alerts configuration package.

Returns:

The package, whose raw_bytes() is the ZIP the service sent. Pass it back to import_package_async to import it elsewhere.

Raises:

  • AdminOperationError - When the server rejects the call or answers with no ZIP payload.

import_package​

def import_package(
*, body: AlertsConfigurationPackage | bytes | BinaryIO | Any
) -> object | None

Import an alerts configuration package synchronously.

Arguments:

  • body - The package ZIP: an AlertsConfigurationPackage (what export_package returns), its bytes, an open binary file, or the generated File. A mapping is refused.

Returns:

The generated service response payload.

Raises:

  • AdminOperationError - When body is a mapping or another type the service cannot send (nothing is sent), or the server rejects the package.

import_package_async​

async def import_package_async(
*, body: AlertsConfigurationPackage | bytes | BinaryIO | Any
) -> object | None

Asynchronously import an alerts configuration package.

The import itself is synchronous on the server, as for import_package; only the client side is a coroutine.

Arguments:

  • body - The package ZIP: an AlertsConfigurationPackage (what export_package_async returns), its bytes, an open binary file, or the generated File. A mapping is refused.

Returns:

The generated service response payload.

Raises:

  • AdminOperationError - When body is a mapping or another type the service cannot send (nothing is sent), or the server rejects the package.

import_package_job​

def import_package_job(*, body: Any, job_id: str,
task_id: str) -> object | None

Import an alerts configuration package as a server-side async job.

This is a synchronous call that submits an async import job on the server; it is not a coroutine. Renamed from import_package_async so the _async suffix stays reserved for Python coroutines.

Arguments:

  • body - The package ZIP, as for import_package.
  • job_id - Job id the server tracks the import under. Required by the endpoint.
  • task_id - Task id within that job. Required by the endpoint.

Returns:

The generated async-import response payload. The server answers

  • 202 - the import is queued, not finished.

Raises:

  • AdminOperationError - If job_id or task_id is empty, or body is a mapping or another type the service cannot send.

import_package_job_async​

async def import_package_job_async(*, body: Any, job_id: str,
task_id: str) -> object | None

Asynchronously submit an alerts configuration import as a server-side job.

The coroutine twin of import_package_job: it awaits the submission, and the server still answers 202 with the import queued.

Arguments:

  • body - The package ZIP, as for import_package.
  • job_id - Job id the server tracks the import under. Required by the endpoint.
  • task_id - Task id within that job. Required by the endpoint.

Returns:

The generated async-import response payload. The server answers

  • 202 - the import is queued, not finished.

Raises:

  • AdminOperationError - If job_id or task_id is empty, or body is a mapping or another type the service cannot send.

Data-store, transaction-type, triage, routing, and enrichment-field services.

TriageDefinitionInput Objects​

@dataclass(frozen=True, slots=True)
class TriageDefinitionInput(_TypedInput)

Typed input for creating or replacing an alert triage definition.

None fields are left unset so the server applies its defaults.

Attributes:

  • triage_definition_name - Display name (required).
  • triage_definition_id - Definition id; filled from the path on update when omitted.
  • triage_definition_description - Descriptive text.
  • default_sort_field_name - Field the alert list sorts by.
  • default_sort_order_code - Sort order for that field.
  • default_filter_text - Default filter applied to the alert list.
  • column_definitions_json - Column definitions, as raw mappings.

triage_definition_name​

triage_definition_id​

triage_definition_description​

default_sort_field_name​

default_sort_order_code​

default_filter_text​

column_definitions_json​

to_payload​

def to_payload() -> TriageDefinitionRep

Return the generated TriageDefinitionRep (None fields stay UNSET).

RoutingRuleInput Objects​

@dataclass(frozen=True, slots=True)
class RoutingRuleInput(_TypedInput)

Typed input for creating or replacing an alert routing rule.

None fields are left unset so the server applies its defaults.

Attributes:

  • routing_rule_name - Display name (required).
  • routing_rule_id - Rule id; filled from the path on update when omitted.
  • queue_id - Queue alerts matching the rule are routed to.
  • routing_rule_description - Descriptive text.
  • user_created_routing_rule_flag - Whether the rule was created by a user.
  • routing_rule_priority - Priority relative to other rules.
  • routing_rule_status_code - Lifecycle status.
  • disjunction_flag - Whether the expressions combine with OR (else AND).
  • logic_expressions - The rule's conditions as LogicExpressionInput values or raw mappings.

routing_rule_name​

routing_rule_id​

queue_id​

routing_rule_description​

user_created_routing_rule_flag​

routing_rule_priority​

routing_rule_status_code​

disjunction_flag​

logic_expressions​

to_payload​

def to_payload() -> RoutingRuleRep

Return the generated RoutingRuleRep (None fields stay UNSET).

EnrichmentFieldInput Objects​

@dataclass(frozen=True, slots=True)
class EnrichmentFieldInput(_TypedInput)

Typed input for creating or replacing an alert enrichment field.

None fields are left unset so the server applies its defaults.

Attributes:

  • enrichment_field_name - Field name (required).
  • enrichment_field_id - Field id; filled from the path on update when omitted.
  • enrichment_field_header - Column header shown in the alert grid.
  • enrichment_field_label - Display label.
  • enrichment_field_description - Descriptive text.
  • enrichment_field_id_data_type_code - Data type code of the field.
  • solution_id - Owning solution id.

enrichment_field_name​

enrichment_field_id​

enrichment_field_header​

enrichment_field_label​

enrichment_field_description​

enrichment_field_id_data_type_code​

solution_id​

to_payload​

def to_payload() -> EnrichmentFieldRep

Return the generated EnrichmentFieldRep (None fields stay UNSET).

DataStoresService Objects​

class DataStoresService(_AdminServiceBase)

Service for listing and inspecting configured data stores.

list​

def list(*, include_internal: bool = False) -> builtins.list[DataStoreRecord]

List configured data stores.

Arguments:

  • include_internal - Whether internal data stores should be included.

Returns:

The generated data-store collection payload.

list_async​

async def list_async(*,
include_internal: bool = False
) -> builtins.list[DataStoreRecord]

Asynchronously list configured data stores.

Arguments:

  • include_internal - Whether internal data stores should be included.

Returns:

The generated data-store collection payload.

get​

def get(*, data_store_id: str) -> DataStoreRecord | None

Fetch one data store by id, keeping the response ETag.

Arguments:

  • data_store_id - Data-store identifier.

Returns:

The bound data-store record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(*, data_store_id: str) -> DataStoreRecord | None

Asynchronously fetch one data store by id, keeping the response ETag.

Arguments:

  • data_store_id - Data-store identifier.

Returns:

The bound data-store record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_by_name​

def get_by_name(*, name: str) -> DataStoreRecord | None

Fetch one data store by name.

Arguments:

  • name - Data-store name.

Returns:

The bound data-store record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_by_name_async​

async def get_by_name_async(*, name: str) -> DataStoreRecord | None

Asynchronously fetch one data store by name.

Arguments:

  • name - Data-store name.

Returns:

The bound data-store record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*, body: Any) -> DataStoreRecord | None

Create a data store from a raw/generated payload.

Arguments:

  • body - Raw or generated data-store create payload.

Returns:

The generated create response payload.

create_async​

async def create_async(*, body: Any) -> DataStoreRecord | None

Asynchronously create a data store from a raw/generated payload.

Arguments:

  • body - Raw or generated data-store create payload.

Returns:

The generated create response payload.

update​

def update(*,
data_store_id: str,
body: Any,
if_match: str | None = None,
force: bool = False) -> DataStoreRecord | None

Replace a data store by id, guarded by If-Match.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the data store's current ETag is read just before the PUT, which only covers the time between those two requests.

Arguments:

  • data_store_id - Data-store identifier.
  • body - Raw or generated replacement payload.
  • if_match - ETag the data store must still have, from DataStoreRecord.etag.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound data-store record.

Raises:

  • AdminConflictError - When the data store changed since the ETag was read (HTTP 412).
  • AdminOperationError - When the server rejects the call.

update_async​

async def update_async(*,
data_store_id: str,
body: Any,
if_match: str | None = None,
force: bool = False) -> DataStoreRecord | None

Asynchronously replace a data store by id, guarded by If-Match.

Arguments:

  • data_store_id - Data-store identifier.
  • body - Raw or generated replacement payload.
  • if_match - ETag the data store must still have, from DataStoreRecord.etag. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound data-store record.

Raises:

  • AdminConflictError - As for update.
  • AdminOperationError - As for update.

delete​

def delete(*, data_store_id: str) -> None

Delete a data store by id.

The SDK runs no referential pre-check; the server refuses a data store that is still in use.

Arguments:

  • data_store_id - Data-store identifier.

Raises:

  • AdminNotFoundError - When no data store has that id (HTTP 404).
  • AdminConflictError - When the server reports a conflict (HTTP 409).
  • AdminOperationError - When the server refuses the delete for any other reason, such as a data store still referenced by an entity type (HTTP 400).

delete_async​

async def delete_async(*, data_store_id: str) -> None

Asynchronously delete a data store by id.

Arguments:

  • data_store_id - Data-store identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminConflictError - As for delete.
  • AdminOperationError - As for delete.

test_connection​

def test_connection(*, body: Any) -> object | None

Test a data-store connection definition.

Arguments:

  • body - Raw or generated connection-test payload.

Returns:

The generated test-connection response payload.

test_connection_async​

async def test_connection_async(*, body: Any) -> object | None

Asynchronously test a data-store connection definition.

Arguments:

  • body - Raw or generated connection-test payload.

Returns:

The generated test-connection response payload.

repair​

def repair(*, data_store_name: str, body: Any) -> object | None

Run the repair operation for a named data store.

Arguments:

  • data_store_name - Data-store name.
  • body - Raw or generated repair payload.

Returns:

The generated repair response payload.

repair_async​

async def repair_async(*, data_store_name: str, body: Any) -> object | None

Asynchronously run the repair operation for a named data store.

Arguments:

  • data_store_name - Data-store name.
  • body - Raw or generated repair payload.

Returns:

The generated repair response payload.

default​

def default() -> DataStoreRecord | None

Return the default data store configuration.

Returns:

The bound default data-store record.

Raises:

  • AdminOperationError - When the server rejects the call.

default_async​

async def default_async() -> DataStoreRecord | None

Asynchronously return the default data store configuration.

Returns:

The bound default data-store record.

Raises:

  • AdminOperationError - When the server rejects the call.

supported_database_types​

def supported_database_types(*, include_all: bool = False) -> object | None

List supported database types for data stores.

Arguments:

  • include_all - Whether all database types should be returned.

Returns:

The generated supported-database-types payload.

Raises:

  • AdminOperationError - When the server rejects the call.

supported_database_types_async​

async def supported_database_types_async(*,
include_all: bool = False
) -> object | None

Asynchronously list supported database types for data stores.

Arguments:

  • include_all - Whether all database types should be returned.

Returns:

The generated supported-database-types payload.

Raises:

  • AdminOperationError - When the server rejects the call.

credentials​

def credentials(*, data_store_id: str) -> object | None

Return the data store's user name and Base64-encoded password.

The value is a secret. Do not log it, print it, or write it to a notebook output; the service grants this read only to administrators for that reason.

Arguments:

  • data_store_id - Data-store identifier.

Returns:

A mapping with the user name and the Base64-encoded password, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

credentials_async​

async def credentials_async(*, data_store_id: str) -> object | None

Asynchronously return the data store's user name and Base64-encoded password.

The value is a secret; see credentials.

Arguments:

  • data_store_id - Data-store identifier.

Returns:

A mapping with the user name and the Base64-encoded password, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

table_names​

def table_names(*, data_store_id: str) -> object | None

List table names available in a data store.

Arguments:

  • data_store_id - Data-store identifier.

Returns:

The generated table-name collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

table_names_async​

async def table_names_async(*, data_store_id: str) -> object | None

Asynchronously list table names available in a data store.

Arguments:

  • data_store_id - Data-store identifier.

Returns:

The generated table-name collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

table_details​

def table_details(*, data_store_id: str, table_name: str) -> object | None

Fetch table metadata for one data-store table.

Arguments:

  • data_store_id - Data-store identifier.
  • table_name - Table name.

Returns:

The generated table-details payload.

Raises:

  • AdminOperationError - When the server rejects the call.

table_details_async​

async def table_details_async(*, data_store_id: str,
table_name: str) -> object | None

Asynchronously fetch table metadata for one data-store table.

Arguments:

  • data_store_id - Data-store identifier.
  • table_name - Table name.

Returns:

The generated table-details payload.

Raises:

  • AdminOperationError - When the server rejects the call.

TransactionTypesService Objects​

class TransactionTypesService(_AdminServiceBase)

Service for listing configured transaction types.

list​

def list() -> builtins.list[TransactionTypeRecord]

List configured transaction types.

Returns:

Bound transaction-type records.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async() -> builtins.list[TransactionTypeRecord]

Asynchronously list configured transaction types.

Returns:

Bound transaction-type records.

Raises:

  • AdminOperationError - When the server rejects the call.

get​

def get(*, transaction_type_id: str) -> TransactionTypeRecord | None

Fetch one transaction type by id.

Arguments:

  • transaction_type_id - Transaction-type identifier.

Returns:

The generated transaction-type payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(*,
transaction_type_id: str) -> TransactionTypeRecord | None

Asynchronously fetch one transaction type by id.

Arguments:

  • transaction_type_id - Transaction-type identifier.

Returns:

The generated transaction-type payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_by_name​

def get_by_name(*, name: str) -> TransactionTypeRecord | None

Fetch one transaction type by name.

Arguments:

  • name - Transaction-type name.

Returns:

The generated transaction-type payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_by_name_async​

async def get_by_name_async(*, name: str) -> TransactionTypeRecord | None

Asynchronously fetch one transaction type by name.

Arguments:

  • name - Transaction-type name.

Returns:

The generated transaction-type payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

reconstruct​

def reconstruct(*, transaction_type_id: str) -> TransactionTypeRecord | None

Rebuild a transaction type's field metadata from its database table.

Sends POST /admin/transactions/{transactionTypeId}/reconstruct with no body. The server does not update other services to match, so repair anything downstream of Data Hub yourself.

Arguments:

  • transaction_type_id - The numerical ID of the transaction type.

Returns:

The reconstructed transaction type.

Raises:

  • AdminNotFoundError - When no transaction type has that ID.
  • AdminOperationError - When the server rejects the call.

reconstruct_async​

async def reconstruct_async(
*, transaction_type_id: str) -> TransactionTypeRecord | None

Asynchronously rebuild a transaction type's field metadata from its table.

Sends POST /admin/transactions/{transactionTypeId}/reconstruct with no body. The server does not update other services to match, so repair anything downstream of Data Hub yourself.

Arguments:

  • transaction_type_id - The numerical ID of the transaction type.

Returns:

The reconstructed transaction type.

Raises:

  • AdminNotFoundError - When no transaction type has that ID.
  • AdminOperationError - When the server rejects the call.

TriageDefinitionsService Objects​

class TriageDefinitionsService(_AdminServiceBase)

Service for listing configured alert triage definitions.

list​

def list(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[TriageDefinitionRecord]

List triage definitions.

Reads one page. A WARNING is logged when the server reports more triage definitions than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[TriageDefinitionRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[TriageDefinitionRecord]

List every one of the triage definitions, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[TriageDefinitionRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, triage_definition_id: str) -> TriageDefinitionRecord | None

Fetch one triage definition by id.

Arguments:

  • triage_definition_id - Triage-definition identifier.

Returns:

The generated triage-definition payload, or None when not found.

get_async​

async def get_async(
*, triage_definition_id: str) -> TriageDefinitionRecord | None

Asynchronously fetch one triage definition by id.

Arguments:

  • triage_definition_id - Triage-definition identifier.

Returns:

The bound triage-definition record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
spec: TriageDefinitionInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> TriageDefinitionRecord | None

Create a triage definition.

Arguments:

  • spec - Typed triage-definition input.
  • body - Advanced escape hatch: a raw or generated TriageDefinitionRep payload sent as is. Mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created triage-definition record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, or the server rejects the call.

create_async​

async def create_async(
*,
spec: TriageDefinitionInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> TriageDefinitionRecord | None

Asynchronously create a triage definition.

Arguments:

  • spec - Typed triage-definition input.
  • body - Raw or generated TriageDefinitionRep payload, mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created triage-definition record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
triage_definition_id: str,
spec: TriageDefinitionInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> TriageDefinitionRecord | None

Replace a triage definition by id.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • triage_definition_id - Triage-definition identifier. Filled into spec.triage_definition_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated TriageDefinitionRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the triage definition must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated triage-definition record.

Raises:

  • AdminConflictError - When the triage definition changed since the ETag was read (HTTP 412).
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
triage_definition_id: str,
spec: TriageDefinitionInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> TriageDefinitionRecord | None

Asynchronously replace a triage definition by id.

Arguments:

  • triage_definition_id - Triage-definition identifier.
  • spec - Typed replacement.
  • body - Raw or generated TriageDefinitionRep payload, mutually exclusive with spec.
  • if_match - ETag the triage definition must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated triage-definition record.

Raises:

  • AdminConflictError - When the triage definition changed since the ETag was read (HTTP 412).
  • AdminOperationError - As for update.

RoutingRulesService Objects​

class RoutingRulesService(_AdminServiceBase)

Service for listing configured alert routing rules.

list​

def list(*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[RoutingRuleRecord]

List routing rules.

Reads one page. A WARNING is logged when the server reports more routing rules than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[RoutingRuleRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[RoutingRuleRecord]

List every one of the routing rules, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[RoutingRuleRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, routing_rule_id: str) -> RoutingRuleRecord | None

Fetch one routing rule by id.

Arguments:

  • routing_rule_id - Routing-rule identifier.

Returns:

The generated routing-rule payload, or None when not found.

get_async​

async def get_async(*, routing_rule_id: str) -> RoutingRuleRecord | None

Asynchronously fetch one routing rule by id.

Arguments:

  • routing_rule_id - Routing-rule identifier.

Returns:

The bound routing-rule record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
spec: RoutingRuleInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> RoutingRuleRecord | None

Create a routing rule.

Arguments:

  • spec - Typed routing-rule input.
  • body - Advanced escape hatch: a raw or generated RoutingRuleRep payload sent as is. Mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created routing-rule record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, or the server rejects the call.

create_async​

async def create_async(
*,
spec: RoutingRuleInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> RoutingRuleRecord | None

Asynchronously create a routing rule.

Arguments:

  • spec - Typed routing-rule input.
  • body - Raw or generated RoutingRuleRep payload, mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created routing-rule record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
routing_rule_id: str,
spec: RoutingRuleInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> RoutingRuleRecord | None

Replace a routing rule by id.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • routing_rule_id - Routing-rule identifier. Filled into spec.routing_rule_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated RoutingRuleRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the routing rule must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated routing-rule record.

Raises:

  • AdminConflictError - When the routing rule changed since the ETag was read (HTTP 412).
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
routing_rule_id: str,
spec: RoutingRuleInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> RoutingRuleRecord | None

Asynchronously replace a routing rule by id.

Arguments:

  • routing_rule_id - Routing-rule identifier.
  • spec - Typed replacement.
  • body - Raw or generated RoutingRuleRep payload, mutually exclusive with spec.
  • if_match - ETag the routing rule must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated routing-rule record.

Raises:

  • AdminConflictError - When the routing rule changed since the ETag was read (HTTP 412).
  • AdminOperationError - As for update.

EnrichmentFieldsService Objects​

class EnrichmentFieldsService(_AdminServiceBase)

Service for listing configured alert enrichment fields.

list​

def list(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[EnrichmentFieldRecord]

List enrichment fields.

Reads one page. A WARNING is logged when the server reports more enrichment fields than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[EnrichmentFieldRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[EnrichmentFieldRecord]

List every one of the enrichment fields, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[EnrichmentFieldRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, enrichment_field_id: str) -> EnrichmentFieldRecord | None

Fetch one enrichment field by id.

Arguments:

  • enrichment_field_id - Enrichment-field identifier.

Returns:

The generated enrichment-field payload, or None when not found.

get_async​

async def get_async(*,
enrichment_field_id: str) -> EnrichmentFieldRecord | None

Asynchronously fetch one enrichment field by id.

Arguments:

  • enrichment_field_id - Enrichment-field identifier.

Returns:

The bound enrichment-field record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
spec: EnrichmentFieldInput | None = None,
body: Any | None = None) -> EnrichmentFieldRecord | None

Create an enrichment field.

Arguments:

  • spec - Typed enrichment-field input.
  • body - Advanced escape hatch: a raw or generated EnrichmentFieldRep payload sent as is. Mutually exclusive with spec.

Returns:

The created enrichment-field record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, or the server rejects the call.

create_async​

async def create_async(
*,
spec: EnrichmentFieldInput | None = None,
body: Any | None = None) -> EnrichmentFieldRecord | None

Asynchronously create an enrichment field.

Arguments:

  • spec - Typed enrichment-field input.
  • body - Raw or generated EnrichmentFieldRep payload, mutually exclusive with spec.

Returns:

The created enrichment-field record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
enrichment_field_id: str,
spec: EnrichmentFieldInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> EnrichmentFieldRecord | None

Replace an enrichment field by id.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • enrichment_field_id - Enrichment-field identifier. Filled into spec.enrichment_field_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated EnrichmentFieldRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the enrichment field must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated enrichment-field record.

Raises:

  • AdminConflictError - When the enrichment field changed since the ETag was read (HTTP 412).
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
enrichment_field_id: str,
spec: EnrichmentFieldInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> EnrichmentFieldRecord | None

Asynchronously replace an enrichment field by id.

Arguments:

  • enrichment_field_id - Enrichment-field identifier.
  • spec - Typed replacement.
  • body - Raw or generated EnrichmentFieldRep payload, mutually exclusive with spec.
  • if_match - ETag the enrichment field must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated enrichment-field record.

Raises:

  • AdminConflictError - When the enrichment field changed since the ETag was read (HTTP 412).
  • AdminOperationError - As for update.

Alert-disposition records/requirements and the AlertDispositionsService handle.

AlertDispositionInput Objects​

@dataclass(frozen=True, slots=True)
class AlertDispositionInput(_TypedInput)

Typed input for creating or replacing an alert disposition.

None fields are left unset so the server applies its defaults.

The alert service requires alert_disposition_resolution_code on a create, though its API definition does not say so. The SDK does not pick one for you, because the code decides how every alert closed with this disposition is reported: AlertDispositionsService.create refuses a spec without it before sending anything.

Attributes:

  • alert_disposition_name - Display name (required).
  • alert_disposition_id - Disposition id; filled from the path on update when omitted.
  • alert_disposition_description - Descriptive text.
  • alert_disposition_resolution_code - Resolution code applied to the alert, such as PRODUCTIVE, NON_PRODUCTIVE or INDETERMINATE. Required on create; the server rejects a value it does not know.
  • auto_close_days - Days after which the alert auto-closes.
  • reroute_queue_prompt_flag - Whether to prompt for a reroute queue.
  • reroute_queue_id - Queue the alert is rerouted to.
  • auto_activate_minutes - Minutes after which the alert reactivates.
  • auto_activate_days - Days after which the alert reactivates.
  • auto_activate_score - Score that reactivates the alert.
  • auto_activate_delta - Score delta that reactivates the alert.
  • auto_activate_percent - Score percentage that reactivates the alert.
  • rest_url - REST URL invoked on disposition.
  • rest_page_template - Page template opened on disposition.
  • document_type - Document type created on disposition.
  • document_type_id - That document type's id.
  • relationship_name - Relationship created to the new document.
  • relationship_type_id - That relationship type's id.
  • scenario_disposition_prompt_flag - Whether to prompt per scenario.
  • grid_display_flag - Whether the disposition shows in the grid.
  • display_order - Ordering among dispositions.
  • logical_delete_flag - Whether the disposition is soft-deleted.
  • prompt_for_note_flag - Whether to prompt for a note.
  • generate_comment_flag - Whether a comment is generated.
  • comment_template - Template of the generated comment.
  • comment_category - Category of the generated comment.
  • scenario_productivity_code - Productivity applied to scenarios.
  • queues - Queue assignments, as raw mappings.
  • prompt_for_reason_flag - Whether to prompt for a reason.
  • solution_id - Owning solution id.
  • automation_compatible - Whether automation may apply the disposition.

alert_disposition_name​

alert_disposition_id​

alert_disposition_description​

alert_disposition_resolution_code​

auto_close_days​

reroute_queue_prompt_flag​

reroute_queue_id​

auto_activate_minutes​

auto_activate_days​

auto_activate_score​

auto_activate_delta​

auto_activate_percent​

rest_url​

rest_page_template​

document_type​

document_type_id​

relationship_name​

relationship_type_id​

scenario_disposition_prompt_flag​

grid_display_flag​

display_order​

logical_delete_flag​

prompt_for_note_flag​

generate_comment_flag​

comment_template​

comment_category​

scenario_productivity_code​

queues​

prompt_for_reason_flag​

solution_id​

automation_compatible​

to_payload​

def to_payload() -> AlertDispositionRep

Return the generated AlertDispositionRep (None fields stay UNSET).

AlertDispositionOption Objects​

class AlertDispositionOption(_AlertAdminRecord)

Curated record for one alert disposition option and its prompt rules.

disposition_id​

@property
def disposition_id() -> str | None

The disposition option's identifier.

id​

@property
def id() -> str | None

The disposition option's identifier (alias for disposition_id).

name​

@property
def name() -> str | None

The disposition option's programmatic name.

label​

@property
def label() -> str | None

The disposition option's display label (alias for name).

resolution_code​

@property
def resolution_code() -> str | None

The alert resolution code applied when this disposition is chosen.

scenario_productivity_code​

@property
def scenario_productivity_code() -> str | None

The scenario productivity code recorded for this disposition.

prompt_for_note​

@property
def prompt_for_note() -> bool

Whether choosing this disposition prompts the analyst for a note.

prompt_for_reason​

@property
def prompt_for_reason() -> bool

Whether choosing this disposition prompts the analyst for a reason.

scenario_disposition_prompt​

@property
def scenario_disposition_prompt() -> bool

Whether the analyst is prompted to record which scenarios fired.

automation_compatible​

@property
def automation_compatible() -> bool

Whether this disposition can be applied by automated processing.

reroute_queue_id​

@property
def reroute_queue_id() -> str | None

The id of the queue an alert is rerouted to under this disposition.

document_type​

@property
def document_type() -> str | None

The document type created when this disposition is applied, if any.

comment_category​

@property
def comment_category() -> str | None

The comment category recorded with this disposition.

display_order​

@property
def display_order() -> int | None

The disposition's sort position in the analyst's option list.

auto_close_days​

@property
def auto_close_days() -> int | None

Days until the disposition closes the alert; 0 closes it at once.

None when the disposition does not close the alert. The built-in "Suppress Alert" is one: the alert stays ACTIVE.

logical_delete_flag​

@property
def logical_delete_flag() -> bool

Whether the disposition is soft-deleted.

delete on the service is a logical delete: the row stays in every listing with this flag set, and it keeps blocking the delete of the queue its reroute_queue_id names.

request​

def request(*, force_refresh: bool = False) -> DispositionRequest

Fetch the hydrated disposition request for this alert-bound option.

The first call reads the request and caches it on the option; later calls return the cached request unless force_refresh is set.

Arguments:

  • force_refresh - Whether to bypass the cached generated request payload.

Returns:

The generated disposition-request payload bound to the current alert.

Raises:

  • AdminOperationError - If the option has no id, or is not bound to an alert (fetch it via alert.disposition_options() or config.alert_dispositions.for_alert(...)).
  • AlertOperationError - If the Alerts service rejects the request read; AlertNotFoundError when it does not know the alert or the disposition.

request_async​

async def request_async(*, force_refresh: bool = False) -> DispositionRequest

Asynchronously fetch the hydrated disposition request for this option.

Shares the cache with request: the first call of either awaits or sends the read, and later calls of either return the cached request unless force_refresh is set.

Arguments:

  • force_refresh - Whether to bypass the cached generated request payload.

Returns:

The generated disposition-request payload bound to the current alert.

Raises:

  • AdminOperationError - If the option has no id, or is not bound to an alert (fetch it via alert.disposition_options_async() or config.alert_dispositions.for_alert_async(...)).
  • AlertOperationError - If the Alerts service rejects the request read; AlertNotFoundError when it does not know the alert or the disposition.

requirements​

def requirements() -> AlertDispositionRequirements

Return alert-bound disposition requirements for this option.

Returns:

The requirements of the cached (or freshly read) request.

Raises:

  • AdminOperationError - If the option has no id or is not bound to an alert.
  • AlertOperationError - If the Alerts service rejects the request read.

requirements_async​

async def requirements_async() -> AlertDispositionRequirements

Asynchronously return alert-bound disposition requirements for this option.

Returns:

The requirements of the cached (or freshly awaited) request.

Raises:

  • AdminOperationError - If the option has no id or is not bound to an alert.
  • AlertOperationError - If the Alerts service rejects the request read.

reason_options​

def reason_options() -> builtins.list[ReferenceListItemRecord]

Return reason-code options for this alert-bound disposition.

Returns:

The unarchived items of the request's reason list; empty when it names none.

Raises:

  • AdminOperationError - If the option is not bound to an alert, or no reference-list service is bound to read the reason list.
  • AlertOperationError - If the Alerts service rejects the request read.

reason_options_async​

async def reason_options_async() -> builtins.list[ReferenceListItemRecord]

Asynchronously return reason-code options for this alert-bound disposition.

Returns:

The unarchived items of the request's reason list; empty when it names none.

Raises:

  • AdminOperationError - If the option is not bound to an alert, or no reference-list service is bound to read the reason list.
  • AlertOperationError - If the Alerts service rejects the request read.

document_field_requirements​

def document_field_requirements(
) -> builtins.list[AlertDispositionDocumentFieldRequirement]

Return prompted document-field requirements for this disposition.

Returns:

One requirement per prompted document field.

Raises:

  • AdminOperationError - If the option is not bound to an alert.
  • AlertOperationError - If the Alerts service rejects the request read.

document_field_requirements_async​

async def document_field_requirements_async(
) -> builtins.list[AlertDispositionDocumentFieldRequirement]

Asynchronously return prompted document-field requirements for this disposition.

Returns:

One requirement per prompted document field.

Raises:

  • AdminOperationError - If the option is not bound to an alert.
  • AlertOperationError - If the Alerts service rejects the request read.

reference_options​

def reference_options(
field_name: str,
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Return valid reference-data options for one prompted document field.

Arguments:

  • field_name - Prompted document field name to resolve.
  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional current field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for the requested field.

Raises:

  • AdminOperationError - If the option is not bound to an alert, or the request prompts for no field of that name.
  • AlertOperationError - If the Alerts service rejects the request read.

reference_options_async​

async def reference_options_async(
field_name: str,
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Asynchronously return valid reference-data options for one prompted field.

Arguments:

  • field_name - Prompted document field name to resolve.
  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional current field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for the requested field.

Raises:

  • AdminOperationError - If the option is not bound to an alert, or the request prompts for no field of that name.
  • AlertOperationError - If the Alerts service rejects the request read.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the disposition option.

AlertDispositionDocumentFieldRequirement Objects​

@dataclass(frozen=True, slots=True)
class AlertDispositionDocumentFieldRequirement()

One prompted document-field requirement for an alert disposition.

name​

data_type​

allow_multiple_selections​

constraining_list_name​

default_value​

required​

reference_options​

def reference_options(
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Resolve valid reference-data options for this prompted field.

Arguments:

  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional current field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for this prompted field.

Raises:

  • AdminOperationError - If no reference-list service is bound to read the field's list.

reference_options_async​

async def reference_options_async(
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Asynchronously resolve valid reference-data options for this prompted field.

Arguments:

  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional current field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for this prompted field.

Raises:

  • AdminOperationError - If no reference-list service is bound to read the field's list.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the field requirement.

AlertDispositionRequirements Objects​

class AlertDispositionRequirements(RawBackedHandle)

Alert-bound hydrated requirements for one disposition option.

disposition_id​

@property
def disposition_id() -> str | None

The identifier of the disposition option these requirements describe.

prompt_for_note​

@property
def prompt_for_note() -> bool

Whether the analyst is prompted for a note when applying the disposition.

prompt_for_reason​

@property
def prompt_for_reason() -> bool

Whether the analyst is prompted for a reason code.

prompt_for_document​

@property
def prompt_for_document() -> bool

Whether the analyst is prompted to complete a document.

prompt_for_scenario_fired​

@property
def prompt_for_scenario_fired() -> bool

Whether the analyst is prompted to record which scenarios fired.

prompt_for_sfe_reason​

@property
def prompt_for_sfe_reason() -> bool

Whether each scenario-fired-event disposition needs a reason code.

When this is True, give every AlertScenarioDispositionInput a reason_code from reason_options.

document_type_name​

@property
def document_type_name() -> str | None

The name of the document type prompted for by this disposition.

document_type_label​

@property
def document_type_label() -> str | None

The label of the document type prompted for by this disposition.

document_template_name​

@property
def document_template_name() -> str | None

The name of the template used to seed the prompted document.

creates_document​

@property
def creates_document() -> bool

Whether applying this disposition creates a document.

reason_reference_list_name​

@property
def reason_reference_list_name() -> str | None

The name of the reference list supplying reason-code options.

reason_options​

def reason_options() -> builtins.list[ReferenceListItemRecord]

Return valid alert-level reason-code options for this request.

Archived items are left out: the Alerts service refuses an archived code ("The specified disposition code was archived").

Returns:

The unarchived items of the request's reason list; empty when it names none or the list does not exist.

Raises:

  • AdminOperationError - If no reference-list service is bound.

reason_options_async​

async def reason_options_async() -> builtins.list[ReferenceListItemRecord]

Asynchronously return valid alert-level reason-code options for this request.

Leaves archived items out, as reason_options does.

Returns:

The unarchived items of the request's reason list; empty when it names none or the list does not exist.

Raises:

  • AdminOperationError - If no reference-list service is bound.

document_field_requirement​

def document_field_requirement(
field_name: str) -> AlertDispositionDocumentFieldRequirement | None

Return one prompted field requirement by VI field name.

Arguments:

  • field_name - Prompted document field name to resolve.

Returns:

The matching requirement, or None when that field is not prompted.

Raises:

  • AdminOperationError - If the entity-type lookup the requirements need fails.

document_field_requirement_async​

async def document_field_requirement_async(
field_name: str) -> AlertDispositionDocumentFieldRequirement | None

Asynchronously return one prompted field requirement by VI field name.

Arguments:

  • field_name - Prompted document field name to resolve.

Returns:

The matching requirement, or None when that field is not prompted.

Raises:

  • AdminOperationError - If the entity-type lookup the requirements need fails.

document_field_requirements​

def document_field_requirements(
) -> builtins.list[AlertDispositionDocumentFieldRequirement]

Return prompted document-field requirements with typed metadata.

When the request lists no prompted field but prompts for a document, the required writable fields of its document type are read instead.

Returns:

One requirement per prompted document field.

Raises:

  • AdminOperationError - If the entity-type lookup fails.

document_field_requirements_async​

async def document_field_requirements_async(
) -> builtins.list[AlertDispositionDocumentFieldRequirement]

Asynchronously return prompted document-field requirements with typed metadata.

When the request lists no prompted field but prompts for a document, the required writable fields of its document type are read instead.

Returns:

One requirement per prompted document field.

Raises:

  • AdminOperationError - If the entity-type lookup fails.

reference_options​

def reference_options(
field_name: str,
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Resolve valid reference-data choices for one prompted field.

Arguments:

  • field_name - Prompted document field name to resolve.
  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional current field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for the requested field.

Raises:

  • AdminOperationError - If the request prompts for no field of that name, or no reference-list service is bound.

reference_options_async​

async def reference_options_async(
field_name: str,
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Asynchronously resolve valid reference-data choices for one prompted field.

Arguments:

  • field_name - Prompted document field name to resolve.
  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional current field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for the requested field.

Raises:

  • AdminOperationError - If the request prompts for no field of that name, or no reference-list service is bound.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the hydrated requirements.

AlertDispositionsService Objects​

class AlertDispositionsService(_AdminServiceBase)

Service for listing alert disposition options and their requirements.

list​

def list(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[AlertDispositionOption]

List alert dispositions as curated option records.

Reads one page. A WARNING is logged when the server reports more dispositions than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[AlertDispositionOption]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[AlertDispositionOption]

List every one of the dispositions, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[AlertDispositionOption]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, disposition_id: str) -> AlertDispositionOption | None

Fetch one alert disposition by id as a curated option record.

Arguments:

  • disposition_id - Disposition identifier.

Returns:

A curated alert-disposition option record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(*, disposition_id: str) -> AlertDispositionOption | None

Asynchronously fetch one alert disposition by id as a curated option record.

Arguments:

  • disposition_id - Disposition identifier.

Returns:

A curated alert-disposition option record with etag set, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
spec: AlertDispositionInput | None = None,
body: Any | None = None) -> AlertDispositionOption | None

Create an alert disposition.

The service requires a resolution code on a create. A typed spec without alert_disposition_resolution_code is refused before the POST; the SDK does not choose one. A raw body is sent as is.

Arguments:

  • spec - Typed disposition input.
  • body - Advanced escape hatch: a raw or generated AlertDispositionRep payload sent as is. Mutually exclusive with spec.

Returns:

The created disposition as a curated option record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, the spec has no alert_disposition_resolution_code, or the server rejects the call.

create_async​

async def create_async(
*,
spec: AlertDispositionInput | None = None,
body: Any | None = None) -> AlertDispositionOption | None

Asynchronously create an alert disposition.

Refuses a spec without a resolution code, as create does.

Arguments:

  • spec - Typed disposition input.
  • body - Raw or generated AlertDispositionRep payload, mutually exclusive with spec.

Returns:

The created disposition as a curated option record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
disposition_id: str,
spec: AlertDispositionInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> AlertDispositionOption | None

Replace an alert disposition by id.

The service treats the record's modifiedTimeStamp as a version: it refuses a PUT whose body lacks it or carries an old one, whatever If-Match says. With spec the SDK reads the disposition first and copies its modifiedTimeStamp, creationTimeStamp, createdBy and modifiedBy into the body, so callers never pass them. When the server refuses that stamp because the record changed after the read, the update raises AdminConflictError; the SDK does not retry with a fresh stamp. A raw body is sent as is and must carry the stamp itself.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the read that supplies the stamp (or, with body, a read just before the PUT) supplies the ETag, which only covers the time between those two requests.

Arguments:

  • disposition_id - Disposition identifier. Filled into spec.alert_disposition_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated AlertDispositionRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the alert disposition must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and skip the ETag check. Logs a WARNING. Wins over if_match. A typed update still carries the stamp it just read, which the service checks regardless.

Returns:

The updated disposition as a curated option record.

Raises:

  • AdminConflictError - When the alert disposition changed since it was
  • read - its ETag moved (HTTP 412, or the SDK's own check), the server reports a conflict (HTTP 409), or it refused the carried modifiedTimeStamp (HTTP 400) and the record's stamp has moved since the read.
  • AdminNotFoundError - When a typed update names a disposition that does not exist.
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
disposition_id: str,
spec: AlertDispositionInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> AlertDispositionOption | None

Asynchronously replace an alert disposition by id.

Carries the audit fields into a typed body as update does.

Arguments:

  • disposition_id - Disposition identifier.
  • spec - Typed replacement.
  • body - Raw or generated AlertDispositionRep payload, mutually exclusive with spec.
  • if_match - ETag the alert disposition must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and skip the ETag check. Logs a WARNING. Wins over if_match. A typed update still carries the stamp it just read.

Returns:

The updated disposition as a curated option record.

Raises:

  • AdminConflictError - As for update, including a refused modifiedTimeStamp on a record that changed since the read.
  • AdminNotFoundError - As for update.
  • AdminOperationError - As for update.

delete​

def delete(*, disposition_id: str) -> None

Soft-delete an alert disposition by id.

The alert service performs a logical delete: the disposition stays in list with logical_delete_flag set and keeps blocking the delete of the queue its reroute_queue_id names. To free that queue, update the disposition with no reroute_queue_id first. The SDK runs no referential pre-check of its own.

Arguments:

  • disposition_id - Disposition identifier.

Raises:

  • AdminNotFoundError - When no disposition has that id (HTTP 404).
  • AdminConflictError - When the server reports a conflict (HTTP 409).
  • AdminOperationError - When the server refuses the delete for any other reason (HTTP 400).

delete_async​

async def delete_async(*, disposition_id: str) -> None

Asynchronously soft-delete an alert disposition by id.

See delete for what a logical delete leaves behind.

Arguments:

  • disposition_id - Disposition identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminConflictError - As for delete.
  • AdminOperationError - As for delete.

for_alert​

def for_alert(
*,
alert_id: str,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[AlertDispositionOption]

List dispositions applicable to one alert as curated option records.

Arguments:

  • alert_id - Alert identifier.
  • user_id - Optional user id for filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Curated alert-disposition option records applicable to the alert.

Raises:

  • AdminOperationError - When the server rejects the call.

for_alert_async​

async def for_alert_async(
*,
alert_id: str,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[AlertDispositionOption]

Asynchronously list dispositions applicable to one alert.

Arguments:

  • alert_id - Alert identifier.
  • user_id - Optional user id for filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Curated alert-disposition option records applicable to the alert.

Raises:

  • AdminOperationError - When the server rejects the call.

for_strategy​

def for_strategy(
*,
strategy_id: str,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[AlertDispositionOption]

List dispositions applicable to one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • user_id - Optional user id for filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound alert-disposition option records applicable to the strategy.

Raises:

  • AdminOperationError - When the server rejects the call.

for_strategy_async​

async def for_strategy_async(
*,
strategy_id: str,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[AlertDispositionOption]

Asynchronously list dispositions applicable to one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • user_id - Optional user id for filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound alert-disposition option records applicable to the strategy.

Raises:

  • AdminOperationError - When the server rejects the call.

perform​

def perform(*, disposition_id: str, body: Any) -> object | None

Perform a disposition action using a raw/generated payload.

Arguments:

  • disposition_id - Disposition identifier.
  • body - Raw or generated perform payload.

Returns:

The generated perform response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

perform_async​

async def perform_async(*, disposition_id: str, body: Any) -> object | None

Asynchronously perform a disposition action using a raw/generated payload.

Arguments:

  • disposition_id - Disposition identifier.
  • body - Raw or generated perform payload.

Returns:

The generated perform response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

request​

def request(*,
disposition_id: str,
alert_id: str | None = None,
domain_id: str | None = None,
alert_id_multiple: str | None = None) -> object | None

Fetch the service-generated request payload for a disposition flow.

Arguments:

  • disposition_id - Disposition identifier.
  • alert_id - Optional alert identifier.
  • domain_id - Optional domain identifier.
  • alert_id_multiple - Optional multi-alert identifier payload.

Returns:

The generated request payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

request_async​

async def request_async(*,
disposition_id: str,
alert_id: str | None = None,
domain_id: str | None = None,
alert_id_multiple: str | None = None) -> object | None

Asynchronously fetch the service-generated request payload for a disposition flow.

Arguments:

  • disposition_id - Disposition identifier.
  • alert_id - Optional alert identifier.
  • domain_id - Optional domain identifier.
  • alert_id_multiple - Optional multi-alert identifier payload.

Returns:

The generated request payload, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create_request​

def create_request(*, disposition_id: str, domain_id: str,
body: Any) -> object | None

Create a disposition request payload for a specific domain.

Arguments:

  • disposition_id - Disposition identifier.
  • domain_id - Domain identifier.
  • body - Raw or generated create-request payload.

Returns:

The generated request creation payload.

create_request_async​

async def create_request_async(*, disposition_id: str, domain_id: str,
body: Any) -> object | None

Asynchronously create a disposition request payload for a specific domain.

Arguments:

  • disposition_id - Disposition identifier.
  • domain_id - Domain identifier.
  • body - Raw or generated create-request payload.

Returns:

The generated request creation payload.

Alert domain configuration records and the DomainsService handle.

DomainInput Objects​

@dataclass(frozen=True, slots=True)
class DomainInput(_TypedInput)

Typed input for creating or replacing an alert domain.

None fields are left unset so the server applies its defaults.

Attributes:

  • domain_name - Display name (required).
  • domain_id - Domain id; filled from the path on update when omitted.
  • domain_description - Descriptive text.
  • score_aggregation_policy - How alert scores aggregate in the domain.
  • user_created_domain - Whether the domain was created by a user.
  • assignment_enabled_flag - Whether alerts can be assigned to users.
  • disposition_reason_reference_table_name - Reference list of disposition reasons.
  • default_manual_alert_score - Score given to manually created alerts.
  • default_alert_score - Score given to alerts without one.
  • solution_id - Owning solution id.
  • prompt_for_sfe_reason_code - Whether dispositions prompt for a scenario-fired-event reason.
  • suppress_queue_id - Queue suppressed alerts are moved to.
  • sfe_disposition_reason_productivity_mapping_json - Reason-to- productivity mapping, as a raw mapping.

domain_name​

domain_id​

domain_description​

score_aggregation_policy​

user_created_domain​

assignment_enabled_flag​

disposition_reason_reference_table_name​

default_manual_alert_score​

default_alert_score​

solution_id​

prompt_for_sfe_reason_code​

suppress_queue_id​

sfe_disposition_reason_productivity_mapping_json​

to_payload​

def to_payload() -> DomainRep

Return the generated DomainRep (None fields stay UNSET).

DomainRecord Objects​

class DomainRecord(_AlertAdminRecord)

Curated record for one alert domain.

domain_id​

@property
def domain_id() -> str | None

The alert domain's identifier.

id​

@property
def id() -> str | None

The alert domain's identifier (alias for domain_id).

domain_name​

@property
def domain_name() -> str | None

The alert domain's display name.

domain_description​

@property
def domain_description() -> str | None

The alert domain's descriptive text.

score_aggregation_policy​

@property
def score_aggregation_policy() -> str | None

The policy used to aggregate alert scores within this domain.

DomainsService Objects​

class DomainsService(_AdminServiceBase)

Service for listing and inspecting alert domains.

list​

def list(*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[DomainRecord]

List alert domains.

Reads one page. A WARNING is logged when the server reports more domains than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[DomainRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[DomainRecord]

List every one of the domains, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[DomainRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, domain_id: str) -> DomainRecord | None

Fetch one alert domain by id.

Arguments:

  • domain_id - Domain identifier.

Returns:

The bound domain record, or None when not found.

get_async​

async def get_async(*, domain_id: str) -> DomainRecord | None

Asynchronously fetch one alert domain by id.

Arguments:

  • domain_id - Domain identifier.

Returns:

The bound domain record, or None when not found.

create​

def create(*,
spec: DomainInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> DomainRecord | None

Create an alert domain.

Arguments:

  • spec - Typed domain input.
  • body - Advanced escape hatch: a raw or generated DomainRep payload sent as is. Mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created bound domain record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, or the server rejects the call.

create_async​

async def create_async(*,
spec: DomainInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> DomainRecord | None

Asynchronously create an alert domain.

Arguments:

  • spec - Typed domain input.
  • body - Raw or generated DomainRep payload, mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created bound domain record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
domain_id: str,
spec: DomainInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> DomainRecord | None

Replace an alert domain by id.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • domain_id - Domain identifier. Filled into spec.domain_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated DomainRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the domain must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound domain record.

Raises:

  • AdminConflictError - When the domain changed since the ETag was read (HTTP 412).
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
domain_id: str,
spec: DomainInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> DomainRecord | None

Asynchronously replace an alert domain by id.

Arguments:

  • domain_id - Domain identifier.
  • spec - Typed replacement.
  • body - Raw or generated DomainRep payload, mutually exclusive with spec.
  • if_match - ETag the domain must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound domain record.

Raises:

  • AdminConflictError - When the domain changed since the ETag was read (HTTP 412).
  • AdminOperationError - As for update.

delete​

def delete(*, domain_id: str) -> None

Delete an alert domain by id.

The SDK runs no referential pre-check; the server refuses a domain that still owns queues.

Arguments:

  • domain_id - Domain identifier.

Raises:

  • AdminNotFoundError - When no domain has that id (HTTP 404).
  • AdminConflictError - When the server reports a conflict (HTTP 409).
  • AdminOperationError - When the server refuses the delete for any other reason, such as a domain that still owns queues (HTTP 400).

delete_async​

async def delete_async(*, domain_id: str) -> None

Asynchronously delete an alert domain by id.

Arguments:

  • domain_id - Domain identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminConflictError - As for delete.
  • AdminOperationError - As for delete.

queues​

def queues(*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[QueueRecord]

List queues that belong to one domain.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of queues to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound queue records.

Raises:

  • AdminOperationError - When the server rejects the call.

queues_async​

async def queues_async(
*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[QueueRecord]

Asynchronously list queues that belong to one domain.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of queues to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound queue records.

Raises:

  • AdminOperationError - When the server rejects the call.

strategies​

def strategies(
*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[StrategyRecord]

List strategies that belong to one domain.

Reads one page. strategies_page returns the same rows with the server's total.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of strategies to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound strategy records.

Raises:

  • AdminOperationError - When the server rejects the call.

strategies_async​

async def strategies_async(
*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[StrategyRecord]

Asynchronously list strategies that belong to one domain.

Reads one page. strategies_page_async returns the same rows with the server's total.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of strategies to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound strategy records.

Raises:

  • AdminOperationError - When the server rejects the call.

strategies_page​

def strategies_page(*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> Page[StrategyRecord]

Fetch one page of a domain's strategies, keeping the server's count.

page.items holds the records and page.total the number of strategies the server reports for the domain.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

One page of bound strategy records with the server's total.

Raises:

  • AdminOperationError - When the server rejects the call.

strategies_page_async​

async def strategies_page_async(
*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> Page[StrategyRecord]

Async variant of strategies_page.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

One page of bound strategy records with the server's total.

Raises:

  • AdminOperationError - When the server rejects the call.

tags​

def tags(*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[ScenarioTagRecord]

List scenario tags that belong to one domain.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of tags to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound scenario-tag records.

Raises:

  • AdminOperationError - When the server rejects the call.

tags_async​

async def tags_async(
*,
domain_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[ScenarioTagRecord]

Asynchronously list scenario tags that belong to one domain.

Arguments:

  • domain_id - Domain identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of tags to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound scenario-tag records.

Raises:

  • AdminOperationError - When the server rejects the call.

Entity-type configuration records and the EntityTypesService handle.

EntityFieldCatalog Objects​

class EntityFieldCatalog(Mapping[str, EntityFieldInfo])

Mapping-like view over entity field metadata keyed by field name.

Arguments:

  • fields - Normalized field metadata keyed by VI field name.

list​

def list() -> builtins.list[EntityFieldInfo]

Return field metadata records in iteration order.

names​

def names() -> builtins.list[str]

Return the known field names.

to_dict​

def to_dict() -> dict[str, JsonObject]

Return the catalog as a plain field-name keyed dictionary.

EntityEventFieldSources Objects​

@dataclass(frozen=True)
class EntityEventFieldSources()

Source field names feeding one entity event's time and location values.

point_timestamp​

interval_start_timestamp​

interval_end_timestamp​

longitude​

latitude​

geo_json​

to_dict​

def to_dict() -> JsonObject

Return the event field sources as a JSON-serializable dict.

EntityEventItem Objects​

@dataclass(frozen=True)
class EntityEventItem()

One event definition on an entity type (its time/location mapping).

kind​

root​

is_child_based​

child_entity_name​

fields​

required_fields​

label​

description​

to_dict​

def to_dict() -> JsonObject

Return the event item as a JSON-serializable dict.

EntityTypeFieldRecord Objects​

class EntityTypeFieldRecord(RawBackedHandle)

Curated field-definition record for one entity type.

Arguments:

  • raw - Generated entity-type field payload.
  • reference_lists_service - Optional bound reference-list service used for resolving reference-data options.

id​

@property
def id() -> int | None

The field's server-assigned numeric identifier.

name​

@property
def name() -> str | None

The field's programmatic name.

label​

@property
def label() -> str | None

The field's human-readable display label.

description​

@property
def description() -> str | None

The field's descriptive text.

data_type​

@property
def data_type() -> str | None

The field's physical storage data type.

logical_data_type​

@property
def logical_data_type() -> str | None

The field's logical data type used for UI and validation.

required​

@property
def required() -> bool

Whether a value is required for this field.

read_only​

@property
def read_only() -> bool

Whether this field is read-only in the UI.

system_reserved​

@property
def system_reserved() -> bool

Whether this field is reserved and managed by the platform.

auto_generated​

@property
def auto_generated() -> bool

Whether this field's value is generated automatically by the platform.

allow_multiple_selections​

@property
def allow_multiple_selections() -> bool

Whether this reference field accepts multiple selected values.

constraining_list_name​

@property
def constraining_list_name() -> str | None

The name of the reference list that constrains this field's values.

cascading_reference_data_filter_by_code​

@property
def cascading_reference_data_filter_by_code() -> str | None

The parent reference-data code that cascades to filter this field.

cascading_reference_data_filter_by_field​

@property
def cascading_reference_data_filter_by_field() -> str | None

The sibling field whose value cascades to filter this field's options.

owner_name​

@property
def owner_name() -> str | None

The name of the entity type that owns this field.

writable​

@property
def writable() -> bool

Whether this field can be written (not read-only/reserved/generated).

resolve_reference_options​

def resolve_reference_options(
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Resolve available reference-list options for this field.

Arguments:

  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional document field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for this field.

Raises:

  • AdminOperationError - If the field constrains to a reference list but no ReferenceListsService is bound to resolve it.

    Cascading reference-data hierarchies are not part of the first-class reference-list SDK surface. If a parent code is resolved, this helper returns an empty list instead of reading hierarchy children through an unsupported typed endpoint.

resolve_reference_options_async​

async def resolve_reference_options_async(
*,
parent_code: str | None = None,
field_values: Mapping[str, Any] | None = None
) -> builtins.list[ReferenceListItemRecord]

Asynchronously resolve available reference-list options for this field.

Resolves the same options as resolve_reference_options, with the reference-list read awaited.

Arguments:

  • parent_code - Optional explicit parent code for cascading metadata.
  • field_values - Optional document field values used to infer cascading parent codes.

Returns:

Reference-list item options valid for this field.

Raises:

  • AdminOperationError - If the field constrains to a reference list but no ReferenceListsService is bound to resolve it.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the field definition.

EntityTypeRecord Objects​

class EntityTypeRecord(RawBackedHandle)

Curated entity-type definition record.

Arguments:

  • raw - Generated entity-type payload.
  • entity_types_service - Optional service used for related entity-type lookups.
  • reference_lists_service - Optional reference-list service used by field helpers.

id​

@property
def id() -> int | None

The entity type's server-assigned numeric identifier.

name​

@property
def name() -> str | None

The entity type's programmatic name.

label​

@property
def label() -> str | None

The entity type's human-readable display label.

description​

@property
def description() -> str | None

The entity type's descriptive text.

mode​

@property
def mode() -> EntityTypeMode | None

Whether the type is MANAGED by VI or SOURCE (external).

data_store_name​

@property
def data_store_name() -> str | None

The name of the data store backing this entity type.

table_name​

@property
def table_name() -> str | None

The physical table name storing this entity type's records.

version​

@property
def version() -> int | None

The entity type's optimistic-concurrency version.

parent_name​

@property
def parent_name() -> str | None

The name of this entity type's parent type, if it is a child type.

system_reserved​

@property
def system_reserved() -> bool

Whether this entity type is reserved and managed by the platform.

history_enabled​

@property
def history_enabled() -> bool

Whether record-level history tracking is enabled for this entity type.

@property
def indexed_for_search() -> bool

Whether this entity type's records are indexed for search.

fields​

def fields(*, writable_only: bool = False) -> builtins.list[EntityFieldInfo]

Return normalized field metadata for this entity type.

Arguments:

  • writable_only - Whether to omit non-writable fields.

Returns:

Normalized field metadata in entity-field order.

image_categories​

@property
def image_categories() -> dict[str, FileCategoryInfo]

The image/file categories configured on this entity type, keyed by name.

child_entity_types​

@property
def child_entity_types() -> builtins.list[EntityTypeRecord]

The child entity types parented to this entity type.

Resolved once per record; the listing behind it is not repeated on later reads.

child_entity_type_names​

@property
def child_entity_type_names() -> builtins.list[str]

The names of the child entity types parented to this entity type.

location_items​

def location_items() -> builtins.list[EntityEventItem]

Return the configured events that carry location but not time data.

time_items​

def time_items() -> builtins.list[EntityEventItem]

Return the configured events that carry time but not location data.

time_location_items​

def time_location_items() -> builtins.list[EntityEventItem]

Return the configured events that carry both time and location data.

conditions​

@property
def conditions() -> builtins.list[ConfiguredConditionRecord]

The styling conditions configured on this entity type's visual styles.

field​

def field(name: str) -> EntityFieldInfo | None

Return one normalized field definition by field name.

Arguments:

  • name - Field name to look up.

Returns:

The matching normalized field metadata, or None when not present.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the entity-type definition.

EntityTypeSummaryRecord Objects​

class EntityTypeSummaryRecord(RawBackedHandle)

Compact listing view of one entity type (GET /admin/storedObjects/listAll).

Cheaper than EntityTypeRecord: it carries the identity, storage and indexing flags plus the field names, but no field definitions, events or conditions. Use EntityTypesService.get for the full record.

Arguments:

  • raw - The generated EntityTypeSummary model or a mapping with the same fields.

id​

@property
def id() -> int | None

The stored-object id.

name​

@property
def name() -> str | None

The entity type's programmatic name.

label​

@property
def label() -> str | None

The entity type's display label.

data_store_name​

@property
def data_store_name() -> str | None

The data store backing the type.

table_name​

@property
def table_name() -> str | None

The table the type is stored in.

parent_name​

@property
def parent_name() -> str | None

The parent entity type name for a child type, else None.

system_reserved​

@property
def system_reserved() -> bool | None

Whether the type is reserved by the system.

indexed_for_search​

@property
def indexed_for_search() -> bool | None

Whether the type is indexed for search.

mode​

@property
def mode() -> EntityTypeMode | None

Whether the type is MANAGED by VI or SOURCE (external).

marker_color​

@property
def marker_color() -> str | None

The map marker colour configured for the type.

field_names​

@property
def field_names() -> builtins.list[str]

The names of the type's fields, in configuration order.

is_child​

@property
def is_child() -> bool

Whether the type is a child entity type (has a parent).

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the summary.

EntityTypesService Objects​

class EntityTypesService(EntityMetadataFacade)

Service for listing and reconstructing entity-type definitions.

Arguments:

  • datahub_api - Generated Data Hub API namespace used for metadata lookups.
  • reference_lists_service - Optional bound reference-list service used by field helpers.

list​

def list(
*,
exclude_unauthorized: bool = False) -> builtins.list[EntityTypeRecord]

List entity types as curated records.

Arguments:

  • exclude_unauthorized - Whether unauthorized types should be excluded.

Returns:

Curated entity-type records.

list_async​

async def list_async(
*,
exclude_unauthorized: bool = False) -> builtins.list[EntityTypeRecord]

Asynchronously list entity types as curated records.

Arguments:

  • exclude_unauthorized - Whether unauthorized types should be excluded.

Returns:

Curated entity-type records.

get​

def get(*,
name: str | None = None,
entity_type_id: str | None = None,
exclude_unauthorized: bool = False) -> EntityTypeRecord | None

Fetch one entity type by name or id.

Arguments:

  • name - Optional entity type name.
  • entity_type_id - Optional stored-object id.
  • exclude_unauthorized - Whether unauthorized types should be excluded.

Returns:

The matching entity-type record, or None when not found.

get_async​

async def get_async(
*,
name: str | None = None,
entity_type_id: str | None = None,
exclude_unauthorized: bool = False) -> EntityTypeRecord | None

Asynchronously fetch one entity type by name or id.

Arguments:

  • name - Optional entity type name.
  • entity_type_id - Optional stored-object id.
  • exclude_unauthorized - Whether unauthorized types should be excluded.

Returns:

The matching entity-type record, or None when not found.

list_summaries​

def list_summaries(
*,
exclude_unauthorized: bool = False
) -> builtins.list[EntityTypeSummaryRecord]

List every entity type in its compact summary form.

One request through GET /admin/storedObjects/listAll; cheaper than list when only names, ids, storage and indexing flags are needed.

Arguments:

  • exclude_unauthorized - Whether unauthorized types should be excluded.

Returns:

Summary records in server order.

Raises:

  • AdminOperationError - When the Data Hub call fails.

list_summaries_async​

async def list_summaries_async(
*,
exclude_unauthorized: bool = False
) -> builtins.list[EntityTypeSummaryRecord]

Async variant of list_summaries.

Arguments:

  • exclude_unauthorized - Whether unauthorized types should be excluded.

Returns:

Summary records in server order.

Raises:

  • AdminOperationError - When the Data Hub call fails.

delete​

def delete(*,
entity_type_id: str | None = None,
name: str | None = None) -> None

Hard-delete an entity type by id or name.

This removes the stored object and every document of the type; there is no undo. It does not remove the type's SAND search type or its access rules; delete those separately (client.admin.search_types.delete(name=...)) or a later re-create of the same name fails.

Arguments:

  • entity_type_id - The stored-object id.
  • name - The entity type name. Exactly one of the two is required.

Raises:

  • ValidationError - When neither or both selectors are given.
  • AdminNotFoundError - When the type does not exist.
  • AdminOperationError - When the Data Hub refuses the delete.

delete_async​

async def delete_async(*,
entity_type_id: str | None = None,
name: str | None = None) -> None

Async variant of delete.

Arguments:

  • entity_type_id - The stored-object id.
  • name - The entity type name. Exactly one of the two is required.

Raises:

  • ValidationError - When neither or both selectors are given.
  • AdminNotFoundError - When the type does not exist.
  • AdminOperationError - When the Data Hub refuses the delete.

reconstruct​

def reconstruct(*, entity_type_id: str) -> EntityTypeRecord

Reconstruct an entity type from its stored-object id.

Arguments:

  • entity_type_id - Stored-object identifier.

Returns:

The reconstructed entity-type record.

reconstruct_async​

async def reconstruct_async(*, entity_type_id: str) -> EntityTypeRecord

Asynchronously reconstruct an entity type from its stored-object id.

Arguments:

  • entity_type_id - Stored-object identifier.

Returns:

The reconstructed entity-type record.

hydrate​

def hydrate(model_cls: type[EntityModelT],
payload: Mapping[str, Any] | BaseVIEntity) -> EntityModelT

Validate a payload with one generated or handwritten entity model.

Arguments:

  • model_cls - Model class to validate against.
  • payload - Raw or model payload using VI field names.

Returns:

A validated model instance.

fields​

def fields(*,
name: str,
writable_only: bool = True,
required_only: bool = False) -> EntityFieldCatalog

Return field metadata for one entity type.

Arguments:

  • name - Entity type name.
  • writable_only - Whether to omit non-writable fields.
  • required_only - Whether to return only required fields.

Returns:

Normalized field metadata keyed by field name.

fields_async​

async def fields_async(*,
name: str,
writable_only: bool = True,
required_only: bool = False) -> EntityFieldCatalog

Async variant of fields.

Arguments:

  • name - Entity type name.
  • writable_only - Whether to omit non-writable fields.
  • required_only - Whether to return only required fields.

Returns:

Normalized field metadata keyed by field name.

child_fields​

def child_fields(*,
parent_name: str,
child_name: str,
writable_only: bool = True) -> EntityFieldCatalog

Return field metadata for a child entity type when the parent matches.

Arguments:

  • parent_name - Parent entity type name.
  • child_name - Child entity type name.
  • writable_only - Whether to omit non-writable fields.

Returns:

Normalized child-field metadata keyed by field name.

child_fields_async​

async def child_fields_async(*,
parent_name: str,
child_name: str,
writable_only: bool = True) -> EntityFieldCatalog

Async variant of child_fields.

Arguments:

  • parent_name - Parent entity type name.
  • child_name - Child entity type name.
  • writable_only - Whether to omit non-writable fields.

Returns:

Normalized child-field metadata keyed by field name.

The entity event metadata the documents layer reads, as an injected provider.

EntityEventMetadataProvider Objects​

class EntityEventMetadataProvider()

Reads the configured event items of an entity type.

Arguments:

  • sand_api - Generated SAND namespace used to resolve the search type that carries the event items. None leaves the items empty.

location_items​

def location_items(entity_type: Any) -> builtins.list[EntityEventItem]

Return the configured location event items of an entity type.

Arguments:

  • entity_type - Generated entity-type payload.

Returns:

The location event items, empty when none are configured.

location_items_async​

async def location_items_async(
entity_type: Any) -> builtins.list[EntityEventItem]

Asynchronously return the configured location event items of an entity type.

Arguments:

  • entity_type - Generated entity-type payload.

Returns:

The location event items, empty when none are configured.

time_items​

def time_items(entity_type: Any) -> builtins.list[EntityEventItem]

Return the configured time event items of an entity type.

Arguments:

  • entity_type - Generated entity-type payload.

Returns:

The time event items, empty when none are configured.

time_items_async​

async def time_items_async(entity_type: Any) -> builtins.list[EntityEventItem]

Asynchronously return the configured time event items of an entity type.

Arguments:

  • entity_type - Generated entity-type payload.

Returns:

The time event items, empty when none are configured.

time_location_items​

def time_location_items(entity_type: Any) -> builtins.list[EntityEventItem]

Return the configured time-location event items of an entity type.

Arguments:

  • entity_type - Generated entity-type payload.

Returns:

The time-location event items, empty when none are configured.

time_location_items_async​

async def time_location_items_async(
entity_type: Any) -> builtins.list[EntityEventItem]

Asynchronously return the configured time-location event items of an entity type.

Arguments:

  • entity_type - Generated entity-type payload.

Returns:

The time-location event items, empty when none are configured.

Handwritten admin/config service layer for SAS Visual Investigator.

Curated record wrappers, configuration bundle handling, and the per-object admin services (entities, relationships, queues, domains, strategies, alert dispositions, and related SAND/alerts configuration) that sit over the generated datahub, SAND, and alerts clients.

ConfigDomain Objects​

class ConfigDomain()

Grouped access to configuration and admin-oriented services.

The config domain collects reference lists, metadata APIs, and several direct service-shaped admin helpers under client.admin.

Arguments:

  • datahub_api - Generated Data Hub namespace.
  • sand_api - Generated SAND namespace.
  • alerts_api - Generated alerts namespace.
  • workflows_api - Generated workflows namespace.
  • transport_api - Generated transport namespace, if available.

reference_lists​

entity_types​

relationship_types​

search_types​

conditions​

data_stores​

icons​

solutions​

transaction_types​

queues​

domains​

strategies​

scenarios​

scenario_tags​

triage_definitions​

routing_rules​

enrichment_fields​

alert_actions​

alert_dispositions​

alert_metadata​

alerting_event_metadata​

alerts_package​

workflows​

shapes​

synonyms​

transport​

config​

indexing​

suppressed_scenarios​

logic_expressions​

managers​

def managers() -> list[str]

Return the names of every sub-manager exposed on this domain.

Useful when exploring the admin surface in a REPL: every name here is a directly-accessible attribute (e.g. client.admin.entity_types).

Search indexing administration: start index jobs and manage SAND indices.

Available as client.admin.indexing. Two services back it:

  • The Data Hub async-job endpoint POST /admin/asyncJobs starts a SEARCH_INDEX_LOADER job (full, incremental or scoped). This is the only job endpoint with a published OpenAPI specification. Job status and cancel live on endpoints SAS has not published (the job monitor and the indexer service), so the SDK does not call them: IndexingJob has no refresh(), and progress is read on the Visual Investigator admin Jobs page. client.documents.submit_async_job stays the generic escape hatch.
  • The SAND index endpoints POST /admin/indices, GET /admin/indices/{type}, GET /admin/indices/version and POST /admin/operations create index generations, look them up, report the index format and switch the searchable generation. DELETE /admin/indices and DELETE /admin/indices/{type} are deliberately raw-only on client.api.sand.

The re-index recipe from the SAND specification ("Use Case Five"): create an unsearchable index generation (ensure_indices(searchable=False)), load it (start_full()), then promote it (make_searchable()), which also deletes the older generations.

DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS​

Per-call read timeout for POST /admin/operations.

refreshConfiguration compares every configured type against the live index even in status-only mode (46 s on a mid-sized tenant, live-verified) and makeIndexSearchable deletes whole index generations, so both outlive the client-wide default the way the transport export does. The budget is bounded by SVIConfig.request_deadline_seconds when that is set.

SEARCH_INDEX_LOADER​

DEFAULT_INDEXING_JOB_NAME​

RelationshipIndexTarget Objects​

@dataclass(frozen=True, slots=True)
class RelationshipIndexTarget()

One relationship type to index, scoped by the entity it starts from.

Attributes:

  • name - The relationship type name (LOAD_LINK task name).
  • from_entity - The entity type on the from side of the relationship (fromObjectName on the task).

name​

from_entity​

coerce​

@classmethod
def coerce(
cls, value: RelationshipIndexTarget | tuple[str, str] | Mapping[str, str]
) -> RelationshipIndexTarget

Lift a (name, from_entity) tuple or mapping into a target.

Arguments:

  • value - A RelationshipIndexTarget, a two-tuple of (name, from_entity), or a mapping with those keys.

Returns:

The target.

Raises:

  • AdminOperationError - When value has neither shape.

to_dict​

def to_dict() -> JsonObject

Return {"name": ..., "from_entity": ...}.

IndexingRequest Objects​

@dataclass(frozen=True, slots=True)
class IndexingRequest()

A SEARCH_INDEX_LOADER job definition.

Build one through full, incremental or scoped rather than the constructor; the constructor validates the same rules but takes every field explicitly.

Attributes:

  • mode - full, incremental or scoped.
  • since - Lower bound of the incremental window (aware datetime). Required for incremental, forbidden otherwise.
  • entities - Entity type names to index (LOAD_DOCUMENT tasks).
  • relationships - Relationship types to index (LOAD_LINK tasks).
  • transactions - Transaction type names to index (LOAD_TRANSACTION).
  • index_associated_objects - Whether objects associated with the listed targets are indexed too. False removes that scoping. Does not apply to full mode, where it must stay True.
  • name - Job name shown on the VI Jobs page.
  • description - Optional job description.
  • tags - Optional job tags.
  • version - Job representation version (1).

mode​

since​

entities​

relationships​

transactions​

index_associated_objects​

name​

description​

tags​

version​

full​

@classmethod
def full(
cls,
*,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingRequest

Build a full re-index request (every type, no tasks).

Arguments:

  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The request.

incremental​

@classmethod
def incremental(
cls,
*,
since: datetime,
entities: Sequence[str] = (),
relationships: Sequence[RelationshipIndexTarget | tuple[str, str]] = (),
transactions: Sequence[str] = (),
index_associated_objects: bool = True,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingRequest

Build an incremental request indexing changes made since since.

Arguments:

  • since - Aware datetime the window starts at.
  • entities - Entity type names to index; empty means every type.
  • relationships - Relationship targets as RelationshipIndexTarget or (name, from_entity) tuples.
  • transactions - Transaction type names to index.
  • index_associated_objects - Whether associated objects are indexed.
  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The request.

Raises:

  • AdminOperationError - When since is naive or a name is blank.

scoped​

@classmethod
def scoped(
cls,
*,
entities: Sequence[str] = (),
relationships: Sequence[RelationshipIndexTarget | tuple[str, str]] = (),
transactions: Sequence[str] = (),
index_associated_objects: bool = True,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingRequest

Build a request that indexes only the listed types.

Arguments:

  • entities - Entity type names to index.
  • relationships - Relationship targets as RelationshipIndexTarget or (name, from_entity) tuples.
  • transactions - Transaction type names to index.
  • index_associated_objects - False indexes only the listed objects; True (the server default) also indexes objects associated with them.
  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The request.

Raises:

  • AdminOperationError - When no target is given or a name is blank.

targets_count​

@property
def targets_count() -> int

How many entity, relationship and transaction targets the request lists.

tasks​

def tasks() -> builtins.list[JsonObject]

Return the job tasks in wire shape.

One LOAD_DOCUMENT task per entity, one LOAD_LINK task per relationship (with fromObjectName) and one LOAD_TRANSACTION task per transaction type. Every task carries the name the generated Task model requires, spelled <type>:<object name>.

to_payload​

def to_payload() -> JsonObject

Return the Job wire payload for POST /admin/asyncJobs.

Lists and booleans stay JSON lists and booleans (the spec examples send filters as an array and indexAssociatedObjects as a boolean); None fields are omitted.

to_dict​

def to_dict() -> JsonObject

Return a constructor-shaped snapshot of the request.

raw_dict​

def raw_dict() -> JsonObject

Return the wire payload (alias of to_payload).

IndexingTaskStatus Objects​

@dataclass(frozen=True, slots=True)
class IndexingTaskStatus()

One task of an indexing job as the server reported it at submission.

Attributes:

  • name - Task name.
  • task_type - Task type (LOAD_DOCUMENT, LOAD_LINK, ...).
  • object_name - The entity, relationship or transaction type the task loads.
  • status - Task status, when reported.
  • message - Task message, when reported.

name​

task_type​

object_name​

status​

message​

from_task​

@classmethod
def from_task(cls, task: Task | Mapping[str, Any]) -> IndexingTaskStatus

Build a status from a generated Task or its mapping form.

Arguments:

  • task - Generated Task model or a mapping with the same keys.

Returns:

The task status.

to_dict​

def to_dict() -> JsonObject

Return the status as a plain dict.

IndexingJob Objects​

class IndexingJob(JobHandle)

An indexing job as returned by POST /admin/asyncJobs.

Carries the submission response only. There is no refresh(): job status and cancel are served by endpoints without a published specification, which the SDK does not call. Follow progress on the VI admin Jobs page.

Arguments:

  • raw - The generated Job model or a mapping with the same fields.
  • request - The IndexingRequest that produced the job, when the job was started from one.

request​

@property
def request() -> IndexingRequest | None

The request this job was started from, or None for a raw body.

tasks​

@property
def tasks() -> builtins.list[IndexingTaskStatus]

The job's tasks as the server echoed them at submission.

started_at​

@property
def started_at() -> datetime | None

When the job started, when the server reported it.

ended_at​

@property
def ended_at() -> datetime | None

When the job ended, when the server reported it.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the job.

SearchIndex Objects​

class SearchIndex(RawBackedHandle)

One SAND index generation for a type (Index in the SAND spec).

Arguments:

  • raw - The generated Index model or a mapping with the same fields.

type_name​

@property
def type_name() -> str | None

The SAND type the index belongs to.

name​

@property
def name() -> str | None

The physical index name.

version​

@property
def version() -> int | None

The representation version.

to_dict​

def to_dict() -> JsonObject

Return {"type_name": ..., "name": ..., "version": ...}.

IndexFormatVersion Objects​

@dataclass(frozen=True, slots=True)
class IndexFormatVersion()

The index format SAND supports and whether existing indices need an upgrade.

Attributes:

  • index_format_version - The supported index format version.
  • upgrade_required - Whether the tenant's indices need to be upgraded (re-indexed) to that format.

index_format_version​

upgrade_required​

from_raw​

@classmethod
def from_raw(cls, raw: Any) -> IndexFormatVersion

Build from the generated IndexFormatUpgradeResponse or a mapping.

Arguments:

  • raw - Generated response model or mapping.

Returns:

The format version record.

to_dict​

def to_dict() -> JsonObject

Return the record as a plain dict.

TypeIndexStatus Objects​

@dataclass(frozen=True, slots=True)
class TypeIndexStatus()

Configuration status of one type as reported by refreshConfiguration.

Attributes:

  • type_name - The SAND type.
  • refresh_required - Whether the cached configuration differs from the stored one.
  • reindex_required - Whether the stored configuration needs a re-index.

type_name​

refresh_required​

reindex_required​

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot.

IndexOperationResult Objects​

@dataclass(frozen=True, slots=True)
class IndexOperationResult()

Outcome of a SAND POST /admin/operations call.

The server echoes neither the request parameters nor a single status for an all-types refreshConfiguration (live-verified): results is then keyed by type. type_name and status_only therefore come from the request when the response omits them, and the two flags aggregate over by_type (True when any type needs it, False when none does, None when the server reported nothing).

Attributes:

  • operation - The operation performed.
  • type_name - The type the operation targeted, or None for all types.
  • status_only - For refreshConfiguration, whether only the status was reported (no refresh performed).
  • refresh_required - Whether the cached configuration differs from the stored one (refreshConfiguration only).
  • reindex_required - Whether the stored configuration needs a re-index (refreshConfiguration only).
  • by_type - Per-type statuses when the operation covered several types.
  • raw - The generated OperationResponse model.

operation​

type_name​

status_only​

refresh_required​

reindex_required​

by_type​

raw​

from_raw​

@classmethod
def from_raw(cls,
raw: Any,
*,
request: OperationRequest | None = None) -> IndexOperationResult

Build from the generated OperationResponse or a mapping.

Arguments:

  • raw - Generated response model or mapping.
  • request - The request that produced the response; supplies the target type and status_only when the server omits them.

Returns:

The operation result.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary.

raw_dict​

def raw_dict() -> JsonObject

Return the full server response as plain data.

IndexingService Objects​

class IndexingService()

Start search-index jobs and manage SAND index generations.

Available as client.admin.indexing. See the module docstring for what is and is not wrapped.

Arguments:

  • datahub_api - Generated Data Hub API namespace.
  • sand_api - Generated SAND API namespace.

start​

def start(*,
request: IndexingRequest | None = None,
body: Any | None = None) -> IndexingJob

Start an indexing job through POST /admin/asyncJobs?new=true.

Arguments:

  • request - Typed job definition. See IndexingRequest.
  • body - Advanced escape hatch: a raw Job mapping or generated model, sent as is. Mutually exclusive with request.

Returns:

The submitted job. It has no refresh(); watch the VI Jobs page.

Raises:

  • AdminOperationError - When both or neither argument is given, the body is not a valid job, or the server rejects the job.

start_async​

async def start_async(*,
request: IndexingRequest | None = None,
body: Any | None = None) -> IndexingJob

Async variant of start.

Arguments:

  • request - Typed job definition.
  • body - Raw Job mapping or generated model, mutually exclusive with request.

Returns:

The submitted job.

Raises:

  • AdminOperationError - As for start.

start_full​

def start_full(
*,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingJob

Start a full re-index of every type.

Arguments:

  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The submitted job.

Raises:

  • AdminOperationError - When the server rejects the job.

start_full_async​

async def start_full_async(
*,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingJob

Async variant of start_full.

Arguments:

  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The submitted job.

Raises:

  • AdminOperationError - When the server rejects the job.

start_incremental​

def start_incremental(
*,
since: datetime,
entities: Sequence[str] = (),
relationships: Sequence[RelationshipIndexTarget | tuple[str, str]] = (),
transactions: Sequence[str] = (),
index_associated_objects: bool = True,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingJob

Start an incremental index of changes since since.

Arguments:

  • since - Aware datetime the window starts at.
  • entities - Entity type names to index; empty means every type.
  • relationships - Relationship targets (RelationshipIndexTarget or (name, from_entity) tuples).
  • transactions - Transaction type names to index.
  • index_associated_objects - Whether associated objects are indexed.
  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The submitted job.

Raises:

  • AdminOperationError - When since is naive, a name is blank, or the server rejects the job.

start_incremental_async​

async def start_incremental_async(
*,
since: datetime,
entities: Sequence[str] = (),
relationships: Sequence[RelationshipIndexTarget | tuple[str, str]] = (),
transactions: Sequence[str] = (),
index_associated_objects: bool = True,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingJob

Async variant of start_incremental.

Arguments:

  • since - Aware datetime the window starts at.
  • entities - Entity type names to index.
  • relationships - Relationship targets.
  • transactions - Transaction type names to index.
  • index_associated_objects - Whether associated objects are indexed.
  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The submitted job.

Raises:

  • AdminOperationError - As for start_incremental.

start_for​

def start_for(
*,
entities: Sequence[str] = (),
relationships: Sequence[RelationshipIndexTarget | tuple[str, str]] = (),
transactions: Sequence[str] = (),
index_associated_objects: bool = True,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingJob

Start a scoped index of only the listed types.

Arguments:

  • entities - Entity type names to index.
  • relationships - Relationship targets (RelationshipIndexTarget or (name, from_entity) tuples).
  • transactions - Transaction type names to index.
  • index_associated_objects - False indexes only the listed objects, not the objects associated with them.
  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The submitted job.

Raises:

  • AdminOperationError - When no target is given, a name is blank, or the server rejects the job.

start_for_async​

async def start_for_async(
*,
entities: Sequence[str] = (),
relationships: Sequence[RelationshipIndexTarget | tuple[str, str]] = (),
transactions: Sequence[str] = (),
index_associated_objects: bool = True,
name: str = DEFAULT_INDEXING_JOB_NAME,
description: str | None = None,
tags: Sequence[str] = ()) -> IndexingJob

Async variant of start_for.

Arguments:

  • entities - Entity type names to index.
  • relationships - Relationship targets.
  • transactions - Transaction type names to index.
  • index_associated_objects - Whether associated objects are indexed.
  • name - Job name.
  • description - Optional job description.
  • tags - Optional job tags.

Returns:

The submitted job.

Raises:

  • AdminOperationError - As for start_for.

ensure_indices​

def ensure_indices(
*,
searchable: bool = True,
limit: int = 1000,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> builtins.list[SearchIndex]

Ensure every type has an index, creating missing ones (POST /admin/indices).

With searchable=False a new, not-yet-searchable generation is created for every type; that is the first step of a re-index. This method never pages: the endpoint creates indices on every call.

Arguments:

  • searchable - Whether created indices are searchable at once.
  • limit - Maximum number of indices in the single response. A full page is logged as a WARNING.
  • timeout - Read budget in seconds for this call. Creating a generation for every type outlives the client-wide default on a populated tenant (87 types timed out live, 2026-09-13).

Returns:

The indices the server reported.

Raises:

  • AdminOperationError - When limit is not positive or the server rejects the call.
  • ValueError - When timeout is not a positive number.

ensure_indices_async​

async def ensure_indices_async(
*,
searchable: bool = True,
limit: int = 1000,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> builtins.list[SearchIndex]

Async variant of ensure_indices.

Arguments:

  • searchable - Whether created indices are searchable at once.
  • limit - Maximum number of indices in the single response.
  • timeout - Read budget in seconds for this call.

Returns:

The indices the server reported.

Raises:

  • AdminOperationError - When limit is not positive or the server rejects the call.
  • ValueError - When timeout is not a positive number.

ensure_index​

def ensure_index(
*,
type_name: str,
searchable: bool = True,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> SearchIndex

Ensure one type has an index (POST /admin/indices/{type}).

Arguments:

  • type_name - The SAND type name.
  • searchable - Whether a created index is searchable at once.
  • timeout - Read budget in seconds for this call.

Returns:

The index the server reported.

Raises:

  • AdminNotFoundError - When the type does not exist.
  • AdminOperationError - When the server rejects the call.
  • ValueError - When timeout is not a positive number.

ensure_index_async​

async def ensure_index_async(
*,
type_name: str,
searchable: bool = True,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> SearchIndex

Async variant of ensure_index.

Arguments:

  • type_name - The SAND type name.
  • searchable - Whether a created index is searchable at once.
  • timeout - Read budget in seconds for this call.

Returns:

The index the server reported.

Raises:

  • AdminNotFoundError - When the type does not exist.
  • AdminOperationError - When the server rejects the call.
  • ValueError - When timeout is not a positive number.

make_searchable​

def make_searchable(
*,
type_name: str | None = None,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> IndexOperationResult

Promote the newest index generation and delete the older ones.

Runs the SAND makeIndexSearchable operation. Older generations of the type (or of every type) are deleted; run it only after the new generation has been loaded.

Arguments:

  • type_name - The type to promote, or None for every type.
  • timeout - Per-call read timeout in seconds; the swap outlives the client-wide default on large tenants.

Returns:

The operation result.

Raises:

  • AdminNotFoundError - When type_name is not a configured type.
  • AdminOperationError - When the server rejects the operation.
  • ValueError - When timeout is not a positive number.

make_searchable_async​

async def make_searchable_async(
*,
type_name: str | None = None,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> IndexOperationResult

Async variant of make_searchable.

Arguments:

  • type_name - The type to promote, or None for every type.
  • timeout - Per-call read timeout in seconds.

Returns:

The operation result.

Raises:

  • AdminNotFoundError - When type_name is not a configured type.
  • AdminOperationError - When the server rejects the operation.
  • ValueError - When timeout is not a positive number.

refresh_configuration​

def refresh_configuration(
*,
type_name: str | None = None,
status_only: bool = False,
wait: bool = False,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> IndexOperationResult

Refresh SAND's cached configuration, or only report whether it is stale.

status_only is always sent explicitly because the server default (true) is the opposite of this method's default. Even a status-only call compares every configured type against its index, which takes tens of seconds on a mid-sized tenant; pass type_name to narrow it.

Arguments:

  • type_name - The type to refresh, or None for every type.
  • status_only - True reports refresh_required / reindex_required without refreshing.
  • wait - Whether the server waits for index operations to apply before answering.
  • timeout - Per-call read timeout in seconds.

Returns:

The operation result.

Raises:

  • AdminNotFoundError - When type_name is not a configured type.
  • AdminOperationError - When the server rejects the operation.
  • ValueError - When timeout is not a positive number.

refresh_configuration_async​

async def refresh_configuration_async(
*,
type_name: str | None = None,
status_only: bool = False,
wait: bool = False,
timeout: float = DEFAULT_INDEX_OPERATION_TIMEOUT_SECONDS
) -> IndexOperationResult

Async variant of refresh_configuration.

Arguments:

  • type_name - The type to refresh, or None for every type.
  • status_only - Report status without refreshing.
  • wait - Whether the server waits for index operations to apply.
  • timeout - Per-call read timeout in seconds.

Returns:

The operation result.

Raises:

  • AdminNotFoundError - When type_name is not a configured type.
  • AdminOperationError - When the server rejects the operation.
  • ValueError - When timeout is not a positive number.

index_name​

def index_name(*, type_name: str) -> SearchIndex | None

Look up the searchable index of one type (GET /admin/indices/{type}).

Arguments:

  • type_name - The SAND type name.

Returns:

The index, or None when the type has none or does not exist.

Raises:

  • AdminOperationError - When the server rejects the call.

index_name_async​

async def index_name_async(*, type_name: str) -> SearchIndex | None

Async variant of index_name.

Arguments:

  • type_name - The SAND type name.

Returns:

The index, or None when the type has none or does not exist.

Raises:

  • AdminOperationError - When the server rejects the call.

format_version​

def format_version() -> IndexFormatVersion

Report the index format SAND supports (GET /admin/indices/version).

Returns:

The format version and whether an upgrade is required.

Raises:

  • AdminOperationError - When the server rejects the call.

format_version_async​

async def format_version_async() -> IndexFormatVersion

Async variant of format_version.

Returns:

The format version and whether an upgrade is required.

Raises:

  • AdminOperationError - When the server rejects the call.

Logic expressions: the conditions that make up an alert routing rule.

Wraps the alert service's /logicExpressions collection. Each expression belongs to one routing rule and compares one property (property_name) against value_text with a condition_code such as EQ. The spec keeps condition_code a free string, so no closed set is enforced here.

PUT /logicExpressions/{id} documents 412 and 428 responses but the spec declares no precondition header. The generator adds If-Match to the operation, get keeps the response ETag on the record, and update sends it. The alert service accepts a PUT whose If-Match names an older ETag (live-verified 2026-09-18), so update reads the current ETag just before the PUT and raises AdminConflictError itself when the caller's if_match is stale; a 409 or 412 from the server maps to the same error.

LogicExpressionInput Objects​

@dataclass(frozen=True, slots=True)
class LogicExpressionInput(_TypedInput)

Typed input for creating or replacing a logic expression.

Attributes:

  • routing_rule_id - The routing rule the expression belongs to.
  • property_name - The alert or event property the condition reads.
  • condition_code - The comparison operator (EQ is the only value observed; the spec leaves it open).
  • value_text - The value compared against, if the condition needs one.
  • logic_expression_id - The expression id; filled from the path on update when omitted.

routing_rule_id​

property_name​

condition_code​

value_text​

logic_expression_id​

to_payload​

def to_payload() -> LogicExpressionRep

Return the generated LogicExpressionRep (None fields stay UNSET).

LogicExpressionRecord Objects​

class LogicExpressionRecord(_AlertAdminRecord)

Curated record for one logic expression.

logic_expression_id​

@property
def logic_expression_id() -> str | None

The expression's identifier.

id​

@property
def id() -> str | None

The expression's identifier (alias for logic_expression_id).

routing_rule_id​

@property
def routing_rule_id() -> str | None

The routing rule the expression belongs to.

property_name​

@property
def property_name() -> str | None

The property the condition reads.

condition_code​

@property
def condition_code() -> str | None

The comparison operator.

value_text​

@property
def value_text() -> str | None

The value compared against.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the expression.

LogicExpressionsService Objects​

class LogicExpressionsService(_AdminServiceBase)

List, inspect, create, replace and delete routing-rule logic expressions.

Available as client.admin.logic_expressions.

list​

def list(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[LogicExpressionRecord]

List logic expressions (one page).

A WARNING is logged when the server reports more expressions than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression, e.g. eq(routingRuleId,'...').
  • accept_item - Optional accept header override.

Returns:

Bound expression records.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None
) -> builtins.list[LogicExpressionRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound expression records.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[LogicExpressionRecord]

List every logic expression, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound expression records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[LogicExpressionRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound expression records across every page.

Raises:

  • AdminOperationError - As for list_all.

get​

def get(*, logic_expression_id: str) -> LogicExpressionRecord | None

Fetch one logic expression by id.

Arguments:

  • logic_expression_id - Expression identifier.

Returns:

The bound record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(*,
logic_expression_id: str) -> LogicExpressionRecord | None

Async variant of get.

Arguments:

  • logic_expression_id - Expression identifier.

Returns:

The bound record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
spec: LogicExpressionInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> LogicExpressionRecord

Create a logic expression.

Arguments:

  • spec - Typed input.
  • body - Advanced escape hatch: a raw LogicExpressionRep mapping or generated model. Mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, the server rejects the call, or it returns no payload.

create_async​

async def create_async(
*,
spec: LogicExpressionInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> LogicExpressionRecord

Async variant of create.

Arguments:

  • spec - Typed input.
  • body - Raw payload, mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
logic_expression_id: str,
spec: LogicExpressionInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> LogicExpressionRecord

Replace a logic expression (PUT /logicExpressions/{id}).

With spec the current expression is fetched first and the typed fields laid over it: the service requires the audit fields (modifiedTimeStamp and friends) to be echoed back (live-verified 2026-09-13), so a bare typed body would be rejected. body is sent as is.

The PUT carries If-Match. With spec it is the ETag of the fetch the merge is built on. With body pass if_match=record.etag from the get the body came from; without it the ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • logic_expression_id - Expression identifier. Filled into spec.logic_expression_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw LogicExpressionRep mapping or generated model. Mutually exclusive with spec.
  • if_match - ETag the expression must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated record.

Raises:

  • AdminConflictError - When the expression changed since the ETag was read (HTTP 412).
  • AdminNotFoundError - When the expression does not exist.
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, the server rejects the call, or it returns no payload.

update_async​

async def update_async(*,
logic_expression_id: str,
spec: LogicExpressionInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> LogicExpressionRecord

Async variant of update.

Arguments:

  • logic_expression_id - Expression identifier.
  • spec - Typed replacement.
  • body - Raw payload, mutually exclusive with spec.
  • if_match - ETag the expression must still have, from the etag of the record get returned. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated record.

Raises:

  • AdminConflictError - When the expression changed since the ETag was read (HTTP 412).
  • AdminNotFoundError - When the expression does not exist.
  • AdminOperationError - As for update.

delete​

def delete(*, logic_expression_id: str) -> None

Delete a logic expression by id.

Arguments:

  • logic_expression_id - Expression identifier.

Raises:

  • AdminNotFoundError - When the expression does not exist.
  • AdminOperationError - When the server rejects the call.

delete_async​

async def delete_async(*, logic_expression_id: str) -> None

Async variant of delete.

Arguments:

  • logic_expression_id - Expression identifier.

Raises:

  • AdminNotFoundError - When the expression does not exist.
  • AdminOperationError - When the server rejects the call.

Alert queue configuration records and the QueuesService handle.

QueueInput Objects​

@dataclass(frozen=True, slots=True)
class QueueInput(_TypedInput)

Typed input for creating or replacing an alert queue.

Every field maps to the same-named QueueRep attribute; None fields are left unset so the server applies its defaults. Build one from an existing record with from_record and dataclasses.replace the fields to change.

Attributes:

  • queue_name - Display name (required).
  • queue_id - Queue id; filled from the path on update when omitted.
  • domain_id - Alert domain the queue belongs to.
  • queue_description - Descriptive text.
  • user_created_queue - Whether the queue was created by a user.
  • queue_priority - Priority relative to other queues.
  • queue_status - Lifecycle status (ACTIVE / INACTIVE).
  • service_sort_field - Field alerts are served by.
  • service_sort_order - Sort order for that field.
  • suppress_default_duration - Default suppression duration.
  • hold_default_duration - Default hold duration.
  • queue_auto_close_days - Days after which alerts auto-close.
  • queue_auto_activate_score - Score that reactivates an alert.
  • queue_auto_activate_delta - Score delta that reactivates an alert.
  • default_process_id - Default workflow process id.
  • queue_sticky - Whether alerts stay in the queue once routed.
  • accept_manual_alerts - Whether analysts can create alerts here.
  • strategy_id - Owning strategy id.
  • dispositions - Queue disposition assignments, as raw mappings.
  • routing_rule - Routing rule reference.
  • auto_disposition_id - Disposition applied automatically.

queue_name​

queue_id​

domain_id​

queue_description​

user_created_queue​

queue_priority​

queue_status​

service_sort_field​

service_sort_order​

suppress_default_duration​

hold_default_duration​

queue_auto_close_days​

queue_auto_activate_score​

queue_auto_activate_delta​

default_process_id​

queue_sticky​

accept_manual_alerts​

strategy_id​

dispositions​

routing_rule​

auto_disposition_id​

to_payload​

def to_payload() -> QueueRep

Return the generated QueueRep (None fields stay UNSET).

QueueRecord Objects​

class QueueRecord(_AlertAdminRecord)

Curated record for one alert-management queue.

queue_id​

@property
def queue_id() -> str | None

The queue's identifier.

id​

@property
def id() -> str | None

The queue's identifier (alias for queue_id).

queue_name​

@property
def queue_name() -> str | None

The queue's display name.

domain_id​

@property
def domain_id() -> str | None

The identifier of the alert domain this queue belongs to.

queue_status​

@property
def queue_status() -> str | None

The queue's lifecycle status (e.g. active or inactive).

QueuesService Objects​

class QueuesService(_AdminServiceBase)

Service for listing and inspecting alert-management queues.

list​

def list(*,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[QueueRecord]

List alert queues.

Reads one page. A WARNING is logged when the server reports more queues than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • user_id - Optional user id the queues are filtered for.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[QueueRecord]

Async variant of list.

Arguments:

  • user_id - Optional user id the queues are filtered for.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(*,
user_id: str | None = None,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[QueueRecord]

List every one of the queues, paging until exhausted.

Arguments:

  • user_id - Optional user id the queues are filtered for.
  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.
  • IncompleteListingError - When the server stops advancing or the page cap is reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
user_id: str | None = None,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[QueueRecord]

Async variant of list_all.

Arguments:

  • user_id - Optional user id the queues are filtered for.
  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound records across every page.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

get​

def get(*, queue_id: str) -> QueueRecord | None

Fetch one alert queue by id.

Arguments:

  • queue_id - Queue identifier.

Returns:

The bound queue record, or None when not found.

get_async​

async def get_async(*, queue_id: str) -> QueueRecord | None

Asynchronously fetch one alert queue by id.

Arguments:

  • queue_id - Queue identifier.

Returns:

The bound queue record, or None when not found.

create​

def create(*,
spec: QueueInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> QueueRecord | None

Create an alert queue.

The service requires user_created_queue, queue_status, queue_sticky and strategy_id on a create. A typed spec that leaves them unset gets True, "ACTIVE" and False for the first three, and the default strategy of its domain_id for the last (one extra read). A raw body is sent as is.

Arguments:

  • spec - Typed queue input.
  • body - Advanced escape hatch: a raw or generated QueueRep payload sent as is. Mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created bound queue record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, the spec names neither a strategy nor a domain with a single default strategy, or the server rejects the call.

create_async​

async def create_async(*,
spec: QueueInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> QueueRecord | None

Asynchronously create an alert queue.

Fills the same create defaults as create.

Arguments:

  • spec - Typed queue input.
  • body - Raw or generated QueueRep payload, mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created bound queue record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
queue_id: str,
spec: QueueInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> QueueRecord | None

Replace an alert queue by id, guarded by If-Match.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the queue's current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live.

Arguments:

  • queue_id - Queue identifier. Filled into spec.queue_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated QueueRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the queue must still have, from QueueRecord.etag.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound queue record.

Raises:

  • AdminConflictError - When the queue changed since the ETag was read (HTTP 412).
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
queue_id: str,
spec: QueueInput | None = None,
body: Any | None = None,
if_match: str | None = None,
force: bool = False) -> QueueRecord | None

Asynchronously replace an alert queue by id, guarded by If-Match.

Arguments:

  • queue_id - Queue identifier.
  • spec - Typed replacement.
  • body - Raw or generated QueueRep payload, mutually exclusive with spec.
  • if_match - ETag the queue must still have, from QueueRecord.etag. Read just before the PUT when omitted.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound queue record.

Raises:

  • AdminConflictError - As for update.
  • AdminOperationError - As for update.

delete​

def delete(*, queue_id: str) -> None

Delete an alert queue by id.

The SDK runs no referential pre-check; the server refuses a queue that a disposition still reroutes to, and a soft-deleted disposition still counts. Clear that disposition's reroute_queue_id first.

Arguments:

  • queue_id - Queue identifier.

Raises:

  • AdminNotFoundError - When no queue has that id (HTTP 404).
  • AdminConflictError - When the server reports a conflict (HTTP 409).
  • AdminOperationError - When the server refuses the delete for any other reason, such as a queue a disposition still reroutes to (HTTP 400).

delete_async​

async def delete_async(*, queue_id: str) -> None

Asynchronously delete an alert queue by id.

Arguments:

  • queue_id - Queue identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminConflictError - As for delete.
  • AdminOperationError - As for delete.

Curated record wrappers for SAS Visual Investigator admin/config payloads.

Provides a generic GenericAdminRecord fallback plus lightweight typed subclasses that normalize the varying id/name/label key conventions across the datahub, SAND, and alerts configuration endpoints.

GenericAdminRecord Objects​

class GenericAdminRecord(RawBackedHandle)

Fallback curated wrapper for config/admin payloads without handwritten records yet.

Arguments:

  • raw - Generated payload for the admin/configuration record.

etag​

@property
def etag() -> str | None

The ETag the server sent with this record, when get read it.

Pass it as if_match= to the service's update so an edit made by someone else since this read fails with AdminConflictError. None for records that came from a listing, a create or an update, and for services whose get does not read the header.

id​

@property
def id() -> str | int | None

The record's identifier, resolved across known id key conventions.

name​

@property
def name() -> str | None

The record's programmatic name.

label​

@property
def label() -> str | None

The record's human-readable display label.

description​

@property
def description() -> str | None

The record's descriptive text.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the fallback admin record.

SearchTypeRecord Objects​

class SearchTypeRecord(GenericAdminRecord)

Curated record for one SAND search-type configuration.

config​

@property
def config() -> JsonObject

The search type's configuration payload as a plain dict.

events​

@property
def events() -> list[JsonObject]

The event definitions declared in the search type's configuration.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot including config and events.

IconRecord Objects​

class IconRecord(GenericAdminRecord)

Curated record for one icon's metadata.

IconDecorationRecord Objects​

class IconDecorationRecord(GenericAdminRecord)

Curated record for one object type's icon decoration metadata.

DataStoreRecord Objects​

class DataStoreRecord(GenericAdminRecord)

Curated record for one configured data store.

TransactionTypeRecord Objects​

class TransactionTypeRecord(GenericAdminRecord)

Curated record for one configured transaction type.

ScenarioTagRecord Objects​

class ScenarioTagRecord(GenericAdminRecord)

Curated record for one scenario tag.

TriageDefinitionRecord Objects​

class TriageDefinitionRecord(GenericAdminRecord)

Curated record for one alert triage definition.

RoutingRuleRecord Objects​

class RoutingRuleRecord(GenericAdminRecord)

Curated record for one alert routing rule.

EnrichmentFieldRecord Objects​

class EnrichmentFieldRecord(GenericAdminRecord)

Curated record for one alert enrichment field.

Relationship-type configuration records and their admin service.

The definitions are in sasvi._relationship_types, below this package, because the documents layer reads relationship types too. They stay importable from here.

GeoJSON shape management for the SAND configuration namespace.

The handwritten search DSL already consumes stored shape IDs through F.geo_shape(id=...). This module closes the loop by letting users list, create, update and delete the stored shape library that those filters refer to, and by giving Shape a .as_filter() shortcut so a freshly-created shape can drop straight into a Search.

Shape Objects​

class Shape(RawBackedHandle)

Curated record for one stored GeoJSON shape.

Arguments:

  • raw - Generated GeoJsonShape payload or mapping.

id​

@property
def id() -> str | None

The stored shape's server-assigned identifier.

name​

@property
def name() -> str | None

The shape's human-readable name.

group​

@property
def group() -> str | None

The shape's logical grouping label, if any.

solution​

@property
def solution() -> str | None

The solution scope the shape belongs to.

geometry​

@property
def geometry() -> JsonObject | None

The GeoJSON geometry as a plain dict, or None when unset.

version​

@property
def version() -> int | None

ETag captured at fetch/update time, if any.

as_filter​

def as_filter(relation: str = "within") -> GeoShapeFilterExpr

Return a search-DSL filter targeting this stored shape by id.

Arguments:

  • relation - Spatial relation forwarded to SAND. One of "within", "contains", "intersects", or "disjoint".

Returns:

A GeoShapeFilterExpr that can be passed to Search.filter(...).

Raises:

  • AdminOperationError - If this shape has no id (i.e. it has not been persisted yet).

ShapesService Objects​

class ShapesService()

Service for the SAND-hosted reusable GeoJSON shape library.

The underlying endpoints are /admin/config/shapes. Updates use the server's ETag for optimistic concurrency; the service captures the ETag on read and attaches If-Match on write, mirroring the reference-list pattern.

Arguments:

  • sand_api - Generated SAND API namespace.

list​

def list(*,
group: str | None = None,
name_contains: str | None = None,
sort_by: str | None = None,
page_size: int = 50,
max_items: int | None = None) -> builtins.list[Shape]

List stored shapes, paginated transparently.

Arguments:

  • group - Optional exact-or-contains group filter. SAND's filter grammar supports only contains and and on name/ group, so the value is rendered as a contains clause. The match is case-sensitive.
  • name_contains - Optional contains filter on the shape name. The match is case-sensitive.
  • sort_by - Optional sort criterion forwarded as-is.
  • page_size - Page size used while paginating.
  • max_items - Optional cap on the total number of shapes returned.

Returns:

A list of Shape records.

Raises:

  • IncompleteListingError - When the listing cannot be finished because the server stopped advancing or the page cap was reached. The partial result and the offset to resume from are on the error.
  • AdminOperationError - When the server rejects a page.

list_async​

async def list_async(*,
group: str | None = None,
name_contains: str | None = None,
sort_by: str | None = None,
page_size: int = 50,
max_items: int | None = None) -> builtins.list[Shape]

Async variant of list.

Arguments:

  • group - Optional contains filter on the group label.
  • name_contains - Optional contains filter on the shape name.
  • sort_by - Optional sort criterion forwarded as-is.
  • page_size - Page size used while paginating.
  • max_items - Optional cap on the total number of shapes returned.

Returns:

A list of Shape records.

Raises:

  • IncompleteListingError - As for list.
  • AdminOperationError - As for list.

get​

def get(*, shape_id: str) -> Shape | None

Fetch one shape by id, capturing its ETag for later updates.

Arguments:

  • shape_id - Server-assigned shape identifier.

Returns:

The bound Shape, or None if no shape with that id exists.

get_async​

async def get_async(*, shape_id: str) -> Shape | None

Async variant of get.

Arguments:

  • shape_id - Server-assigned shape identifier.

Returns:

The bound Shape, or None if no shape with that id exists.

create​

def create(*,
name: str,
geometry: Mapping[str, Any],
group: str | None = None,
solution: str | None = None,
shape_id: str | None = None) -> Shape

Create a new stored shape.

Arguments:

  • name - Human-readable shape name.
  • geometry - GeoJSON geometry (or geometry collection) as a mapping.
  • group - Optional logical grouping label.
  • solution - Optional solution scope; defaults server-side to "default".
  • shape_id - Optional client-supplied id. Conflicts on the server surface as AdminOperationError.

Returns:

The created Shape.

Raises:

  • AdminOperationError - If the server accepts the request but returns no shape payload, or rejects a conflicting shape_id.

create_async​

async def create_async(*,
name: str,
geometry: Mapping[str, Any],
group: str | None = None,
solution: str | None = None,
shape_id: str | None = None) -> Shape

Async variant of create.

Arguments:

  • name - Human-readable shape name.
  • geometry - GeoJSON geometry (or geometry collection) as a mapping.
  • group - Optional logical grouping label.
  • solution - Optional solution scope.
  • shape_id - Optional client-supplied id.

Returns:

The created Shape.

Raises:

  • AdminOperationError - As for create.

update​

def update(shape: Shape) -> Shape

Persist edits to a shape, using its captured ETag for concurrency.

Arguments:

  • shape - Modified Shape previously returned by get or create. Edit the underlying GeoJsonShape payload before calling, or pass a freshly-constructed payload with the target id.

Returns:

The updated Shape, carrying the ETag the server returned as version.

Raises:

  • AdminConflictError - When the shape changed since it was read (HTTP 409 or 412).
  • AdminOperationError - When the shape has no id, no longer exists, its payload is a mapping the shape model rejects, or the server sent no ETag to read; SAND requires If-Match on this route, so nothing is sent in that case.

update_async​

async def update_async(shape: Shape) -> Shape

Async variant of update.

Arguments:

  • shape - Modified Shape previously returned by get_async or create_async, or a freshly-constructed payload with the target id.

Returns:

The updated Shape, carrying the ETag the server returned as version.

Raises:

  • AdminConflictError - As for update.
  • AdminOperationError - As for update.

delete​

def delete(*, shape_id: str) -> None

Delete one shape by id.

Arguments:

  • shape_id - Server-assigned shape identifier.

Raises:

  • AdminNotFoundError - When no shape of that id exists (HTTP 404).
  • AdminOperationError - When the server refuses the delete.

delete_async​

async def delete_async(*, shape_id: str) -> None

Async variant of delete.

Arguments:

  • shape_id - Server-assigned shape identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminOperationError - As for delete.

delete_all​

def delete_all() -> None

Delete every stored shape. Use with care.

Raises:

  • AdminOperationError - When the server refuses the delete.

delete_all_async​

async def delete_all_async() -> None

Async variant of delete_all.

Raises:

  • AdminOperationError - As for delete_all.

Alert strategy configuration records and the StrategiesService handle.

StrategyInput Objects​

@dataclass(frozen=True, slots=True)
class StrategyInput(_TypedInput)

Typed input for creating or replacing an alert strategy.

None fields are left unset so the server applies its defaults.

Attributes:

  • strategy_name - Display name (required).
  • strategy_id - Strategy id; filled from the path on update when omitted.
  • domain_id - Alert domain the strategy belongs to.
  • strategy_description - Descriptive text.
  • user_created_strategy - Whether the strategy was created by a user.
  • strategy_priority - Priority relative to other strategies.
  • strategy_status - Lifecycle status (ACTIVE / INACTIVE).
  • presentation_mode - How alerts are presented to analysts.
  • auto_service_type - Automatic alert-serving mode.
  • all_users - Whether every user can work the strategy.
  • group_id - Group allowed to work the strategy when not all_users.
  • disp_url_template - URL template opened on disposition.
  • disp_document_type_name - Document type created on disposition.
  • disp_document_type_id - That document type's id.
  • score_range_low - Lower bound of the alert score range.
  • score_range_high - Upper bound of the alert score range.
  • triage_definition_id - Triage definition used to list alerts.
  • triage_definition - Inline triage definition, as a raw mapping.
  • generate_workspace - Whether a workspace is generated per alert.
  • workspace_level - Depth of the generated workspace.
  • solution_id - Owning solution id.
  • queues - Queues of the strategy, as raw mappings.

strategy_name​

strategy_id​

domain_id​

strategy_description​

user_created_strategy​

strategy_priority​

strategy_status​

presentation_mode​

auto_service_type​

all_users​

group_id​

disp_url_template​

disp_document_type_name​

disp_document_type_id​

score_range_low​

score_range_high​

triage_definition_id​

triage_definition​

generate_workspace​

workspace_level​

solution_id​

queues​

to_payload​

def to_payload() -> StrategyRep

Return the generated StrategyRep (None fields stay UNSET).

StrategyRecord Objects​

class StrategyRecord(_AlertAdminRecord)

Curated record for one alert-generation strategy.

strategy_id​

@property
def strategy_id() -> str | None

The strategy's identifier.

id​

@property
def id() -> str | None

The strategy's identifier (alias for strategy_id).

strategy_name​

@property
def strategy_name() -> str | None

The strategy's display name.

domain_id​

@property
def domain_id() -> str | None

The identifier of the alert domain this strategy belongs to.

strategy_status​

@property
def strategy_status() -> str | None

The strategy's lifecycle status (e.g. active or inactive).

ScenarioRecord Objects​

class ScenarioRecord(RawBackedHandle)

Curated record for one scenario attached to an alert strategy.

Keys the service sends beyond the properties below stay reachable through raw and raw_dict().

Arguments:

  • raw - Generated ScenarioRep payload or mapping.

scenario_id​

@property
def scenario_id() -> str | None

The scenario's identifier.

id​

@property
def id() -> str | None

The scenario's identifier (alias for scenario_id).

scenario_name​

@property
def scenario_name() -> str | None

The scenario's display name.

scenario_description​

@property
def scenario_description() -> str | None

The scenario's descriptive text, or None when the service sends none.

strategy_id​

@property
def strategy_id() -> str | None

The identifier of the strategy the scenario is attached to.

version​

@property
def version() -> int | None

The scenario's version number.

QueueMetricsRecord Objects​

class QueueMetricsRecord(RawBackedHandle)

Today's alert counts and ages for one queue of a strategy.

Arguments:

  • raw - Generated QueueMetricsRep payload or mapping.

queue_id​

@property
def queue_id() -> str | None

The identifier of the queue the metrics describe.

id​

@property
def id() -> str | None

The identifier of the queue the metrics describe (alias for queue_id).

queue_name​

@property
def queue_name() -> str | None

The queue's display name.

active_alerts​

@property
def active_alerts() -> int | None

The number of active alerts in the queue.

num_serviceable​

@property
def num_serviceable() -> int | None

The number of alerts an analyst can be served from the queue.

high_count​

@property
def high_count() -> int | None

The number of alerts in the high score band.

med_count​

@property
def med_count() -> int | None

The number of alerts in the medium score band.

low_count​

@property
def low_count() -> int | None

The number of alerts in the low score band.

none_count​

@property
def none_count() -> int | None

The number of alerts outside every score band.

unscored_count​

@property
def unscored_count() -> int | None

The number of alerts that have no score.

median_score​

@property
def median_score() -> float | None

The median alert score, or None when the queue has none to report.

median_age_hours​

@property
def median_age_hours() -> float | None

The median alert age in hours (median_age on the wire).

oldest_age_hours​

@property
def oldest_age_hours() -> float | None

The age of the oldest alert in hours (oldest on the wire).

StrategiesService Objects​

class StrategiesService(_AdminServiceBase)

Service for listing and inspecting alert-generation strategies.

list​

def list(*,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[StrategyRecord]

List alert strategies.

Reads one page. A WARNING is logged when the server reports more strategies than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • user_id - Optional user id for strategy filtering.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound strategy records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_page​

def list_page(*,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> Page[StrategyRecord]

Fetch one page of strategies, keeping the server's reported count.

page.items holds the records and page.total the number of strategies the server reports for the whole listing.

Arguments:

  • user_id - Optional user id for strategy filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of strategies to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

One page of bound strategy records with the server's total.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[StrategyRecord]

Asynchronously list alert strategies.

Arguments:

  • user_id - Optional user id for strategy filtering.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound strategy records for one page.

Raises:

  • AdminOperationError - When the server rejects the call.

list_page_async​

async def list_page_async(
*,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> Page[StrategyRecord]

Async variant of list_page.

Arguments:

  • user_id - Optional user id for strategy filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of strategies to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

One page of bound strategy records with the server's total.

Raises:

  • AdminOperationError - When the server rejects the call.

get​

def get(*, strategy_id: str) -> StrategyRecord | None

Fetch one alert strategy by id.

Arguments:

  • strategy_id - Strategy identifier.

Returns:

The bound strategy record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(*, strategy_id: str) -> StrategyRecord | None

Asynchronously fetch one alert strategy by id.

Arguments:

  • strategy_id - Strategy identifier.

Returns:

The bound strategy record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(*,
user_id: str | None = None,
batch_size: int = 100,
max_items: int | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[StrategyRecord]

List every alert strategy, paging until exhausted.

Arguments:

  • user_id - Optional user id for strategy filtering.
  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • start - Optional initial zero-based page offset.
  • limit - Older spelling of batch_size; wins when given.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound strategy records across all result pages.

Raises:

  • AdminOperationError - When the page size is not positive, or the server rejects a page.
  • IncompleteListingError - When the listing cannot be finished because the server stopped advancing or the page cap was reached. The offset to resume from is on the error.

list_all_async​

async def list_all_async(
*,
user_id: str | None = None,
batch_size: int = 100,
max_items: int | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None,
accept_item: str | None = None) -> builtins.list[StrategyRecord]

Async variant of list_all.

Arguments:

  • user_id - Optional user id for strategy filtering.
  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • start - Optional initial zero-based page offset.
  • limit - Older spelling of batch_size; wins when given.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.
  • accept_item - Optional accept header override.

Returns:

Bound strategy records across all result pages.

Raises:

  • AdminOperationError - As for list_all.
  • IncompleteListingError - As for list_all.

create​

def create(*,
spec: StrategyInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> StrategyRecord | None

Create an alert strategy.

Arguments:

  • spec - Typed strategy input.
  • body - Advanced escape hatch: a raw or generated StrategyRep payload sent as is. Mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created bound strategy record.

Raises:

  • AdminOperationError - When both or neither of spec/body is given, or the server rejects the call.

create_async​

async def create_async(
*,
spec: StrategyInput | None = None,
body: Any | None = None,
accept_item: str | None = None) -> StrategyRecord | None

Asynchronously create an alert strategy.

Arguments:

  • spec - Typed strategy input.
  • body - Raw or generated StrategyRep payload, mutually exclusive with spec.
  • accept_item - Optional accept header override.

Returns:

The created bound strategy record.

Raises:

  • AdminOperationError - As for create.

update​

def update(*,
strategy_id: str,
spec: StrategyInput | None = None,
body: Any | None = None,
if_match: str | None = None,
if_unmodified_since: str | None = None,
force: bool = False) -> StrategyRecord | None

Replace an alert strategy by id, guarded by If-Match.

Pass if_match=record.etag from the get the edit is based on to guard the whole read-modify-write. Without it the strategy's current ETag is read just before the PUT, which only covers the time between those two requests. Whether the tenant honours If-Match on this route is not yet verified live, so the SDK compares the ETags itself.

Arguments:

  • strategy_id - Strategy identifier. Filled into spec.strategy_id when the spec leaves it empty.
  • spec - Typed replacement.
  • body - Advanced escape hatch: a raw or generated StrategyRep payload sent as is. Mutually exclusive with spec.
  • if_match - ETag the strategy must still have, from StrategyRecord.etag.
  • if_unmodified_since - Optional optimistic-lock timestamp, sent as given.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound strategy record.

Raises:

  • AdminConflictError - When the strategy changed since the ETag was read (HTTP 412).
  • AdminOperationError - When both or neither of spec/body is given, the spec carries a different id, or the server rejects the call.

update_async​

async def update_async(*,
strategy_id: str,
spec: StrategyInput | None = None,
body: Any | None = None,
if_match: str | None = None,
if_unmodified_since: str | None = None,
force: bool = False) -> StrategyRecord | None

Asynchronously replace an alert strategy by id, guarded by If-Match.

Arguments:

  • strategy_id - Strategy identifier.
  • spec - Typed replacement.
  • body - Raw or generated StrategyRep payload, mutually exclusive with spec.
  • if_match - ETag the strategy must still have, from StrategyRecord.etag. Read just before the PUT when omitted.
  • if_unmodified_since - Optional optimistic-lock timestamp, sent as given.
  • force - Send no If-Match and overwrite whatever is there. Logs a WARNING. Wins over if_match.

Returns:

The updated bound strategy record.

Raises:

  • AdminConflictError - As for update.
  • AdminOperationError - As for update.

delete​

def delete(*, strategy_id: str) -> None

Delete an alert strategy by id.

The SDK runs no referential pre-check; the server refuses a strategy that is still in use.

Arguments:

  • strategy_id - Strategy identifier.

Raises:

  • AdminNotFoundError - When no strategy has that id (HTTP 404).
  • AdminConflictError - When the server reports a conflict (HTTP 409).
  • AdminOperationError - When the server refuses the delete for any other reason (HTTP 400).

delete_async​

async def delete_async(*, strategy_id: str) -> None

Asynchronously delete an alert strategy by id.

Arguments:

  • strategy_id - Strategy identifier.

Raises:

  • AdminNotFoundError - As for delete.
  • AdminConflictError - As for delete.
  • AdminOperationError - As for delete.

alerts​

def alerts(*,
strategy_id: str,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> object | None

List alerts currently associated with one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • user_id - Optional user id for filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of alerts to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

The generated alert collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

alerts_async​

async def alerts_async(*,
strategy_id: str,
user_id: str | None = None,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> object | None

Asynchronously list alerts currently associated with one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • user_id - Optional user id for filtering.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of alerts to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

The generated alert collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

extended_alerts​

def extended_alerts(*, strategy_id: str, body: Any) -> object | None

Fetch extended alert data for one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • body - Raw or generated extended-alert request payload.

Returns:

The generated extended-alert response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

extended_alerts_async​

async def extended_alerts_async(*, strategy_id: str,
body: Any) -> object | None

Asynchronously fetch extended alert data for one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • body - Raw or generated extended-alert request payload.

Returns:

The generated extended-alert response payload.

Raises:

  • AdminOperationError - When the server rejects the call.

scenario_fired_events​

def scenario_fired_events(*,
strategy_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> object | None

List active scenario-fired events for one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

The generated scenario-fired-event collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

scenario_fired_events_async​

async def scenario_fired_events_async(
*,
strategy_id: str,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> object | None

Asynchronously list active scenario-fired events for one strategy.

Arguments:

  • strategy_id - Strategy identifier.
  • start - Optional zero-based page offset.
  • limit - Optional maximum number of items to return.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

The generated scenario-fired-event collection payload.

Raises:

  • AdminOperationError - When the server rejects the call.

scenarios​

def scenarios(*,
strategy_id: str,
start: int | None = None,
limit: int | None = None) -> Page[ScenarioRecord]

List one page of the scenarios attached to a strategy.

page.items holds the records and page.total the number of scenarios the server reports for the strategy. An unknown strategy answers an empty page, not an error.

Arguments:

  • strategy_id - Strategy identifier.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.

Returns:

One page of bound scenario records with the server's total.

Raises:

  • AdminOperationError - When the server rejects the call.

scenarios_async​

async def scenarios_async(*,
strategy_id: str,
start: int | None = None,
limit: int | None = None) -> Page[ScenarioRecord]

Async variant of scenarios.

Arguments:

  • strategy_id - Strategy identifier.
  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.

Returns:

One page of bound scenario records with the server's total.

Raises:

  • AdminOperationError - When the server rejects the call.

queue_metrics​

def queue_metrics(
*,
strategy_id: str,
today: date | datetime | str | None = None
) -> builtins.list[QueueMetricsRecord]

Read today's alert counts and ages for each queue of a strategy.

An unknown strategy answers an empty list, not an error.

Arguments:

  • strategy_id - Strategy identifier.
  • today - The day the metrics are for. None and a date mean midnight UTC of that day. Pass an aware datetime for the instant the day starts in another time zone. A string is sent as given.

Returns:

One bound record per queue.

Raises:

  • AdminOperationError - When today is a naive datetime, or the server rejects the call.

queue_metrics_async​

async def queue_metrics_async(
*,
strategy_id: str,
today: date | datetime | str | None = None
) -> builtins.list[QueueMetricsRecord]

Async variant of queue_metrics.

Arguments:

  • strategy_id - Strategy identifier.
  • today - The day the metrics are for. None and a date mean midnight UTC of that day. Pass an aware datetime for the instant the day starts in another time zone. A string is sent as given.

Returns:

One bound record per queue.

Raises:

  • AdminOperationError - As for queue_metrics.

Suppressed scenarios: entities whose scenario firings are muted for a while.

Wraps the alert service's /suppressedScenarios collection. A suppressed scenario stops one scenario from raising alerts for one entity until time_to_restore. The spec offers list, get, create and delete; there is no update operation, so a suppression is replaced by deleting and re-creating it.

SuppressedScenarioInput Objects​

@dataclass(frozen=True, slots=True)
class SuppressedScenarioInput(_TypedInput)

Typed input for creating a suppressed scenario.

Attributes:

  • domain_id - Alert domain the scenario belongs to.
  • scenario_id - The scenario to suppress.
  • scenario_fired_entity_id - The entity whose firings are suppressed.
  • scenario_fired_entity_type - The entity's type name.
  • alert_id - Optional alert the suppression was raised from.
  • alert_version - Optional version of that alert.
  • suppression_comment - Optional operator comment.
  • record_correlator - Optional correlator carried on the record.
  • time_to_restore - When the suppression ends; an aware datetime or a server-formatted string.
  • version - Representation version (1).

domain_id​

scenario_id​

scenario_fired_entity_id​

scenario_fired_entity_type​

alert_id​

alert_version​

suppression_comment​

record_correlator​

time_to_restore​

version​

to_payload​

def to_payload() -> SuppressedScenarioRep

Return the generated SuppressedScenarioRep (None fields stay UNSET).

Raises:

  • AdminOperationError - When time_to_restore is a naive datetime.

SuppressedScenarioRecord Objects​

class SuppressedScenarioRecord(_AlertAdminRecord)

Curated record for one suppressed scenario.

suppressed_scenario_id​

@property
def suppressed_scenario_id() -> str | None

The suppression's identifier.

id​

@property
def id() -> str | None

The suppression's identifier (alias for suppressed_scenario_id).

version​

@property
def version() -> int | None

The representation version.

domain_id​

@property
def domain_id() -> str | None

The alert domain the scenario belongs to.

scenario_id​

@property
def scenario_id() -> str | None

The suppressed scenario.

scenario_fired_entity_id​

@property
def scenario_fired_entity_id() -> str | None

The entity whose firings are suppressed.

scenario_fired_entity_type​

@property
def scenario_fired_entity_type() -> str | None

The type of the suppressed entity.

alert_id​

@property
def alert_id() -> str | None

The alert the suppression was raised from, if any.

alert_version​

@property
def alert_version() -> int | None

The version of that alert, if any.

suppression_comment​

@property
def suppression_comment() -> str | None

The operator's comment.

record_correlator​

@property
def record_correlator() -> str | None

The record correlator.

time_to_restore​

@property
def time_to_restore() -> str | None

When the suppression ends, as the server formats it.

creation_time_stamp​

@property
def creation_time_stamp() -> str | None

When the suppression was created.

modified_time_stamp​

@property
def modified_time_stamp() -> str | None

When the suppression was last modified.

created_by​

@property
def created_by() -> str | None

Who created the suppression.

modified_by​

@property
def modified_by() -> str | None

Who last modified the suppression.

to_dict​

def to_dict() -> JsonObject

Return a JSON-serializable snapshot of the suppression.

SuppressedScenariosService Objects​

class SuppressedScenariosService(_AdminServiceBase)

List, inspect, create and delete suppressed scenarios.

Available as client.admin.suppressed_scenarios. The alert service has no update operation for suppressions, so there is no update here.

list​

def list(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[SuppressedScenarioRecord]

List suppressed scenarios (one page).

A WARNING is logged when the server reports more suppressions than the page holds and neither start nor limit was passed. list_all reads every page.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size. The server applies its own default, 10 rows, when omitted.
  • sort_by - Optional sort expression (server default creationTimeStamp:descending).
  • filter_ - Optional filter expression.

Returns:

Bound suppression records.

Raises:

  • AdminOperationError - When the server rejects the call.

list_async​

async def list_async(
*,
start: int | None = None,
limit: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[SuppressedScenarioRecord]

Async variant of list.

Arguments:

  • start - Optional zero-based page offset.
  • limit - Optional page size.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound suppression records.

Raises:

  • AdminOperationError - When the server rejects the call.

list_all​

def list_all(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[SuppressedScenarioRecord]

List every suppressed scenario, paging until exhausted.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound suppression records across every page.

Raises:

  • AdminOperationError - When batch_size is not positive or the server rejects a page.

list_all_async​

async def list_all_async(
*,
batch_size: int = 100,
max_items: int | None = None,
sort_by: str | None = None,
filter_: str | None = None) -> builtins.list[SuppressedScenarioRecord]

Async variant of list_all.

Arguments:

  • batch_size - Page size per request; must be greater than 0.
  • max_items - Optional ceiling on the number of records returned.
  • sort_by - Optional sort expression.
  • filter_ - Optional filter expression.

Returns:

Bound suppression records across every page.

Raises:

  • AdminOperationError - As for list_all.

get​

def get(*, suppressed_scenario_id: str) -> SuppressedScenarioRecord | None

Fetch one suppressed scenario by id.

Arguments:

  • suppressed_scenario_id - Suppression identifier.

Returns:

The bound record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

get_async​

async def get_async(
*, suppressed_scenario_id: str) -> SuppressedScenarioRecord | None

Async variant of get.

Arguments:

  • suppressed_scenario_id - Suppression identifier.

Returns:

The bound record, or None when not found.

Raises:

  • AdminOperationError - When the server rejects the call.

create​

def create(*,
spec: SuppressedScenarioInput | None = None,
body: Any | None = None) -> SuppressedScenarioRecord

Create a suppressed scenario.

The service accepts only application/vnd.sas.collection+json;version=2 on POST /suppressedScenarios and answers with a collection, while the spec documents a single-item body in two media types that both answer 415 (live-verified 2026-09-13). The SDK's generator declares the collection body, the single item is wrapped in it, and the first item of the response is returned.

Arguments:

  • spec - Typed input.
  • body - Advanced escape hatch: a raw SuppressedScenarioRep mapping or generated model. Mutually exclusive with spec.

Returns:

The created record.

Raises:

  • AdminOperationError - When both or neither argument is given, the server rejects the call, or it returns no payload.

create_async​

async def create_async(*,
spec: SuppressedScenarioInput | None = None,
body: Any | None = None) -> SuppressedScenarioRecord

Async variant of create.

Arguments:

  • spec - Typed input.
  • body - Raw payload, mutually exclusive with spec.

Returns:

The created record.

Raises:

  • AdminOperationError - As for create.

delete​

def delete(*, suppressed_scenario_id: str) -> None

Delete a suppressed scenario by id.

Arguments:

  • suppressed_scenario_id - Suppression identifier.

Raises:

  • AdminNotFoundError - When the suppression does not exist.
  • AdminOperationError - When the server rejects the call.

delete_async​

async def delete_async(*, suppressed_scenario_id: str) -> None

Async variant of delete.

Arguments:

  • suppressed_scenario_id - Suppression identifier.

Raises:

  • AdminNotFoundError - When the suppression does not exist.
  • AdminOperationError - When the server rejects the call.

SAND synonym management.

The SAND synonym list at /admin/config/synonyms is a single resource: POST replaces the entire list, DELETE clears it. This module wraps that wire shape with item-level ergonomics (typed Synonym, add/remove, sync-with-diff).

The server supports two encoding styles in the terms string:

  • Expansion. "a,b,c" makes all terms mutually synonymous at index time.
  • Contraction. "a,b,c=>d" rewrites a, b and c to d at index time.

A search uses the list only when it asks for synonym mode, for example Search.text(..., modes=["synonym"]), and the tenant's synonym settings and the field's synonym feature are on.

SynonymKind​

DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS​

Per-call read timeout for writes to /admin/config/synonyms.

Rewriting the synonym list makes SAND rebuild the analyzers that depend on it before it answers, which took ~48 s per write on a mid-sized tenant (live-measured 2026-09-16). That outlives the 30 s client-wide default, so the two write paths carry their own read budget the way the index operations and the configuration export do. The budget is bounded by SVIConfig.request_deadline_seconds when that is set: a 10 s deadline cuts the write off at 10 s while the rebuild runs on server-side.

Synonym Objects​

@dataclass(frozen=True)
class Synonym()

One SAND synonym entry.

Attributes:

  • terms - Raw terms string as stored by SAND. Use the expansion / contraction constructors instead of assembling this string by hand.
  • version - Representation version. Defaults to 1 (the only value the SAND server currently emits for individual entries).

terms​

version​

expansion​

@classmethod
def expansion(cls, words: Sequence[str]) -> Synonym

Build an expansion synonym (all words become equivalent).

Arguments:

  • words - Two or more terms. Order is preserved.

Returns:

A Synonym with terms encoded as "a,b,c".

contraction​

@classmethod
def contraction(cls, *, sources: Sequence[str], target: str) -> Synonym

Build a contraction synonym (sources rewrite to target at index time).

Arguments:

  • sources - One or more source terms that should rewrite to target.
  • target - The canonical term that the sources collapse into.

Returns:

A Synonym with terms encoded as "a,b,c=>d".

from_raw​

@classmethod
def from_raw(cls, raw: GeneratedSynonym | dict[str, Any] | str) -> Synonym

Lift a generated payload, plain dict, or raw terms string.

Arguments:

  • raw - A generated Synonym, a mapping with terms and an optional version, or the bare terms string.

Returns:

The typed entry.

Raises:

  • AdminOperationError - When terms is missing or malformed, or version is not an integer.

kind​

@property
def kind() -> SynonymKind

Whether this entry is an expansion or a contraction.

sources​

@property
def sources() -> list[str]

The left-hand source terms.

For an expansion this is the full term list; for a contraction it is the comma-separated list before =>.

target​

@property
def target() -> str | None

The contraction target, or None for an expansion.

to_generated​

def to_generated() -> GeneratedSynonym

Return the generated SAND synonym payload for this entry.

SynonymSyncPlan Objects​

@dataclass(frozen=True)
class SynonymSyncPlan()

Plan returned by SynonymsService.sync.

Attributes:

  • added - Synonyms that are in desired but not currently on the server.
  • removed - Synonyms that are on the server but not in desired.
  • unchanged - Synonyms present in both.
  • baseline - The full set of synonyms the plan was computed against.

added​

removed​

unchanged​

baseline​

is_noop​

@property
def is_noop() -> bool

Whether applying this plan would add and remove nothing.

SynonymsService Objects​

class SynonymsService()

Service for the SAND synonym list at /admin/config/synonyms.

The underlying API is single-collection POST (replace-all). This service adds typed entries, item-level convenience methods, and a sync/diff helper.

Arguments:

  • sand_api - Generated SAND API namespace.

list​

def list(
*,
page_size: int = 100,
max_items: int | None = None,
on_short_of_total: Literal["warn", "raise"] = "warn"
) -> builtins.list[Synonym]

Return every synonym currently configured.

Arguments:

  • page_size - Page size used while paginating.
  • max_items - Optional cap on the number of synonyms returned.
  • on_short_of_total - Passed to the paginator; "raise" refuses a short read, which the read-modify-write callers need.

Returns:

Every synonym the server returned.

Raises:

  • IncompleteListingError - When the listing could not be finished.

list_async​

async def list_async(
*,
page_size: int = 100,
max_items: int | None = None,
on_short_of_total: Literal["warn", "raise"] = "warn"
) -> builtins.list[Synonym]

Async variant of list.

Arguments:

  • page_size - Page size used while paginating.
  • max_items - Optional cap on the number of synonyms returned.
  • on_short_of_total - Passed to the paginator; "raise" refuses a short read.

Returns:

Every synonym the server returned.

Raises:

  • IncompleteListingError - When the listing could not be finished.

replace​

def replace(
synonyms: Sequence[Synonym],
*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> builtins.list[Synonym]

Replace the entire synonym list with synonyms.

Arguments:

  • synonyms - Desired synonym entries. An empty sequence clears the list with clear, because SAND refuses an empty collection.
  • timeout - Read budget in seconds for this write. SAND rebuilds the dependent analyzers before answering, which outlives the client-wide default (see DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS).

Returns:

The synonyms reported by the server after replacement.

Raises:

  • AdminOperationError - When the generated SAND client is missing or the server rejects the write.
  • MalformedResponseError - When the server accepted the write but its answer cannot be read.
  • ValueError - When timeout is not a positive number.

replace_async​

async def replace_async(
synonyms: Sequence[Synonym],
*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> builtins.list[Synonym]

Async variant of replace.

Arguments:

  • synonyms - Desired synonym entries.
  • timeout - Read budget in seconds for this write.

Returns:

The synonyms reported by the server after replacement.

Raises:

  • AdminOperationError - As for replace.
  • MalformedResponseError - As for replace.
  • ValueError - As for replace.

clear​

def clear(*, timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS) -> None

Delete every synonym.

Arguments:

  • timeout - Read budget in seconds for this write, for the same reason as replace.

    The DELETE is sent once. A read timeout while SAND rebuilds raises NetworkError with outcome_unknown=True instead of resending it and starting a second rebuild.

Raises:

  • AdminOperationError - When the generated SAND client is missing or the server rejects the write.
  • NetworkError - When the response was lost; the clear may have run.
  • ValueError - When timeout is not a positive number.

clear_async​

async def clear_async(*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> None

Async variant of clear.

Arguments:

  • timeout - Read budget in seconds for this write.

Raises:

  • AdminOperationError - As for clear.
  • NetworkError - As for clear.
  • ValueError - As for clear.

add​

def add(
synonym: Synonym,
*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> builtins.list[Synonym]

Add one synonym to the existing list (read-modify-write).

No-ops if a byte-for-byte identical terms string is already present.

The write is unguarded: the call reads the whole list and replaces it, and the SAND spec declares no precondition header on the replace, so a synonym someone else adds between the read and the write is dropped. Keep synonym edits to one writer at a time.

Arguments:

  • synonym - The entry to add.
  • timeout - Read budget in seconds for the write, as in replace.

Returns:

The synonym list as it stands after the call.

Raises:

  • AdminOperationError - When the server rejects the write.
  • IncompleteListingError - When the current list could not be read in full, because the write would then drop what it never saw.

add_async​

async def add_async(
synonym: Synonym,
*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> builtins.list[Synonym]

Async variant of add.

Arguments:

  • synonym - The entry to add.
  • timeout - Read budget in seconds for the write.

Returns:

The synonym list as it stands after the call.

Raises:

  • AdminOperationError - As for add.
  • IncompleteListingError - As for add.

remove​

def remove(
synonym: Synonym | str,
*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> builtins.list[Synonym]

Remove one synonym from the existing list (read-modify-write).

The write is unguarded: the call reads the whole list and replaces it, and the SAND spec declares no precondition header on the replace, so a synonym someone else adds between the read and the write is dropped. Keep synonym edits to one writer at a time.

Arguments:

  • synonym - A Synonym instance or the raw terms string to drop.
  • timeout - Read budget in seconds for the write, as in replace.

Returns:

The synonym list as it stands after the call.

Raises:

  • AdminOperationError - When the server rejects the write.
  • IncompleteListingError - When the current list could not be read in full, because the write would then drop what it never saw.

remove_async​

async def remove_async(
synonym: Synonym | str,
*,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> builtins.list[Synonym]

Async variant of remove.

Arguments:

  • synonym - A Synonym instance or the raw terms string to drop.
  • timeout - Read budget in seconds for the write.

Returns:

The synonym list as it stands after the call.

Raises:

  • AdminOperationError - As for remove.
  • IncompleteListingError - As for remove.

sync​

def sync(
desired: Sequence[Synonym],
*,
dry_run: bool = False,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> SynonymSyncPlan

Diff the current synonym list against desired and (optionally) apply.

An entry's identity is its exact terms string: "a,b" and "b, a" are two entries, and the second replaces the first with a full rewrite. A terms string that appears twice in desired is planned and written once.

Arguments:

  • desired - The target synonym set.
  • dry_run - When True, return the computed plan without applying it.
  • timeout - Read budget in seconds for the write, as in replace.

Returns:

A SynonymSyncPlan describing the diff (and applied result when dry_run is False).

Raises:

  • AdminOperationError - When the server rejects the write.
  • IncompleteListingError - When the current list could not be read in full, because the write would then drop what it never saw.

sync_async​

async def sync_async(
desired: Sequence[Synonym],
*,
dry_run: bool = False,
timeout: float = DEFAULT_SYNONYM_WRITE_TIMEOUT_SECONDS
) -> SynonymSyncPlan

Async variant of sync.

Arguments:

  • desired - The target synonym set.
  • dry_run - When True, return the computed plan without applying it.
  • timeout - Read budget in seconds for the write.

Returns:

A SynonymSyncPlan describing the diff.

Raises:

  • AdminOperationError - As for sync.
  • IncompleteListingError - As for sync.

Full-solution configuration transport over the SAS svi-transport service.

TransportService wraps the two public Transport operations, exportAll and importAllFromZip, which move a complete Visual Investigator configuration (entities, relationships, workflows, reference lists, pages, SAND and alert configuration, groups, and more) between tenants as one ZIP.

This is a different format from ConfigurationBundle: the transport archive is SAS's own, carries every configuration provider, and has no validation-only import. The SDK bundle remains the tool for targeted SAND or alerts changes with a dry run.

TRANSPORT_ARCHIVE_FORMAT​

DEFAULT_EXPORT_TIMEOUT_SECONDS​

DEFAULT_IMPORT_TIMEOUT_SECONDS​

DEFAULT_POLL_INTERVAL_SECONDS​

JOB_SUCCESS_STATES​

JOB_FAILURE_STATES​

JOB_PENDING_STATES​

TransportArchive Objects​

class TransportArchive()

A SAS Visual Investigator transport ZIP (exportAll output).

The payload is validated on construction: it must be a readable ZIP with a manifest.properties entry. Nothing is extracted to disk.

Arguments:

  • payload - Raw transport ZIP bytes.

Raises:

  • AdminOperationError - If the payload is not a ZIP, is an SDK configuration bundle, or lacks manifest.properties.

from_zip​

@classmethod
def from_zip(cls,
source: str | PathLike[str] | bytes | BinaryIO,
*,
max_bytes: int | None = None) -> TransportArchive

Load a transport archive from a path, raw bytes, or binary file.

Arguments:

  • source - Transport ZIP as a path, raw bytes, or binary file object.
  • max_bytes - Largest source to read, in bytes. Defaults to 256 MiB. client.admin.config.load_archive passes the client's max_response_bytes when that is larger, so a client loads whatever it could have exported.

Returns:

The validated TransportArchive.

Raises:

  • AdminOperationError - If the source is not a valid transport archive, is larger than max_bytes, cannot be read from its path, or is corrupt, encrypted or otherwise unreadable.

byte_size​

@property
def byte_size() -> int

The size of the transport ZIP in bytes.

sha256​

@property
def sha256() -> str

The hex-encoded SHA-256 digest of the transport ZIP.

entries​

@property
def entries() -> tuple[str, ...]

Every entry name in the ZIP, in archive order.

entry_count​

@property
def entry_count() -> int

The number of file entries in the ZIP (directories excluded).

system_version​

@property
def system_version() -> str | None

The exporting tenant's Visual Investigator version, if recorded.

manifest​

@property
def manifest() -> dict[str, str]

A copy of the parsed manifest.properties key/value pairs.

services​

@property
def services() -> dict[str, int]

File-entry counts per configuration provider (top-level folder).

summary​

def summary() -> dict[str, int]

Return file-entry counts per folder, e.g. {"svi-datahub/documents": 136}.

Returns:

Mapping of folder path to the number of files directly inside it. Top-level files are counted under ".".

raw_bytes​

def raw_bytes() -> bytes

Return a copy of the raw transport ZIP bytes.

save_zip​

def save_zip(path: str | PathLike[str], *, overwrite: bool = False) -> None

Write the transport ZIP to path.

Arguments:

  • path - Destination file path.
  • overwrite - Replace an existing file when True; otherwise a pre-existing file raises FileExistsError.

Raises:

  • FileExistsError - If path exists and overwrite is False.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the archive.

TransportImportResult Objects​

@dataclass(frozen=True)
class TransportImportResult()

Outcome of a transport importAll call.

A 200 response carries the provider counts and messages directly. A 202 response means the server queued a job: job_url points at it, and when the SDK waited for it, job_status and job hold the final state.

status_code​

accepted​

job_url​

job_status​

job​

components_invoked​

components_successful​

component_responses​

translated_messages​

warnings​

raw​

pending​

@property
def pending() -> bool

Whether the server accepted the import as a job that has not finished.

failed_components​

@property
def failed_components() -> int | None

How many providers failed, when the server reported both counts.

success​

@property
def success() -> bool

Whether the import finished and every configuration provider succeeded.

to_dict​

def to_dict() -> JsonObject

Return a compact JSON-serializable summary of the import.

raw_dict​

def raw_dict() -> dict[str, object]

Return the summary plus the full provider responses and job payload.

TransportService Objects​

class TransportService(_AdminServiceBase)

Export and import complete Visual Investigator configurations.

Available as client.admin.transport. Both operations move the whole solution: there is no per-object selection and no validation-only import. Import is an upsert by natural key, as SAS documents for the Transport service's merge import: objects whose natural key matches are replaced, new ones are added, and existing objects missing from the archive are left alone.

Arguments:

  • transport_api - Generated Transport API namespace, or None when the client was built without it.

export_all​

@overload
def export_all(*,
timeout: float = ...,
to_path: None = None,
overwrite: bool = ...) -> TransportArchive

export_all​

@overload
def export_all(*,
timeout: float = ...,
to_path: str | PathLike[str],
overwrite: bool = ...) -> Path

export_all​

def export_all(*,
timeout: float = DEFAULT_EXPORT_TIMEOUT_SECONDS,
to_path: str | PathLike[str] | None = None,
overwrite: bool = False) -> TransportArchive | Path

Export the tenant's complete configuration as a transport archive.

Arguments:

  • timeout - Per-request timeout in seconds. Large solutions produce archives of tens of megabytes, so the default is generous.
  • to_path - Stream the archive to this file instead of returning it. Memory use stays at one chunk whatever the archive size. The file is written 0600 through a temporary file and moved into place once it has been checked, so a failed export leaves nothing behind and an existing file intact.
  • overwrite - With to_path, replace an existing file. Otherwise an existing file raises FileExistsError.

Returns:

The validated transport archive, or the path written when to_path is given.

Raises:

  • ValueError - If timeout is not a positive number.
  • AdminOperationError - If the server rejects the export or returns something that is not a transport archive.
  • AdminNotFoundError - If the tenant has no svi-transport service.
  • ResponseTooLargeError - If the archive exceeds max_response_bytes. The cap applies to a streamed export too.
  • FileExistsError - If to_path exists and overwrite is False.
  • OSError - If to_path is a symbolic link or cannot be written.
  • NetworkError - If the request failed before a complete response arrived. This endpoint is a POST, so it is never retried. Inspect outcome_unknown before resending.

export_all_async​

@overload
async def export_all_async(*,
timeout: float = ...,
to_path: None = None,
overwrite: bool = ...) -> TransportArchive

export_all_async​

@overload
async def export_all_async(*,
timeout: float = ...,
to_path: str | PathLike[str],
overwrite: bool = ...) -> Path

export_all_async​

async def export_all_async(*,
timeout: float = DEFAULT_EXPORT_TIMEOUT_SECONDS,
to_path: str | PathLike[str] | None = None,
overwrite: bool = False) -> TransportArchive | Path

Async variant of export_all.

Arguments:

  • timeout - Per-request timeout in seconds.
  • to_path - Stream the archive to this file instead of returning it. File writes block the event loop for one chunk at a time.
  • overwrite - With to_path, replace an existing file.

Returns:

The validated transport archive, or the path written when to_path is given.

Raises:

  • ValueError - If timeout is not a positive number.
  • AdminOperationError - If the server rejects the export or returns something that is not a transport archive.
  • AdminNotFoundError - If the tenant has no svi-transport service.
  • ResponseTooLargeError - If the archive exceeds max_response_bytes.
  • FileExistsError - If to_path exists and overwrite is False.
  • OSError - If to_path is a symbolic link or cannot be written.
  • NetworkError - If the request failed before a complete response arrived. This endpoint is a POST, so it is never retried. Inspect outcome_unknown before resending.

import_all​

def import_all(
source: TransportArchive | str | PathLike[str] | bytes | BinaryIO,
*,
wait: bool = True,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS,
poll_interval: float = DEFAULT_POLL_INTERVAL_SECONDS
) -> TransportImportResult

Import a complete transport archive into the tenant.

This writes configuration in one step with no dry run. Export the target tenant first if you may need to roll back.

Arguments:

  • source - Transport archive, ZIP path, ZIP bytes, or binary file. It is validated locally before anything is sent.
  • wait - When the server queues the import as a job (HTTP 202), poll it until it finishes. With False the result is returned at once with pending=True and job_url set; pass it to wait_for_import later.
  • timeout - Upload timeout, and the overall budget for job polling, in seconds.
  • poll_interval - Base seconds between job status checks (jittered).

Returns:

The import result. success is True only when every configuration provider imported without errors.

Raises:

  • ValueError - If timeout or poll_interval is not positive.
  • AdminOperationError - If the archive is invalid locally or the server rejects the request.
  • ConfigurationImportError - If providers report errors, a synchronous response is not a complete import result, the job fails, a job status request is rejected, or the job does not finish within timeout. The exception's result carries every provider message, or the submitted job and its URL. Five status requests in a row without an answer end the wait the same way.
  • AuthConfigurationError - If the job Location points at another origin.
  • NetworkError - If the upload failed before a complete response arrived. It is a POST, so it is never retried.

import_all_async​

async def import_all_async(
source: TransportArchive | str | PathLike[str] | bytes | BinaryIO,
*,
wait: bool = True,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS,
poll_interval: float = DEFAULT_POLL_INTERVAL_SECONDS
) -> TransportImportResult

Async variant of import_all.

Arguments:

  • source - Transport archive, ZIP path, ZIP bytes, or binary file.
  • wait - Poll a queued (HTTP 202) import job until it finishes.
  • timeout - Upload timeout, and the overall job-polling budget, in seconds.
  • poll_interval - Base seconds between job status checks (jittered).

Returns:

The import result.

Raises:

  • ValueError - If timeout or poll_interval is not positive.
  • AdminOperationError - If the archive is invalid locally or the server rejects the request.
  • ConfigurationImportError - If providers report errors, a synchronous response is not a complete import result, the job fails, a job status request is rejected, or the job does not finish within timeout. Five status requests in a row without an answer end the wait the same way.
  • AuthConfigurationError - If the job Location points at another origin.
  • NetworkError - If the upload failed before a complete response arrived. It is a POST, so it is never retried.

wait_for_import​

def wait_for_import(
result_or_job_url: TransportImportResult | str,
*,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS,
poll_interval: float = DEFAULT_POLL_INTERVAL_SECONDS
) -> TransportImportResult

Wait for a queued transport import job to finish.

Use it to pick up an import started with wait=False, or one whose wait ended early: every ConfigurationImportError from a wait carries the submitted result, and its job_url, on .result.

A status check that fails with a network error, a timeout or a 5xx is logged at WARNING and tried again at the next interval. Five failures in a row end the wait. A 4xx ends it at once.

Arguments:

  • result_or_job_url - The pending result from import_all, or a saved job_url. A URL must be on the transport service's origin. A result that is not pending is returned unchanged.
  • timeout - Overall budget for the wait, in seconds. Each status request is capped at what is left of it.
  • poll_interval - Base seconds between status checks (jittered).

Returns:

The finished import result, with job_status and job set.

Raises:

  • ValueError - If timeout or poll_interval is not positive.
  • ConfigurationImportError - If the job fails, reports a status this client does not know, a status request is rejected, five status requests in a row get no answer, or the job does not finish within timeout. result always carries job_url.
  • AuthConfigurationError - If the job URL points at another origin.

wait_for_import_async​

async def wait_for_import_async(
result_or_job_url: TransportImportResult | str,
*,
timeout: float = DEFAULT_IMPORT_TIMEOUT_SECONDS,
poll_interval: float = DEFAULT_POLL_INTERVAL_SECONDS
) -> TransportImportResult

Async variant of wait_for_import.

Arguments:

  • result_or_job_url - The pending result from import_all_async, or a saved job_url on the transport service's origin.
  • timeout - Overall budget for the wait, in seconds.
  • poll_interval - Base seconds between status checks (jittered).

Returns:

The finished import result.

Raises:

  • ValueError - If timeout or poll_interval is not positive.
  • ConfigurationImportError - If the job fails, a status request is rejected, five status requests in a row get no answer, or the job does not finish within timeout. result always carries job_url.
  • AuthConfigurationError - If the job URL points at another origin.

Public admin/configuration surface.

Re-exports curated types from sasvi.admin._implementation plus the newer _shapes and _synonyms modules. The implementation module is private; callers should import from here or from sasvi.admin.