BooleanFilter
str
required
required
str
required
str | None
bool
bool
Filter
A Boolean filter configuration.
See Filter Types.
BooleanFilterOperator
str, Enum
Configures the behavior of a Boolean filter.
IS_TRUE: Allow values equal to TRUE IS_FALSE: Allow values equal to FALSE
IS_FALSE
IS_TRUE
ConfigInvalidError
ValidioError
Exception when the configuration file is invalid.
ConfigNotFoundError
str
required
str
required
str
required
ValidioError
Exception when no configuration is found.
EnumFilter
str
required
list[str]
required
str
required
str | None
bool
bool
Filter
An Enum filter configuration.
See Filter Types.
EnumFilterOperator
str, Enum
Configures the behavior of an Enum filter.
ALLOW: Allow values in the enum DENY: Deny values in the enum
ALLOW
DENY
NullFilter
str
required
str
required
str | None
bool
bool
Filter
A Null filter configuration.
See Filter Types.
NullFilterOperator
str, Enum
Configures the behavior of a Null filter.
IS: Filter in NULL values IS_NOT: Filter in Non-NULL values
IS
IS_NOT
SourcePollInfo
str
required
str
required
datetime
required
object
Details about a poll that was started.
-
Variables:
- source_id – The id of the source being polled.
- poll_id – The id of the started poll.
- poll_timestamp – The time at which the poll was initiated.
poll_id
poll_timestamp
source_id
SourcePollResult
required
Exception | None
bool | None
object
The outcome of polling a source.
-
Variables:
- info – Details about the started poll. Can be passed to wait_until_poll_completion to resume waiting for the same poll.
- error – Any error that occurred while waiting for the poll. When set, has_incidents is left unset.
- has_incidents – Whether any new incidents were created while polling. Only set once the poll completed successfully.
error
has_incidents
info
SqlFilter
str
required
str
required
str | None
bool
bool
Filter
A SQL filter configuration.
See Filter Types.
StringFilter
str
required
required
str
required
str | None
str | None
bool
bool
Filter
A String filter configuration.
See Filter Types.
StringFilterOperator
str, Enum
Configures the behavior of a String filter.
IS_EMPTY: The string is empty IS_NOT_EMPTY: The string is not empty CONTAINS: The string contains DOES_NOT_CONTAIN: The string does not contain STARTS_WITH: The string is prefixed with ENDS_WITH: The string is suffixed with IS_EXACTLY: Exact match of full string REGEX: Regular expressions
CONTAINS
DOES_NOT_CONTAIN
ENDS_WITH
IS_EMPTY
IS_EXACTLY
IS_NOT_EMPTY
REGEX
STARTS_WITH
ThresholdFilter
str
required
float
required
str
required
required
str | None
bool
bool
Filter
A Threshold filter configuration.
See Filter Types.
ThresholdFilterOperator
str, Enum
Configures the behavior of a String filter.
EQUAL: The value equals (==) NOT_EQUAL: The value does not equal (!=) LESS_THAN: The value is less than (<) LESS_THAN_OR_EQUAL: The value is less than or equal (<=) GREATER_THAN: The value is greater than (>) GREATER_THAN_OR_EQUAL: The value is greater than or equal (>=)
EQUAL
GREATER_THAN
GREATER_THAN_OR_EQUAL
LESS_THAN
LESS_THAN_OR_EQUAL
NOT_EQUAL
UnauthorizedError
str
required
str
required
ValidioError
Exception thrown when unauthorized request is made.
ValidioConnectionError
str
required
Exception
required
ValidioError
Exception thrown when connection to Validio backend fails.
ValidioError
Any
Exception
Base exception used for every exception thrown by Validio.
load_jtd_schema()
Path
required
dict
Reads a jtd schema from a file on disk.
- Parameters: filepath – Path to the file containing the schema contents.
poll_source()
str
required
APIClient
required
str | None
float
float | None
SourcePollResult
Manually poll a source and check if it produced new incidents.
The source is polled with the sourceManualPoll API, we then wait for the poll to complete and finally check the incidents API for any incidents created since the poll started.
Resolving the source and starting the poll raise on failure. Once the poll is started, waiting for it never raises; any error from that phase is returned on the result instead, along with the info that can be passed to wait_until_poll_completion to retry the waiting phase.
-
Parameters:
- source_id_or_name – The id or the resource name of the source to poll. If a resource name is given it is resolved to its id.
- client – The APIClient to use for the requests.
- namespace – The namespace to look up the source in. Required when a resource name is given since resource names are only unique within a namespace. Ignored when an id is given.
- poll_interval_seconds – How long to wait between progress checks. The progress API is rate limited so this should not be too low.
- timeout_seconds – Maximum time to wait for the poll to complete. If None we wait indefinitely.
- Returns: A SourcePollResult describing the outcome.
- Raises: ValidioError – If the source can’t be resolved or the poll can’t be started.
wait_until_poll_completion()
APIClient
required
required
float
float | None
SourcePollResult
Wait for an already started poll to complete and check for incidents.
This is the second phase of poll_source and can be used to resume waiting for a poll that was already started, e.g. to retry after a timeout.
Errors are returned as part of the result rather than raised.
-
Parameters:
- client – The APIClient to use for the requests.
- info – Details about the started poll, as returned in a SourcePollResult.
- poll_interval_seconds – How long to wait between progress checks. The progress API is rate limited so this should not be too low.
- timeout_seconds – Maximum time to wait for the poll to complete. If None we wait indefinitely.
- Returns: A SourcePollResult describing the outcome.