- Overview: What the recipe does, and when it’s useful.
- Steps: A walkthrough of the code, one part at a time.
- Full code sample: The complete script, ready to copy. Where it helps, an example response follows.
EXAMPLE_SOURCE_ID, set it or substitute your own value.
The client is asynchronous, so the example functions are
async. To call one from synchronous code, wrap it in asyncio.run. See Synchronous or asynchronous.Recipes
Create a credential and source
Create a credential, infer a schema, and create a source.
Create a namespace and a tag
Create a namespace to hold resources, and a tag to label them.
Delete a credential
Delete a credential with a mutation and variables.
Export incident groups to CSV
Page through a source’s incident groups and export their incidents.
Export metrics to CSV
Export a validator segment’s metrics to CSV, one day at a time.
Get incidents for a validator
Query a validator’s incidents by its resource name.
Get info for a validator
Fetch a validator’s details and related resources with fragments.
List credentials
List all credentials with their name and type, using an alias.
Manually poll a source and its validators
Poll a source and stop a pipeline when new incidents appear.
Number of incidents by severity
Count a source’s incidents by severity over the past week.
Set up a channel and notification rule
Create a Slack channel and a rule that sends alerts on it.
Update a source schema
Re-infer, verify, and update a source’s schema.
Update a validator
Update a validator’s name and dynamic threshold in one mutation.
Using the SDK with IaC
Reuse an existing validator’s threshold in Validio Code.