altr-mcp-server
v0.10.0MCP server for ALTR data security: databases, tags, policies, classification, access, audits
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_policies
List masking policies configured in your ALTR organization. Returns each policy's tag, policy ID, and current rule count. Use the policy_id from results when calling `add_rules`, `get_rules`, or `delete_policy`. Masking levels reference: - 10000: No mask (show raw value) - 10001: Full mask (replace with * matching data length) - 10002: Email mask (show domain only) - 10003: Show last four - 10004: Constant mask (1 for numbers, * for strings, 1/1/2000 for dates) - 10005: Null (replace with NULL) - 10006: Full mask hash (replace with hashed value) - 10007: Email hash (show domain, hash local…
| Parameter | Type | Description |
|---|---|---|
policy_type | Filter by policy type. Values: TAG, COLUMN, PUSHDOWN, IMPERSONATION, GRANT, ROW, OLTP. If omitted, queries all types and merges results. |
get_rules
View all masking rules configured for a specific policy. Shows which roles have what masking levels for which tag values. Masking levels reference: - 10000: No mask (show raw value) - 10001: Full mask (replace with * matching data length) - 10002: Email mask (show domain only) - 10003: Show last four - 10004: Constant mask (1 for numbers, * for strings, 1/1/2000 for dates) - 10005: Null (replace with NULL) - 10006: Full mask hash (replace with hashed value) - 10007: Email hash (show domain, hash local part) - 10008: Show last four hash (hash prefix, show last 4) - 10009: Constant date (rep…
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Raw policy ID as returned by `get_policies`. Do not URL-encode. |
get_supported_masking_types
List the masking levels a policy type accepts. Check this before choosing a masking_policy for `add_rules` or `update_rule`: a tag policy accepts fewer levels than a Snowflake pushdown policy, and a column policy's levels depend on the column. Level 10010 is left out: it is a system outcome, not a rule choice.
| Parameter | Type | Description |
|---|---|---|
policy_type * | string | "tag" (TAG# policies), "tag_pushdown" (PUSHDOWN# policies), or "column". |
database_type | Optional "snowflake" or "databricks". Pushdown policies accept fewer levels on Databricks. | |
field_id | Column ID. Required for policy_type "column". |
create_policy
Create an empty masking policy for a specific tag. Creates a masking policy that controls how data tagged with the specified tag is masked. Until you add rules with `add_rules`, all users will see NULL for tagged columns. Each tag can only have one policy — check `get_policies` first to avoid conflicts. After creating a policy, use `add_rules` to define masking behavior. PLATFORM DIFFERENCES — TAG HANDLING: Snowflake and Databricks tags are FUNDAMENTALLY DIFFERENT in ALTR: - A Snowflake tag is a connected ALTR object — it has been registered with `connect_tag`, owns a `tag_group_…
| Parameter | Type | Description |
|---|---|---|
tag * | string | Tag name. For Snowflake: UPPERCASE connected tag from `get_tags`. For Databricks: any raw tag name string — no prior connection required. |
database_ids | REQUIRED for Databricks. Must be a list of ALTR database IDs for the target Databricks metastore(s) (from `get_databases`). Always pass a list — wrap a single ID in a list (e.g., [2167]); do NOT pas… | |
policy_type | Must be "PUSHDOWN" for Databricks. Omit for Snowflake (defaults to "TAG"). |
add_rules
Add one or more masking rules to a policy in a single batch request. Each rule specifies: which role, which tag value, and what masking level they should see. A policy must already exist for the tag (see `create_policy`). Accepts up to 99 rules per batch; if more than 99 are provided they are automatically split into multiple batches. Each rule in the list must be a dict with these keys: - masking_policy: int — masking level (10000-10009) - role: str — target user group / role name from `get_roles` - tag_value: str — exact tag value this rule applies to (case-sensitive)
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Raw policy ID from `get_policies`. Do not URL-encode. |
rules * | List of rule dicts, or a JSON string encoding such a list. Each dict must have 'masking_policy', 'role', and 'tag_value'. |
delete_policy
Delete a masking policy and all its rules. Use with caution - this removes all masking rules associated with the policy. Consider reviewing rules with `get_rules` first to understand what will be deleted.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Raw policy ID from `get_policies`. Do not URL-encode. |
update_rule
Update an existing masking rule's properties without deleting and recreating it. Only the fields you provide will be updated; omitted fields remain unchanged. Use `get_rules` first to find the rule_id and see current values. Masking levels reference: - 10000: No mask (show raw value) - 10001: Full mask (replace with * matching data length) - 10002: Email mask (show domain only) - 10003: Show last four - 10004: Constant mask (1 for numbers, * for strings, 1/1/2000 for dates) - 10005: Null (replace with NULL) - 10006: Full mask hash (replace with hashed value) - 10007: Email hash (show domai…
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Raw policy ID from `get_policies`. Do not URL-encode. |
rule_id * | string | Raw rule ID from `get_rules`. Do not URL-encode. |
access_rate_thresholds | List of access rate threshold objects, each with 'access_rate_unit' (str), 'access_rate_limit' (int), and 'action' (str). | |
masking_policy | New masking level (10000-10009). | |
role | New role/user group name. | |
tag_value | New tag value for the rule. | |
time_window_thresholds | List of time window threshold objects, each with 'day' (list of str), 'start_time' (dict with hour/minute), 'end_time' (dict with hour/minute), 'timezone' (str), and 'action' (str). |
delete_rule
Remove a specific masking rule from a policy. Allows fine-grained removal of individual rules without deleting the entire policy. Use `get_rules` first to identify the rule_id you want to remove.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Raw policy ID containing the rule. Do not URL-encode. |
rule_id * | string | Raw rule ID to delete. Do not URL-encode. |
get_roles
List all ALTR roles (user groups) available in your organization. Role names are used in `add_rules` to define which user groups see what level of data masking.
get_tags
List all Snowflake tags connected to ALTR (available for use in policies). SNOWFLAKE ONLY. Databricks tags are NOT first-class objects in ALTR — they are raw string references used at policy-creation time only — so they will never appear in this list. Do not call `get_tags` to discover Databricks tags; pass the raw tag name directly to `create_policy` instead. For Snowflake, only tags that have been connected to ALTR via `connect_tag` appear here. Tags created in Snowflake but never connected will not be listed and cannot be used in a policy.
disconnect_tag
Disconnect a connected Snowflake tag from ALTR. SNOWFLAKE ONLY. Databricks tags are not ALTR objects (they are raw strings referenced at policy-creation time), so there is nothing to disconnect here for Databricks — to stop masking a Databricks column tag, remove the policy with `delete_policy` instead. All policies on the tag must be removed first, or the disconnect will fail.
| Parameter | Type | Description |
|---|---|---|
tag_group_id * | string | Tag group identifier to disconnect. |
get_tag_values
List all allowed values configured for a specific tag. SNOWFLAKE ONLY. Databricks tags are raw strings, not ALTR-managed objects, so they have no stored allowed-values list here — use whatever tag values exist in the Databricks catalog directly. These values are referenced when creating masking rules with `add_rules`.
| Parameter | Type | Description |
|---|---|---|
tag_name * | string | Tag name (from `get_tags`) whose values you want to inspect. |
get_tag_details_by_group_id
Get full details for a specific connected tag by its group ID. SNOWFLAKE ONLY. `tag_group_id` only exists for connected Snowflake tags; Databricks tags are raw strings and have no group ID. Returns masking configuration, status, database info, and timestamps. Use `get_tags` first to find the tag_group_id.
| Parameter | Type | Description |
|---|---|---|
tag_group_id * | string | Tag group identifier from `get_tags`. |
get_tag_details
Get full details for a specific tag masking by database, tag, and schema. SNOWFLAKE ONLY. Databricks tags are not stored as ALTR objects, so they have no detail record to fetch. Returns masking configuration, status, and timestamps. Use when you know the exact database/schema/tag but not the tag_group_id.
| Parameter | Type | Description |
|---|---|---|
database_id * | integer | Numeric ALTR database ID (from `get_database_id`). |
database_name * | string | Database name in ALTR. |
schema_name * | string | Schema name containing the tag. |
tag_name * | string | Tag name. |
protection_type | Optional filter — "governed", "governed-pushdown", "tokenized-vault", or "encryption-fpe". |
update_tag
Update an existing tag connection's masking configuration. SNOWFLAKE ONLY. Databricks tags are not ALTR-managed objects, so there is no Databricks tag configuration to update — change Databricks masking by editing the policy or its rules instead. Use `get_tags` to find the `tag_group_id` of the tag you want to update. To connect a new tag, use `connect_tag` instead.
| Parameter | Type | Description |
|---|---|---|
database_id * | integer | Numeric ALTR database ID (from `get_database_id`). |
friendly_name * | string | Display name for the tag in ALTR. |
tag_group_id * | string | Tag group identifier from `get_tags`. |
custom_role_provider_enabled | boolean | Enable custom role provider UDF. |
encryption_fpe_options | Optional FPE config dict with 'alphabet' ("numeric"|"alphabetic"|"alphanumeric"), 'is_padded' (bool), 'key_name' (str), and 'tweak_name' (str). | |
mask_data_type_list | Optional list of data types to mask. | |
protection_type | string | Masking type — "governed", "governed-pushdown", "tokenized-vault", or "encryption-fpe". |
disconnect_tag_by_details
Disconnect a tag from ALTR by database, schema, and tag name. SNOWFLAKE ONLY. Databricks tags are not ALTR objects; to stop masking a Databricks column, delete the policy with `delete_policy` instead. Alternative to `disconnect_tag` when you don't have the tag_group_id but know the database/schema/tag details.
| Parameter | Type | Description |
|---|---|---|
database_id * | integer | Numeric ALTR database ID. |
database_name * | string | Database name in ALTR. |
schema_name * | string | Schema name containing the tag. |
tag_name * | string | Tag name to disconnect. |
ignore_errors | boolean | If true, force-forget the tag even if cleanup fails. |
connect_tag
Connect a Snowflake tag to ALTR so it can be used in masking policies. SNOWFLAKE ONLY — do NOT use for Databricks. There is no Databricks equivalent of this tool: Databricks tags are not stored as ALTR objects, they are just raw strings referenced at policy-creation time. Skip `connect_tag` entirely for Databricks and pass the raw tag name string directly to `create_policy`. For Snowflake, this call registers an existing Snowflake tag as a first-class ALTR tag object — it gets a `tag_group_id`, masking configuration, etc. The tag must already exist in Snowflake. Once connected, it appear…
| Parameter | Type | Description |
|---|---|---|
database_name * | string | Friendly database name as shown in ALTR (the `friendlyDatabaseName` from `get_databases`). |
schema_name * | string | Exact schema name inside the target database. |
tag_name * | string | Tag to associate with this database/schema. |
get_classifiers
List all available data classifiers in ALTR. Classifiers automatically detect sensitive data types like SSNs, emails, and phone numbers. Includes both ALTR-managed and custom classifiers.
| Parameter | Type | Description |
|---|---|---|
exclude_collection | Leave out classifiers already in this collection, e.g. to find ones to add to it. | |
order_by | "name" or "collection_count" (how many collections use each classifier). | |
prefix | Only classifiers whose names start with this, e.g. "email" matches email_address and email_domain. | |
sort_order | "asc" or "desc". |
get_classifier
Get details for a single classifier by name.
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Exact classifier name as returned by `get_classifiers`. |
create_classifier
Create a custom data classifier defined by a compound ruleset. All detection logic lives in `compound_ruleset`: one or more conditions (ROW_DATA regex, METADATA column-name matching, AMAZON_COMPREHEND entity detection, DATA_LENGTH, CONTENT_TYPE, GDLP info-types and more) combined with AND/OR. A plain regex classifier is a ruleset with a single ROW_DATA condition carrying the pattern and its minimum_threshold. Always set minimum_threshold on ROW_DATA leaves. Sampling is set on the job, not here. Compound ruleset structure: ```json { "operator": "AND", "conditions": [ { "target":…
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Unique name for the classifier. |
compound_ruleset * | object | Nested AND/OR condition tree, as above. |
description | Human-readable explanation of what it detects. | |
tags | Optional key:value tags describing the classifier, e.g. ["type:ssn"]. `list_classifier_tags` shows the tags already in use. |
update_classifier
Update an existing custom classifier. Only provided fields are changed. Passing `compound_ruleset` also removes any legacy top-level pattern, so the ruleset alone decides matches. To keep a legacy regex, include it as a ROW_DATA condition with its own minimum_threshold.
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Exact classifier name to update. |
compound_ruleset | Updated compound ruleset. See `create_classifier` for structure and valid condition targets. | |
description | Updated description. | |
tags | Replaces the classifier's key:value tags. Pass [] to clear them. |
delete_classifier
Remove a custom classifier you created. Cannot delete ALTR managed classifiers. Only use for classifiers you created with `create_classifier`.
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Exact classifier name as returned by `get_classifiers`. |
get_collections
List classifier collections (groups of classifiers used for classification jobs). Every classification job runs a collection (`create_snowflake_job`, `create_databricks_job`, `create_oltp_job`, `create_file_classification_job`). Check for existing collections (e.g., "ALTR Managed") before creating new ones.
| Parameter | Type | Description |
|---|---|---|
sort_order | "asc" or "desc" by collection name. |
get_collection
Get details for a single collection by name.
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Exact collection name as returned by `get_collections`. |
create_collection
Create a classifier collection to use for automated data discovery. Collections group classifiers together for classification jobs. After creating a collection, you can run a classification job to automatically scan your database columns and identify which contain sensitive data patterns. Typical workflow: Create a collection (or use existing "ALTR Managed"), then use it in a create-job tool such as `create_snowflake_job` to scan your database. Review results with `get_classification_report` to see which columns were detected.
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Unique name for the collection. |
description | string | Optional human-readable description. |
update_collection
Update a collection's description.
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Exact collection name to update. |
description * | string | Updated description. |
delete_collection
Delete a classifier collection. Cannot delete collections that are in use by active or recent jobs. Only delete collections you created that are no longer needed.
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Exact collection name as returned by `get_collections`. |
get_collection_classifiers
List classifiers that belong to a collection.
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Collection name to inspect. |
contiguous_id | Pagination token. | |
limit | Max items to return. | |
prefix | Only classifiers whose names start with this. | |
sort_order | "asc" or "desc" by classifier name. |
add_classifiers_to_collection
Add classifiers to an existing collection. All classifiers must already exist and not already be in the collection. ALTR managed collections cannot have classifiers appended.
| Parameter | Type | Description |
|---|---|---|
classifier_names * | Classifier name(s) to add. Pass a single string or a list of strings. | |
collection_name * | string | Collection to add classifiers to. |
remove_classifiers_from_collection
Remove classifiers from a collection.
| Parameter | Type | Description |
|---|---|---|
classifier_names * | Classifier name(s) to remove. Pass a single string or a list of strings. | |
collection_name * | string | Collection to remove classifiers from. |
add_classifier_to_collections
Add one classifier to several collections in a single call. The reverse of `add_classifiers_to_collection`. All collections must exist and not already contain the classifier. ALTR-managed collections cannot be added to.
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Classifier to add. |
collection_names * | Collection name(s) to add it to. Pass a single string or a list of strings. |
remove_classifier_from_collections
Remove one classifier from several collections in a single call. The classifier must currently be in every collection named. Collections whose names start with "ALTR" cannot have classifiers removed.
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Classifier to remove. |
collection_names * | Collection name(s) to remove it from. Pass a single string or a list of strings. |
list_classifier_tags
List the key:value tags in use across the org's classifiers. Covers tags on classifiers and on their ruleset conditions, with the number of classifiers using each and where it appears. Use it to reuse existing tags in `create_classifier` and `update_classifier`. These are classifier tags, not the Snowflake tags `get_tags` lists.
| Parameter | Type | Description |
|---|---|---|
contiguous_id | Pagination token from a prior call. | |
key | Only tags with this exact key (the part before ':'). | |
limit | Max tags per page (default 100, max 500). | |
prefix | Only tags whose full key:value string starts with this. |
import_altr_managed_classifiers
Import ALTR-managed classifiers and create or update their collection. ALTR maintains curated classifiers for common sensitive data types (SSN, credit cards, email, phone numbers, etc.), grouped into managed collections. Importing is idempotent and syncs the latest versions. Use `get_altr_managed_timestamp` first to see whether an update is available.
| Parameter | Type | Description |
|---|---|---|
collection | Managed collection slug: "regex" (the default, the "ALTR Managed" collection), "gdlp", "aws-comprehend", "snowflake-native" or "stoplight", or "all" to import every managed collection. |
get_altr_managed_timestamp
Check whether a newer version of ALTR-managed classifiers is available. Returns the latest available version timestamp alongside the version currently installed in your org. If they differ, call `import_altr_managed_classifiers` for that collection to update.
| Parameter | Type | Description |
|---|---|---|
collection | Managed collection slug: "regex" (the default), "gdlp", "aws-comprehend", "snowflake-native" or "stoplight", or "all" for every managed collection in one call. |
list_altr_managed_classifiers
List available ALTR-managed (prebuilt) classifiers. Shows the canonical set maintained by ALTR, not what's currently in your org. Call `import_altr_managed_classifiers` to sync them.
| Parameter | Type | Description |
|---|---|---|
collection | Managed collection slug: "regex" (the default), "gdlp", "aws-comprehend", "snowflake-native" or "stoplight". | |
contiguous_id | Pagination token. | |
limit | Max items to return. |
get_jobs
Check the status of classification jobs you've run. Classification jobs run asynchronously and can take 10-30+ minutes to complete depending on your database size. Use this to check if a job has finished after waiting an appropriate amount of time. Once a job shows status COMPLETED, you can fetch its detailed report with `get_classification_report` or browse results with `get_job_findings`. If status is still RUNNING, wait longer before checking again. A review-gated job stops at AWAITING_REVIEW until its findings are decided and `confirm_job_report` runs. Typical workflow: After creating a…
| Parameter | Type | Description |
|---|---|---|
agent_id | Restrict to jobs run by a specific CLASSIFIER agent UUID. | |
classification_type | Optional classification type code. 1=ALTR Hosted (Snowflake, Databricks), 5=In-Warehouse Snowflake or agent. Legacy codes, which the job tools never create: 1 without a collection=Google DLP (filterin… | |
contiguous_id | Pagination token from a prior `get_jobs` call. | |
database_id | Restrict to a specific database (numeric ID from `get_databases` / `get_database_id`). | |
job_type | Filter by job type (FULL or INCREMENTAL). | |
limit | Max jobs to return (default 50, max 50). | |
order | Sort order by start time, `asc` or `desc` (default `desc`). | |
status | Filter by job status (e.g. RUNNING, PAUSED, COMPLETED, CANCELLED, FAILED). |
get_active_jobs
List all currently active (non-terminal) classification jobs. Returns jobs that have not finished: created, running, paused or resumed, cancelling, building their report, or waiting for review. Useful for checking what's in flight without filtering through all historical jobs.
| Parameter | Type | Description |
|---|---|---|
agent_id | Filter by agent UUID. | |
classification_type | Classification type code. 1=ALTR Hosted (Snowflake, Databricks), 5=In-Warehouse Snowflake or agent. Legacy codes, which the job tools never create: 1 without a collection=Google DLP (filtering on 1 al… | |
contiguous_id | Pagination token. | |
database_id | Filter by database ID. | |
job_type | FULL or INCREMENTAL. | |
limit | Max jobs to return. | |
order | "desc" (newest first, the default) or "asc". | |
status | One active status: CREATED, RESUMED, PAUSED, RUNNING, PENDING_CANCEL, UPLOADING_REPORT, PROCESSING_REPORT, PROCESSING_FINDINGS or AWAITING_REVIEW. |
get_job
Get details for a single classification job by ID.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier returned from a create-job tool or listed by `get_jobs`. |
get_job_summary
Get an inline per-classifier classification summary for a completed job. Returns classification counts grouped by classifier — faster than `get_classification_report` because it doesn't require a presigned S3 round-trip. Use this to get a quick count of detected columns before drilling into `get_job_findings`.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier of a COMPLETED job. |
list_report_groups
List classification reports grouped by collection, method and datasource, newest activity first. Each group carries its latest run; page older runs with `list_report_group_runs`. Keep filters the same across pages, and page until contiguous_id is absent: a filtered page can be empty while more matches remain.
| Parameter | Type | Description |
|---|---|---|
connection_type | Only these connection types, e.g. ["databricks", "mysql"]. | |
contiguous_id | Pagination token from a prior call. | |
limit | Max groups per page (default 50, max 50). | |
status | Only groups whose latest run has one of these report statuses: "needs_review", "in_progress", "confirmed", "failed". |
list_report_group_runs
List a report group's classification runs, newest first.
| Parameter | Type | Description |
|---|---|---|
group_id * | string | group_id from `list_report_groups`. |
contiguous_id | Pagination token from a prior call. | |
limit | Max runs per page (default 50, max 50). |
get_job_exclusions
Show which exclusion paths a classification job applied. `applied` lists exclusions that covered at least one object; `unmatched` lists those that covered nothing. A non-empty `unmatched` means the scan sampled more than intended, for example because of a mistyped path. When `applied_unavailable` or `match_unavailable` is true, the matching list is unknown rather than empty.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier. |
create_snowflake_job
Run a classification scan on a Snowflake database, as the console's Classify Data wizard does. The collection's classifiers decide what is detected. The processing location decides where the scan runs: - "altr_hosted" (the default): ALTR reads samples and evaluates the classifiers in its cloud, including Google DLP and Amazon Comprehend conditions. - "in_warehouse": the scan runs in Snowflake on your compute. Google DLP, Content Type and Amazon Comprehend conditions are skipped. Scans run asynchronously and can take 10-30+ minutes. Poll `get_job` or `get_jobs`; a review-gated job stops…
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Collection to run. It must contain classifiers. |
database_id * | integer | Snowflake connection ID (from `get_databases`). |
exclude | Objects to skip, relative to the scope: a schema name, or "schema.table". Without schema, exclusions apply to the whole database. Check `get_job_exclusions` afterwards: a name that matches nothing is… | |
processing_location | string | "altr_hosted" or "in_warehouse". |
requires_review | boolean | Hold the report for human review until every finding is decided and `confirm_job_report` runs. Defaults to true, as in the console. |
sample_size | Rows to sample per column (default 1000), or a percentage from 1 to 100 (default 5) with PERCENT. | |
sample_type | string | "ROWS" (a row count, the default) or "PERCENT". |
schema | Scan only this schema of the database. | |
table | Scan only this table (requires schema). |
create_databricks_job
Run a classification scan on a Databricks workspace, as the console does. Databricks scans are always ALTR Hosted. Scans run asynchronously; poll `get_job` or `get_jobs`. A review-gated job stops at AWAITING_REVIEW.
| Parameter | Type | Description |
|---|---|---|
collection_name * | string | Collection to run. It must contain classifiers. |
database_id * | integer | Databricks connection ID (from `get_databases`). |
catalog | Scan only this Unity Catalog catalog. | |
exclude | Objects to skip, relative to the scope: a schema, or "schema.table" under a catalog. Check `get_job_exclusions` afterwards: a name that matches nothing is not an error. | |
requires_review | boolean | Hold the report for human review until every finding is decided and `confirm_job_report` runs. Defaults to true, as in the console. |
sample_size | Rows to sample per column (default 1000), or a percentage from 1 to 100 (default 5) with PERCENT. | |
sample_type | string | "ROWS" (a row count, the default) or "PERCENT". |
schema | Scan only this schema (requires catalog). | |
table | Scan only this table (requires schema). |
create_oltp_job
Run a classification scan on a database repository (Oracle, MSSQL, PostgreSQL, MySQL, MongoDB, Cassandra) through a classifier agent, as the console does. The scan runs on the agent, in your network, except that Google DLP and Amazon Comprehend conditions send sampled values to those services under the agent's own Google Cloud and AWS credentials; a collection with either kind fails the scan at start if the agent isn't configured for it. For S3 and filesystem repositories use `create_file_classification_job`. Scans run asynchronously; poll `get_job` or `get_jobs`. A review-gated job stops at…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | CLASSIFIER agent ID (from `list_sc_agents`). |
collection_name * | string | Collection to run. It must contain classifiers. |
repo_name * | string | Repository name (from `list_sc_repos`). |
service_user_name * | string | Repository service user the agent connects as (from `list_sc_service_users`). |
database | Scan only this database. On Oracle this is the connection's service name. | |
exclude | Objects to skip, relative to the scope: "schema" or "schema.table" under a database (a table name on MySQL, MongoDB and Cassandra). Check `get_job_exclusions` afterwards: a name that matches nothing i… | |
requires_review | boolean | Hold the report for human review until every finding is decided and `confirm_job_report` runs. Defaults to true, as in the console. |
sample_size | Rows to sample per column (default 1000), or a percentage from 1 to 100 (default 5) with PERCENT. | |
sample_type | string | "ROWS" (a row count, the default) or "PERCENT". |
schema | Scan only this schema (requires database). MySQL, MongoDB and Cassandra have no schema level. | |
service_name | Oracle only: the service name to connect with. A scoped Oracle scan always connects by service name, which is also its database. | |
sid | Oracle only, for an unscoped scan: the SID to connect with. | |
table | Scan only this table or collection (requires database, and schema on Oracle, MSSQL and PostgreSQL). |
create_file_classification_job
Run a classification scan on an S3 or filesystem repository through a classifier agent, as the console does. File contents stay in the agent's network, except that Google DLP and Amazon Comprehend conditions send them to those services under the agent's own Google Cloud and AWS credentials; a collection with either kind fails the scan at start if the agent isn't configured for it. Scans run asynchronously; poll `get_job` or `get_jobs`. A review-gated job stops at AWAITING_REVIEW.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | CLASSIFIER agent ID (from `list_sc_agents`). |
collection_name * | string | Collection to run. It must contain classifiers. |
repo_name * | string | S3 or filesystem repository (from `list_sc_repos`). |
service_user_name * | string | Repository service user (from `list_sc_service_users`). |
content_classification | boolean | Classify file contents. False maps files and fields only. Defaults to true. |
exclude_glob | Skip files whose paths match this glob. | |
exclude_paths | Prefixes or directories to skip, relative to the repository root (at most 100). | |
full_file_scan | boolean | Read every value of every file instead of a sample. Defaults to false. |
glue_crawler | S3 with GLUE only: the Glue crawler to start. | |
glue_start_crawler | boolean | S3 with GLUE only: run the crawler when the catalog is empty. |
include_glob | Only files whose paths match this glob. | |
max_file_bytes | Bytes read per file, at most 67108864 (64 MiB; agent default 10 MiB). | |
max_files | Cap on files listed (agent default 100000). | |
metadata_map | string | How field names (CSV headers, JSON keys) are kept in results: "hashed" (the default), "plaintext" or "none". |
metadata_map_by_format | Per-format overrides for csv, json, xml, html or yaml, e.g. {"csv": "plaintext"}. | |
paths | Scan only these prefixes or directories, relative to the repository root (at most 50). Omit to scan everything. | |
requires_review | boolean | Hold the report for human review until every finding is decided and `confirm_job_report` runs. Defaults to true, as in the console. |
scan_mode | S3 only: "CRAWL" (list the bucket, the default) or "GLUE" (read the repository's Glue database). | |
sniff_bytes | boolean | S3 only: detect content types from file bytes rather than extensions. Defaults to true. |
update_job_status
Control a running classification job (pause, cancel, or resume). Use to manage long-running classification jobs. Status options: PAUSED, CANCELLED, or RUNNING.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier to update. |
status * | string | New status (PAUSED, CANCELLED, or RUNNING). |
get_job_findings
List databases found in a completed classification job. Entry point for navigating classification results hierarchically without downloading the full report. Returns the databases that contain detected columns. Drill down with `get_job_findings_schemas`, then tables, columns, and classifiers. Prefer this over `get_classification_report` when you want to interactively explore or filter results by status or classifier.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
classifier_name | Filter to databases containing detections by these classifier(s). Single string or list. | |
confidence | Keep only findings of these confidence tiers: HIGH, MEDIUM, LOW. Counts are limited the same way. | |
confirmed_status | Filter by review status: approved, rejected, or pending. Single string or list. | |
include_column_status_counts | If true, include approved/ rejected/pending counts per database. | |
limit | Max databases to return. | |
page_token | Pagination token from a prior call. |
get_job_findings_schemas
List schemas in a database from a classification job's findings. Second level of the findings tree. Call after `get_job_findings` to drill into a specific database.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database name from `get_job_findings`. |
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
classifier_name | Filter by classifier name(s). | |
confidence | Keep only findings of these confidence tiers: HIGH, MEDIUM, LOW. Counts are limited the same way. | |
confirmed_status | Filter by review status: approved, rejected or pending. Single string or list. | |
limit | Max schemas to return. | |
page_token | Pagination token. |
get_job_findings_tables
List tables in a schema from a classification job's findings. Third level of the findings tree.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database name. |
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
schema * | string | Schema name from `get_job_findings_schemas`. |
classifier_name | Filter by classifier name(s). | |
confidence | Keep only findings of these confidence tiers: HIGH, MEDIUM, LOW. Counts are limited the same way. | |
confirmed_status | Filter by review status: approved, rejected or pending. Single string or list. | |
limit | Max tables to return. | |
page_token | Pagination token. |
get_job_findings_columns
List columns in a table from a classification job's findings. Fourth level of the findings tree.
| Parameter | Type | Description |
|---|---|---|
database * | string | Database name. |
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
schema * | string | Schema name. |
table * | string | Table name from `get_job_findings_tables`. |
classifier_name | Filter by classifier name(s). | |
confidence | Keep only findings of these confidence tiers: HIGH, MEDIUM, LOW. Counts are limited the same way. | |
confirmed_status | Filter by review status: approved, rejected or pending. Single string or list. | |
limit | Max columns to return. | |
page_token | Pagination token. |
get_job_findings_classifiers
List classifiers that fired on a specific column in a completed job. Fifth (leaf) level of the findings tree. Shows per-classifier detection results for a column with confidence scores. Use `get_job_findings_lineage` to see the full compound-ruleset evaluation trace for a specific classifier.
| Parameter | Type | Description |
|---|---|---|
column * | string | Column name from `get_job_findings_columns`. |
database * | string | Database name. |
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
schema * | string | Schema name. |
table * | string | Table name. |
classifier_name | Only these classifier(s). | |
confidence | Keep only findings of these confidence tiers: HIGH, MEDIUM, LOW. Counts are limited the same way. | |
confirmed_status | Filter by review status: approved, rejected or pending. Single string or list. | |
limit | Max classifiers to return. | |
page_token | Pagination token. |
get_job_findings_lineage
Get the compound-ruleset evaluation trace (lineage) for a classifier on a specific column in a completed job. Returns the full decision tree showing which conditions evaluated, which matched, and why the classifier did or did not fire. Useful for debugging custom classifiers or understanding AMAZON_COMPREHEND / METADATA condition results.
| Parameter | Type | Description |
|---|---|---|
classifier_name * | string | Classifier name to inspect. |
column * | string | Column name. |
database * | string | Database name. |
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
schema * | string | Schema name. |
table * | string | Table name. |
get_job_findings_leaves
List every finding in a job in one stream, ordered by full path. One row per (database, schema, table, column, classifier), with total_findings, match_rate_avg, is_new and the resolved review status. Use this to see a whole job at once instead of walking the tree with `get_job_findings` and its drill-down tools. Rows are under `items`. File sources also return crawl records, with an empty classifier_name and no confirmed_status; they are not findings and need no decision, and a confidence filter leaves them out.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier. |
confidence | Keep only these confidence tiers: HIGH, MEDIUM, LOW. Single string or list. | |
limit | Max rows per page (default 100, max 1000). | |
page_token | next_page_token from a prior call. |
record_job_decision
Approve or reject classification findings in a job. Decisions can be scoped from the entire job down to a specific classifier on a specific column. Broader scopes (e.g., entire table) apply to all columns and classifiers within that scope. After recording decisions, check overall progress with `get_job_review_status`. For a job created with requires_review=true, finish with `confirm_job_report` to release the report. To decide many findings at once, use `record_bulk_job_decision`.
| Parameter | Type | Description |
|---|---|---|
confirmed_status * | string | Decision to record: "approved" or "rejected". |
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
classifier_name | Scope to this classifier on the column (requires column). | |
column | Scope to this column (requires table). | |
database | Scope to this database (omit for job-wide). | |
schema | Scope to this schema (requires database). | |
table | Scope to this table (requires schema). |
get_job_decisions
List human review decisions recorded for a classification job.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier. |
column | Filter to this column. | |
database | Filter to this database. | |
limit | Max decisions to return. | |
page_token | Pagination token. | |
schema | Filter to this schema. | |
table | Filter to this table. |
revoke_job_decisions
Revoke (remove) previously recorded review decisions for a job. Scope works the same as `record_job_decision` — revoke at any granularity from the whole job down to a single classifier on a column. After revoking, those findings return to "pending" status.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier. |
classifier_name | Scope to this classifier. | |
column | Scope to this column. | |
database | Scope to this database. | |
schema | Scope to this schema. | |
table | Scope to this table. |
record_bulk_job_decision
Approve or reject every undecided finding that matches a filter. Covers findings of the given classifiers, optionally narrowed by confidence tier and by a database, schema and table path. Findings that already have a decision are left alone, and each covered finding can still be overridden with `record_job_decision`. Run with dry_run=True first to see how many findings it would cover. Returns matched_findings and matched_objects, plus a bulk_decision_id when something was recorded (not on a dry run or when nothing matched). Undo the whole decision with `revoke_bulk_job_decision`.
| Parameter | Type | Description |
|---|---|---|
classifier_names * | array | Classifiers whose findings to decide. |
confirmed_status * | string | Decision to record: "approved" or "rejected". |
job_id * | string | Job identifier. |
confidence | Keep only these confidence tiers: HIGH, MEDIUM, LOW. | |
database | Limit to this database. | |
dry_run | boolean | If true, return the counts without recording anything. |
schema | Limit to this schema (requires database). | |
table | Limit to this table (requires schema). |
revoke_bulk_job_decision
Undo a bulk decision recorded with `record_bulk_job_decision`. Revokes every decision it still covers. A finding decided individually afterwards keeps that individual decision.
| Parameter | Type | Description |
|---|---|---|
bulk_decision_id * | string | bulk_decision_id returned by `record_bulk_job_decision`. |
job_id * | string | Job identifier. |
get_job_review_status
Get the review progress for a classification job. Returns total/approved/rejected/pending counts across all findings. Use after recording decisions with `record_job_decision` to check how much review work remains.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Identifier of a COMPLETED job, or of a review-gated job at AWAITING_REVIEW. |
confirm_job_report
Confirm the review of a review-gated job and release its report. For a job created with requires_review=true. Every finding must have a decision; check with `get_job_review_status` first. Generation then runs in the background and decisions are locked: poll `get_job` until the status is COMPLETED, then read the report with `get_classification_report`.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier. |
cancel_job_report
Cancel a review-gated job before its report is confirmed. For a job created with requires_review=true that is still being reviewed. The job moves to CANCELLED and its review data is discarded. A job whose report has already been confirmed cannot be cancelled this way.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier. |
get_classification_report
Get detailed results from a completed classification job. Returns which columns were detected as containing sensitive data along with confidence scores. Only call after the job status is COMPLETED (verify with `get_jobs`). For interactive navigation, prefer `get_job_findings` which lets you drill down without downloading the full report. After reviewing results, check if the needed Snowflake tags exist using `get_tags`. If tags are missing, they must be created in Snowflake first before connecting with `connect_tag`.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job identifier returned from a create-job tool or listed by `get_jobs`. |
scan_object
Classify a file's contents and return the scan summary. Runs synchronously on up to 128 KiB of content: CSV, JSON, XML, YAML, plain text and the other types `get_scan_object_supported_types` lists. The content is processed in memory and not stored; the summary and token map are kept, so read the map with `get_scan_object_map` and the request_id returned here. Choose what to scan with: - collection_name: every classifier in the collection. - collection_name and classifier_name: one classifier from the collection. Add `classifier` to test an edited definition (pattern, compound_ruleset, mi…
| Parameter | Type | Description |
|---|---|---|
classifier | An unsaved classifier definition, as described above. | |
classifier_name | One classifier from collection_name. | |
collection_name | Collection to scan with. | |
content | File contents as text. Pass this or content_base64. | |
content_base64 | File contents, base64-encoded. Use for binary files. | |
file_name | Optional original file name, echoed in the results. | |
include_all_tokens | If true, the token map includes tokens that matched no classifier. Defaults to false. | |
include_lineage | If true, the token map shows how each classifier's conditions decided each match. | |
metadata_map | How structural names (CSV headers, JSON keys) are kept in the map: {"default": "hashed"|"plaintext"|"none", "by_format": {"csv": ...}}. |
list_scan_objects
List past `scan_object` scans, newest first.
| Parameter | Type | Description |
|---|---|---|
classifier_name | Only single-classifier or unsaved-classifier scans of this classifier. | |
collection_name | Only scans of this collection. | |
contiguous_id | Pagination token from a prior call. | |
limit | Max scans per page (default 50, max 50). | |
order | "desc" (default) or "asc" by creation time. | |
status | "COMPLETED", "FAILED" or "UNSUPPORTED_CONTENT_TYPE". |
get_scan_object
Get the stored summary of a scan: status, token counts, timing.
| Parameter | Type | Description |
|---|---|---|
request_id * | string | request_id from `scan_object` or `list_scan_objects`. |
get_scan_object_map
Get a scan's token map: where each classified token sits in the file and which classifiers matched it. Starts with a per-classifier summary. Each token carries its location (line, column, CSV row and header, or JSON/XML path) and its effective tags, not its value. Fails with 422 for a failed scan.
| Parameter | Type | Description |
|---|---|---|
request_id * | string | request_id from `scan_object` or `list_scan_objects`. |
get_scan_object_supported_types
List the content types `scan_object` detects and how it handles each, plus its size limit and metadata_map options.
get_databases
Discover which Snowflake databases are connected to ALTR. Returns connection metadata including database names and IDs. Use `get_database_id` to get the numeric ID required for classification jobs.
get_database_id
Get the ALTR database ID for a database name. Required before creating classification jobs. The database ID is a numeric identifier that ALTR uses internally to reference your Snowflake database. Typical workflow: After identifying your database with `get_databases`, call this to get the ID needed for `create_snowflake_job` or `create_databricks_job`.
| Parameter | Type | Description |
|---|---|---|
database_name * | string | Friendly database name as shown in the ALTR UI. |
get_service_users
List Snowflake service users available for database connections. Returns service user IDs needed for `create_database` when using keypair authentication (the recommended approach for Snowflake).
create_database
Connect a new data source to the ALTR platform. Supports two authentication modes: 1. **Service user (keypair auth — recommended for Snowflake):** Provide `service_user_id` from `get_service_users`. No password, hostname, or port needed. 2. **Password auth:** Provide `database_username`, `database_password`, `hostname`, and `database_port`. After creation, use `get_databases` to confirm the connection.
| Parameter | Type | Description |
|---|---|---|
database_name * | string | Actual database name (e.g. "MY_DATABASE_NAME"). |
database_type * | string | Database type (e.g. "snowflake_external_functions"). |
friendly_database_name * | string | Display name for the database in ALTR. |
database_password | Password (password auth only). | |
database_port | Database server port (password auth only). | |
database_username | Username (password auth only). | |
hostname | Database server hostname (password auth only). | |
service_user_id | Service user ID from `get_service_users` for keypair auth. Preferred for Snowflake connections. |
create_databricks_database
Connect a Databricks workspace to the ALTR platform. Supports two authentication modes: 1. **Service user (token auth — recommended):** Provide `service_user_id` from `get_service_users`. 2. **Password auth:** Provide `database_username` and `database_password`. After creation, use `get_databases` to confirm the connection.
| Parameter | Type | Description |
|---|---|---|
database_name * | string | Databricks catalog or workspace name. |
friendly_database_name * | string | Display name for the database in ALTR. |
hostname * | string | Databricks workspace URL (e.g. "https://adb-1234567890.azuredatabricks.net"). |
database_password | Password (password auth only). | |
database_username | Username (password auth only). | |
service_user_id | Service user ID from `get_service_users` for token auth. Preferred. |
update_database
Update a database connection's properties. Only the fields you provide will be updated; omitted fields remain unchanged.
| Parameter | Type | Description |
|---|---|---|
database_id * | integer | Numeric ALTR database ID (from `get_databases`). |
classification_type | Classification type code. | |
connection_string | Database connection string. | |
data_usage_history | Enable/disable data usage history. | |
database_password | Updated password. | |
database_username | Updated username. | |
friendly_database_name | Updated display name. | |
max_number_of_batches | Max concurrent batches. | |
max_number_of_connections | Max concurrent connections. | |
reinvoke | Trigger reinvocation of the database setup. | |
service_user_id | Service user identifier. | |
should_classify | Enable/disable classification. | |
snowflake_role | Snowflake role to use. | |
warehouse_name | Snowflake warehouse to use. |
trigger_database_status_sync
Trigger a database status sync. Sets the database to "in progress" until the status check completes. Use `get_databases` afterward to see the updated status.
| Parameter | Type | Description |
|---|---|---|
database_id * | integer | Numeric ALTR database ID (from `get_databases`). |
disconnect_database
Disconnect a data source from ALTR. Removes the ALTR connection to the data source. This does not affect the underlying database — only the ALTR connection to it.
| Parameter | Type | Description |
|---|---|---|
database_id * | integer | Numeric ALTR database ID (from `get_databases`). |
ignore_errors | boolean | If true, force disconnection even if cleanup fails. |
create_snowflake_access_policy
Create an access management policy for a Snowflake database, as the console does: grant one set of roles read and/or write access to named objects or to objects carrying a tag. ALTR applies the grants asynchronously and re-applies them on the refresh schedule. Target either by name (object_type and names) or by tag (tag_names): - By name: object_type "database" with database names; "schema" with `database` and schema names; "table" or "view" with `database`, `schema` and table or view names. - By tag: objects of kind tag_check_against carrying any of tag_names (the tag lives in tag_data…
| Parameter | Type | Description |
|---|---|---|
connection_id * | integer | Snowflake connection ID (from `get_databases`). |
policy_name * | string | Name for the policy (1-255 chars). |
refresh * | string | How often ALTR re-applies the grants: "none", "daily", "weekly" or "monthly". |
roles * | Snowflake roles that get access. | |
access | string | "read" (the default), "write" or "read_write". |
database | Database holding the schemas, tables or views. | |
names | Names of the objects of object_type. | |
object_type | "database", "schema", "table" or "view". | |
refresh_day | Day for a weekly or monthly refresh, MON to SUN. | |
refresh_time | "HH:MM" in UTC; needed unless refresh is "none". | |
refresh_week | Week of the month for a monthly refresh, 1 to 4. | |
schema | Schema holding the tables or views. | |
tag_check_against | "database", "schema", "table" or "view". | |
tag_database | Database the tag is defined in. | |
tag_names | Tag names; with tag_values, exactly one. | |
tag_schema | Schema the tag is defined in. | |
tag_values | Tag values to match on the one tag name. |
update_snowflake_access_policy
Update a Snowflake access management policy, as the console's editor does. Anything left out keeps its current value: the name, the rule and the refresh schedule. Saving re-applies the grants, so there is no need to call `trigger_access_policy_check` afterwards. To change the rule, pass all of it: roles, access and a target, in the form `create_snowflake_access_policy` takes. A policy whose rule the console can't edit keeps that rule; only its name and schedule can change. A policy still applying a previous change can't be updated until it finishes.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Policy ID, starting GRANT#. Do not URL-encode. |
access | "read", "write" or "read_write". | |
database | Database holding the schemas, tables or views. | |
names | Names of the objects of object_type. | |
object_type | "database", "schema", "table" or "view". | |
policy_name | New name (1-255 chars). | |
refresh | "none" to remove the schedule, or "daily", "weekly" or "monthly" to replace it. | |
refresh_day | Day for a weekly or monthly refresh, MON to SUN. | |
refresh_time | "HH:MM" in UTC. | |
refresh_week | Week of the month for a monthly refresh, 1 to 4. | |
roles | Snowflake roles that get access. | |
schema | Schema holding the tables or views. | |
tag_check_against | "database", "schema", "table" or "view". | |
tag_database | Database the tag is defined in. | |
tag_names | Tag names; with tag_values, exactly one. | |
tag_schema | Schema the tag is defined in. | |
tag_values | Tag values to match on the one tag name. |
create_oltp_access_policy
Create an access management policy for a database repository, as the console does: which ALTR users or IdP groups may create, read, update or delete which objects through the sidecar. Supports Oracle, MSSQL, Postgres, MySQL, MongoDB and Cassandra repositories. Each rule grants one kind of access to one set of users or groups on objects of one type: - access: "create", "read" (the default), "update" or "delete". - users (ALTR usernames, which are emails) or groups (IdP group names), as a list. - object_type: one level of the repository's hierarchy. Oracle, MSSQL and Postgres: database, sch…
| Parameter | Type | Description |
|---|---|---|
policy_name * | string | Name for the policy (1-255 chars). |
repo_name * | string | Repository name (from `list_sc_repos`). |
rules * | List of rules as above, or a JSON string encoding one. |
update_oltp_access_policy
Update a database repository's access management policy, as the console's editor does. Anything left out keeps its current value. The repository can't change.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Policy ID, starting OLTP#. Do not URL-encode. |
policy_name | New name (1-255 chars). | |
rules | The complete new list of rules, in the form `create_oltp_access_policy` takes. Replaces every rule. |
trigger_access_policy_check
Re-apply a Snowflake access management policy's grants now, as the console's Refresh button does, instead of waiting for its schedule. The run is queued and the policy shows as pending until it finishes. Database repository policies don't need it.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Policy ID, starting GRANT#. Do not URL-encode. |
get_access_requests
List one page of access requests, newest first, as the console's access request list does. Only OPEN requests unless `status` says otherwise; the API filters on one status per call. To get the next page, pass the response's `last_evaluated_key` unchanged as `exclusive_start_key`, with the same `status` and `requester`. Keep going until `last_evaluated_key` is absent: the last page can be empty and still carry one.
| Parameter | Type | Description |
|---|---|---|
exclusive_start_key | `last_evaluated_key` from the previous page, as returned (an object, or the same object as a JSON string). | |
limit | integer | Max requests to return, 1 to 100 (default 100). |
requester | Only requests from this requester (exact name). | |
sort | string | "desc" (newest first, the default) or "asc". |
status | string | OPEN (the default), CLOSED_APPROVED, CLOSED_DENIED, CLOSED_CANCELLED or FAILED. The API also accepts NONE, PENDING_CREATION and the PENDING_* states. |
get_access_request
Get one access request: who asked, for what, why, and its status.
| Parameter | Type | Description |
|---|---|---|
request_id * | string | Access request ID (UUID). |
approve_access_request
Approve an OPEN access request, as the console does. ALTR creates a Snowflake access management policy granting what was requested, linked to the request, and applies it asynchronously.
| Parameter | Type | Description |
|---|---|---|
request_id * | string | Access request ID (UUID). |
justification | Optional reason recorded with the decision (up to 1000 characters). |
deny_access_request
Deny an OPEN access request, as the console does.
| Parameter | Type | Description |
|---|---|---|
request_id * | string | Access request ID (UUID). |
justification | Optional reason recorded with the decision (up to 1000 characters). |
get_agent_instances
List running instances for a specific ALTR agent.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
contiguous_id | Pagination token from a prior call. | |
limit | Max items to return. |
get_agent_instance
Get details for a specific agent instance.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
instance_id * | string | Instance UUID. |
disconnect_agent_instance
Disconnect an agent instance from ALTR's view.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
instance_id * | string | Instance UUID to disconnect. |
get_agent_task_telemetry
Get task telemetry for a specific agent. Returns task status, messages, and metadata for tasks assigned to this agent.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
contiguous_id | Pagination token from a prior call. | |
limit | Max items to return. |
get_sidecar_instances
List running instances for a specific sidecar.
| Parameter | Type | Description |
|---|---|---|
sidecar_id * | string | Sidecar UUID. |
contiguous_id | Pagination token from a prior call. | |
limit | Max items to return. |
get_sidecar_instance
Get details for a specific sidecar instance.
| Parameter | Type | Description |
|---|---|---|
instance_id * | string | Instance UUID. |
sidecar_id * | string | Sidecar UUID. |
disconnect_sidecar_instance
Disconnect a sidecar instance from ALTR's view.
| Parameter | Type | Description |
|---|---|---|
instance_id * | string | Instance UUID to disconnect. |
sidecar_id * | string | Sidecar UUID. |
get_task_telemetry
Get telemetry for a specific task by its ID.
| Parameter | Type | Description |
|---|---|---|
task_id * | string | Task UUID. |
delete_task_telemetry
Delete telemetry for a specific task.
| Parameter | Type | Description |
|---|---|---|
task_id * | string | Task UUID. |
search_audits
Search sidecar query audits with filters. Triggers an async search and returns a search_uuid (valid 30 days). Use `get_audit_results` with the search_uuid to retrieve results. All filters are combined with AND logic.
| Parameter | Type | Description |
|---|---|---|
column_name | Filter by column names. Pass a single string or a list of strings. | |
consuming_user | Filter by consuming usernames (case-insensitive). Pass a single string or a list of strings. | |
consuming_user_email | Filter by consuming user emails. Pass a single string or a list of strings. | |
database_name | Filter by database names. Pass a single string or a list of strings. | |
filter_tree | Optional filter, as a dict or JSON string, in the same format as `create_dam_rule`'s filter_tree. It is ANDed with the other filters. A node is a junction {"op": "and"|"or", "children": [nodes]} or a… | |
from_date_time | RFC3339 UTC start time (e.g. "2025-01-01T00:00:00Z"). Defaults to 24h ago. | |
limit | Max results (default 10000, max 100000). | |
offset | Skip this many results. | |
order_by | "asc" or "desc" (default "desc"). | |
query_id | Filter by specific query IDs. Pass a single string or a list of strings. | |
repo_name | Filter by repository (connection) names. Distinct from database_name, which matches each column's database. Pass a single string or a list of strings. | |
schema_name | Filter by schema names. Pass a single string or a list of strings. | |
sidecar_id | Filter by sidecar IDs. Pass a single string or a list of strings. | |
sidecar_instance_id | Filter by sidecar instance IDs. Pass a single string or a list of strings. | |
sort_by | "event_time" or "rows_accessed" (default "event_time"). | |
statement_text_contains | Case-insensitive substring match on SQL text. A literal match: % and _ match themselves, not as wildcards. | |
statement_type | Filter by statement types. Pass a single string or a list of strings. | |
table_name | Filter by table names. Pass a single string or a list of strings. | |
timezone | IANA timezone for time_of_day leaves, e.g. "America/New_York". Required when filter_tree has a time_of_day leaf, and refused otherwise. | |
to_date_time | RFC3339 UTC end time. Defaults to now. |
get_audit_results
Get results from a previously triggered audit search. Results may not be immediately available — a 202 response means the search is still processing. Retry after a short wait.
| Parameter | Type | Description |
|---|---|---|
search_uuid * | string | UUID returned by `search_audits`. |
limit | Max results per page (default 250, max 250). | |
next_page_token | Pagination token from a prior call. |
search_system_audits
Search ALTR platform system audits. Starts an async query against system audit logs. Returns a token to retrieve results with `get_system_audit_results`. If `wait` is set, the API may return results directly (200) or a token for later retrieval (202). The `from` and `to` time range may be at most one week.
| Parameter | Type | Description |
|---|---|---|
category * | string | Audit category. Values: "API Keys", "Locks", "Data", "Administrators", "Thresholds", "Anomalies", "Applications", "User Groups", "Data Sources", "Row Access Policy", "Unified Access Policy", "Access R… |
from_date_time | ISO 8601 UTC start time. Defaults to 48h ago. | |
limit | Max results (1-100, default 50). | |
offset | Results to skip (default 0). | |
to_date_time | ISO 8601 UTC end time. Defaults to now. | |
wait | Milliseconds to wait for results (-1 to 1000, default 100). Set to -1 to return immediately with token. |
get_system_audit_results
Get results from a system audit query. Use the token returned by `search_system_audits`. If the response has `moreData: true`, use the new token to fetch the next page.
| Parameter | Type | Description |
|---|---|---|
token * | string | Token from `search_system_audits` or a prior call's response. |
search_query_audits
Search Snowflake query audits (tag and column masking). Triggers an async search and returns a search_uuid (valid 30 days). Use `get_query_audit_results` with the search_uuid to retrieve results. All filters are combined with AND logic. Use this for Snowflake tag-based or column-based masking audits. For sidecar proxy audits, use `search_audits` instead.
| Parameter | Type | Description |
|---|---|---|
executing_role | Filter by role executing the query (case-insensitive). | |
executing_user | Filter by user executing the query (case-insensitive). | |
filter_tree | Optional filter, as a dict or JSON string, in the same format as `create_dam_rule`'s filter_tree. It is ANDed with the other filters. A node is a junction {"op": "and"|"or", "children": [nodes]} or a… | |
from_date_time | RFC3339 UTC start time (e.g. "2025-01-01T00:00:00Z"). Defaults to 24h ago. | |
limit | Max results (default 10000, max 100000). | |
offset | Skip this many results. | |
order_by | "asc" or "desc" (default "desc"). | |
policy_column_database_name | Filter by database name (case-insensitive). | |
policy_column_name | Filter by column name (case-insensitive). | |
policy_column_schema_name | Filter by schema name (case-insensitive). | |
policy_column_table_name | Filter by table name (case-insensitive). | |
policy_tag_name | Filter by policy tag name (case-insensitive). | |
policy_tag_value | Filter by policy tag value (case-insensitive). | |
query_id | Filter by query identifier (case-insensitive, at most 255 characters). | |
sort_by | "event_time" or "rows_accessed" (default "event_time"). | |
timezone | IANA timezone for time_of_day leaves, e.g. "America/New_York". Required when filter_tree has a time_of_day leaf, and refused otherwise. | |
to_date_time | RFC3339 UTC end time. Must not be in the future. Defaults to now. |
get_query_audit_results
Get results from a previously triggered query audit search. Results may not be immediately available — a 202 response means the search is still processing. Retry after a short wait. Use this to retrieve results from `search_query_audits`. For sidecar audit results, use `get_audit_results` instead.
| Parameter | Type | Description |
|---|---|---|
search_uuid * | string | UUID returned by `search_query_audits`. |
limit | Max results per page (default 250, max 250). | |
next_page_token | Pagination token from a prior call. |
list_report_definitions
List audit report definitions. Returns paginated definitions ordered by creation time descending. Use `cursor` to page through results.
| Parameter | Type | Description |
|---|---|---|
archived | If True, return only archived definitions. If False or omitted, return only active definitions. | |
cursor | Pagination cursor from a prior call. | |
limit | Max results per page. |
create_report_definition
Create a new audit report definition. Defines what data is included, how it is scheduled, and where it is delivered. After creating, use `trigger_report_definition` to generate a report on demand.
| Parameter | Type | Description |
|---|---|---|
integration_type * | string | Data source type. Values: "oltp", "snowflake". |
name * | string | Unique display name for the definition (max 200 chars). |
timezone * | string | IANA timezone for the report window (e.g. "America/New_York"). |
delivery | Delivery configuration as a dict or JSON string. Shape: {"channels": [{"type": "email", "enabled": bool, "recipients": ["email@example.com"]}]}. At most 20 recipients, in the org's allowed email domai… | |
description | Optional human-readable description (max 1000 chars). | |
filters | Filter groups as a dict or JSON string. Groups are ORed; the filters in a group are ANDed. Shape: {"filter_groups": [{"filters": [{"field": "repo_name", "mode": "include", "patterns": [{"match_type":… | |
lookback_days | Number of complete calendar days to include in each report window (excludes the trigger day). 1-120; default 7. | |
required_approvals | Sign-offs that finalize each report. Default 0: sign-offs never finalize it. | |
retention_days | Days to keep each report, 1-2555. Default 90. | |
schedule_cron | 6-field cron expression controlling when the report runs automatically. Format: "minute hour day-of-month month day-of-week year" Use ? in day-of-month OR day-of-week (not both) when the other field i… | |
schedule_enabled | Whether the schedule is active. Pass True to run it: a schedule sent without it is saved disabled. | |
schedule_timezone | IANA timezone for schedule evaluation (e.g. "America/New_York"; default "UTC"). All cron times are interpreted in this timezone. |
get_report_definition
Get a single audit report definition by ID.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
update_report_definition
Update an existing audit report definition (full replacement). Replaces the definition's configuration entirely. All fields that should be preserved must be included. An omitted field is cleared or reset: description is emptied, schedule and delivery are removed, a schedule sent without schedule_enabled is disabled, filters are removed so the report covers every event, lookback_days returns to 7, required_approvals to 0 and retention_days to 90. Read the definition first with `get_report_definition`.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the definition to update. |
integration_type * | string | Data source type. Values: "oltp", "snowflake". |
name * | string | Unique display name for the definition (max 200 chars). |
timezone * | string | IANA timezone for the report window (e.g. "America/New_York"). |
delivery | Delivery configuration as a dict or JSON string. Shape: {"channels": [{"type": "email", "enabled": bool, "recipients": ["email@example.com"]}]}. At most 20 recipients, in the org's allowed email domai… | |
description | Optional human-readable description (max 1000 chars). | |
filters | Filter groups as a dict or JSON string. Groups are ORed; the filters in a group are ANDed. Shape: {"filter_groups": [{"filters": [{"field": "repo_name", "mode": "include", "patterns": [{"match_type":… | |
lookback_days | Number of complete calendar days to include in each report window (excludes the trigger day). 1-120; default 7. | |
required_approvals | Sign-offs that finalize each report. Default 0: sign-offs never finalize it. | |
retention_days | Days to keep each report, 1-2555. Default 90. | |
schedule_cron | 6-field cron expression controlling when the report runs automatically. Format: "minute hour day-of-month month day-of-week year" Use ? in day-of-month OR day-of-week (not both) when the other field i… | |
schedule_enabled | Whether the schedule is active. Pass True to run it: a schedule sent without it is saved disabled. | |
schedule_timezone | IANA timezone for schedule evaluation (e.g. "America/New_York"; default "UTC"). All cron times are interpreted in this timezone. |
archive_report_definition
Archive (soft-delete) an audit report definition. Archived definitions are hidden from normal listings but can be restored with `restore_report_definition`.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the definition to archive. |
restore_report_definition
Restore an archived audit report definition.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the archived definition to restore. |
trigger_report_definition
Trigger an on-demand audit report for a definition. Generates a report instance immediately outside of the normal schedule. Rate-limited to one trigger per definition per 5 minutes.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the definition to trigger. |
list_report_instances
List report instances for a given definition. Each instance represents one generated report. Instances are returned newest-first.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
cursor | Pagination cursor from a prior call. | |
limit | Max results per page. |
get_report_instance
Get a single report instance by ID.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
get_report_instance_download_url
Get a download URL for a report instance. Returns a pre-signed URL to download the report file. Only instances with status "generated" or "finalized" have one.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
format | string | File format. Values: "pdf" (default), "csv". |
list_report_comments
List comments on a report instance. Pinned comments appear first, followed by the rest in chronological order.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
cursor | Pagination cursor from a prior call. | |
limit | Max results per page. |
create_report_comment
Add a comment to a report instance.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
text * | string | Comment text to add. |
pin_report_comment
Pin a comment on a report instance. Only one comment per instance can be pinned at a time; unpin the current one first.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | ID of the comment to pin. |
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
unpin_report_comment
Unpin the currently pinned comment on a report instance.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | ID of the comment to unpin. |
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
get_report_sign_off
Get the current user's sign-off for a report instance. Returns null/empty if the current user has not yet signed off.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
create_report_sign_off
Sign off on a report instance. Records the current user's approval of the report. Each user signs off once, and only while the instance status is "generated". Each instance copies required_approvals from its definition when generated. If that value is above 0, the instance is finalized when its sign-offs reach it.
| Parameter | Type | Description |
|---|---|---|
attestation * | boolean | Whether the signer attests to the report's accuracy. Ask the user; never assume it. False still records an approval that counts toward required_approvals, so if the user does not approve, do not call… |
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
action | string | Sign-off action. Values: "approve" (default). |
comments | Optional comments to include with the sign-off. |
list_report_sign_offs
List all sign-offs for a report instance. Returns sign-offs from all users who have reviewed the instance.
| Parameter | Type | Description |
|---|---|---|
definition_id * | string | ID of the report definition. |
instance_id * | string | ID of the report instance. |
cursor | Pagination cursor from a prior call. | |
limit | Max results per page. |
list_dam_rules
List DAM (Data Access Monitoring) alert rules.
| Parameter | Type | Description |
|---|---|---|
contiguous_id | Pagination token from a prior call. Present in the response while has_more is true. | |
enabled | Only rules with this enabled flag. | |
limit | Max results per page (default 25, max 100). | |
rule_type | Only rules of this type. Values: "match", "threshold". | |
severity | Only rules of this severity. Values: "low", "medium", "high", "critical". |
get_dam_rule
Get a single DAM alert rule by ID.
| Parameter | Type | Description |
|---|---|---|
rule_id * | string | ID of the rule. |
create_dam_rule
Create a DAM alert rule that fires alerts on matching audit events. A "match" rule fires one alert per matching event. A "threshold" rule counts matching events in a tumbling window and fires once per window when the count reaches `threshold`. rule_type, data_source_scope, filter_tree, window_type, threshold and timezone cannot be changed later; to change them, delete the rule and create a new one.
| Parameter | Type | Description |
|---|---|---|
data_source_scope * | string | Audit source the rule evaluates. "oltp" (sidecar) or "snowflake". |
filter_tree * | Filter as a dict or JSON string. A node is either a junction {"op": "and"|"or", "children": [nodes]} or a leaf {"op": ..., "dimension": ..., <value field>}. Leaf ops and their value field: eq, neq,… | |
name * | string | Display name (max 255 chars). |
rule_type * | string | "match" or "threshold". |
severity * | string | "low", "medium", "high", or "critical". |
comment_required | If True, acknowledging an alert from this rule requires a comment. | |
description | Optional description (max 2000 chars). | |
email_rate_limit_seconds | Minimum seconds between emails for this rule. 0 or omitted uses the platform default (300); otherwise 60 to 86400. | |
email_recipients | Addresses to email when the rule fires (max 100). Domains must be allowed for the organization. | |
enabled | boolean | Whether the rule is evaluated (default False). |
threshold | Threshold rules only (required there). Event count (>= 1) that fires the alert. | |
timezone | IANA timezone, e.g. "America/New_York". Required on threshold rules (aligns windows). On match rules, required when filter_tree has a time_of_day leaf and must be omitted otherwise. | |
window_type | Threshold rules only (required there). "hourly", "daily", "weekly", or "monthly". |
update_dam_rule
Update the mutable fields of a DAM alert rule. Only the fields passed are changed. rule_type, data_source_scope, filter_tree, window_type, threshold and timezone cannot be updated; delete the rule and create a new one instead.
| Parameter | Type | Description |
|---|---|---|
rule_id * | string | ID of the rule. |
comment_required | Require a comment to acknowledge alerts. | |
description | New description (max 2000 chars). | |
email_rate_limit_seconds | 0 resets to the platform default; otherwise 60 to 86400. | |
email_recipients | Replaces the recipient list. Pass [] to remove all recipients. | |
enabled | Turn evaluation on or off. | |
name | New display name (1-255 chars). | |
severity | "low", "medium", "high", or "critical". |
delete_dam_rule
Permanently delete a DAM alert rule and stop evaluating it. Alerts the rule already fired are kept.
| Parameter | Type | Description |
|---|---|---|
rule_id * | string | ID of the rule. |
list_dam_alerts
List fired DAM alerts, newest first.
| Parameter | Type | Description |
|---|---|---|
contiguous_id | Pagination token from a prior call. Present in the response while has_more is true. | |
limit | Max results per page (default 25, max 100). | |
rule_id | Only alerts fired by this rule. | |
severity | "low", "medium", "high", or "critical". | |
state | "new" or "acknowledged". |
get_dam_alert
Get a single DAM alert by ID. Match-rule alerts carry the matched audit event in matched_event; threshold alerts carry the count and window in threshold_context.
| Parameter | Type | Description |
|---|---|---|
alert_id * | string | ID of the alert. |
acknowledge_dam_alert
Acknowledge a new DAM alert. Fails with 409 if the alert is already acknowledged, and with 400 if its rule has comment_required set and no comment is given.
| Parameter | Type | Description |
|---|---|---|
alert_id * | string | ID of the alert. |
comment | Acknowledgment comment. |
list_dam_alert_comments
List investigation comments on a DAM alert, oldest first.
| Parameter | Type | Description |
|---|---|---|
alert_id * | string | ID of the alert. |
contiguous_id | Pagination token from a prior call. | |
limit | Max results per page (default 25, max 100). |
create_dam_alert_comment
Add an investigation comment to a DAM alert. Comments are append-only; they cannot be edited or deleted.
| Parameter | Type | Description |
|---|---|---|
alert_id * | string | ID of the alert. |
text * | string | Comment text (max 5000 chars). |
list_sc_agents
List ALTR agents (SIS or CLASSIFIER) in your organization.
| Parameter | Type | Description |
|---|---|---|
agent_type | Filter by "SIS" or "CLASSIFIER". | |
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). | |
name_starts_with | Case-insensitive name prefix filter. |
create_sc_agent
Create a new ALTR agent.
| Parameter | Type | Description |
|---|---|---|
agent_type * | string | "SIS" or "CLASSIFIER". |
name * | string | Agent name. |
description | Agent description. | |
public_key_1 | First public key for mTLS. | |
public_key_2 | Second public key for mTLS rotation. |
get_sc_agent
Get details for a specific agent.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
update_sc_agent
Update an existing agent. Only provided fields are changed.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
description | Updated description. | |
name | Updated name. | |
public_key_1 | Updated first public key. | |
public_key_2 | Updated second public key. |
disconnect_sc_agent
Disconnect an agent from ALTR. Agent must have task_count of 0.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
list_sc_agent_tasks
List tasks assigned to an agent.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). |
get_sc_agent_task
Get one task of an agent, with its configuration and schedule.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
task_id * | string | Task UUID. |
create_sc_agent_task
Create a task for an agent. A task runs against a specific repo on a schedule. Configuration depends on the agent type (check with `get_sc_agent` first) and the repo type. **CLASSIFIER agent** configuration, any repo type: - classification_type: 5, the only accepted value. - collection_name: classifier collection name. Required. - condition_types: condition targets to evaluate, e.g. ["ROW_DATA", "METADATA", "COLUMN_LOCATION"]. Others include GDLP, SNOWFLAKE_NATIVE, CONTENT_TYPE, DATA_LENGTH, COLUMN_SIZE and AMAZON_COMPREHEND. - sample_strategy: legacy alternative to condition_types:…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
configuration * | Agent-type-specific config dict or JSON string. See above for required fields. | |
name * | string | Task name (max 64 chars). |
repo_name * | string | Target repository name. |
schedule * | Schedule dict or JSON string. | |
description | Optional task description. | |
service_user | Service user the agent signs in as. SIS: required for Oracle, MSSQL, Snowflake, Databricks and MySQL with 'table_name'; rejected for Postgres and MySQL with 'audit_file_path'. CLASSIFIER: required exc… |
update_sc_agent_task
Update an agent task. Only provided fields change. CLASSIFIER tasks: configuration fields not sent are kept, and the merged result must pass the create rules. scope, exclusions, file_options and metadata_map replace the stored value; send null (or [] for exclusions) to clear one. SIS tasks: 'initial_audit_timestamp' cannot change. Every type takes 'ssl_config'. Oracle also takes 'service_name'; MSSQL 'audit_file_path'; Postgres any of 'audit_file_path', 'audit_file_type', 'log_line_prefix'; MySQL only the field it was created with; Snowflake 'table_name'; Databricks 'table_name' and 'workspa…
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
task_id * | string | Task UUID. |
configuration | Updated config dict or JSON string. | |
description | Updated description. | |
name | Updated task name. | |
schedule | Updated schedule dict or JSON string. |
delete_sc_agent_task
Delete an agent task. Atomically removes the task and decrements the agent's and service user's task counts.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent UUID. |
task_id * | string | Task UUID. |
list_sc_repos
List repos: the data sources sidecars and agents connect to.
| Parameter | Type | Description |
|---|---|---|
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). | |
name_starts_with | Case-insensitive name prefix filter. | |
repo_type | Filter by "Oracle", "MSSQL", "MySQL", "Postgres", "MongoDB", "Cassandra", "Snowflake", "Databricks", "S3" or "FILESYSTEM". |
create_sc_repo
Create a repo: a database, warehouse or file store.
| Parameter | Type | Description |
|---|---|---|
name * | string | Repo name: lowercase letters, digits and underscores, max 32 chars. |
repo_type * | string | "Oracle", "MSSQL", "MySQL", "Postgres", "MongoDB", "Cassandra", "Snowflake", "Databricks", "S3" or "FILESYSTEM". |
audit_properties | Dict, or JSON string. The only key is 'redact_comments': "*" redacts SQL comments from audited query text; "" (the default) keeps them. | |
connection_properties | Dict of strings, or JSON string. Accepted only for these types: S3: 'bucket' and 'region' (required), 'prefix', 'glue_database'. FILESYSTEM: 'root_path' (required). Databricks: 'http_path' of the SQL… | |
description | Repository description (max 100 chars). | |
hostname | Server hostname. Required for every type but S3 and FILESYSTEM, which reject it. Snowflake: "<account>.snowflakecomputing.com"; Databricks: the workspace host. | |
port | Server port. Required and rejected like hostname. Snowflake and Databricks use 443. |
get_sc_repo
Get details for a specific repository.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
update_sc_repo
Update a repo. Only provided fields are changed.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
audit_properties | Merged the same way. 'redact_comments' "*" redacts SQL comments; "" keeps them. | |
connection_properties | Keys to add or change, merged into the repo's stored connection_properties. Same keys as `create_sc_repo`. | |
description | Updated description. |
disconnect_sc_repo
Disconnect a repository from ALTR. Must have no users or bindings.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
list_sc_repo_users
List users configured for a repository.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). |
create_sc_repo_user
Create a repo user with credential reference. Provide exactly one credential source.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Database username. |
aws_secrets_manager | Dict with 'secrets_path' and optional 'iam_role'. S3 and FILESYSTEM repos also accept 'iam_role' alone. | |
azure_key_vault | Dict with 'key_vault_uri' and 'secret_name'. | |
environment_variable | Dict with 'variable_name', the OS environment variable holding the secret. | |
secret_file | Dict with 'path', a file name (no directories) read from /altr/secrets/. |
get_sc_repo_user
Get details for a specific repo user.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Database username. |
update_sc_repo_user
Change a repo user's credential reference. Provide exactly one credential source, shaped as in `create_sc_repo_user`. A new source type clears the old one. An aws_secrets_manager update changes only the keys sent, so a stored 'iam_role' stays unless replaced.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Database username. |
aws_secrets_manager | AWS Secrets Manager config. | |
azure_key_vault | Azure Key Vault config. | |
environment_variable | Environment variable config. | |
secret_file | Secret file config. |
disconnect_sc_repo_user
Disconnect a repo user from ALTR.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Database username to disconnect. |
list_sc_service_users
List service users. Optionally filter by repo.
| Parameter | Type | Description |
|---|---|---|
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). | |
repo_name | If provided, list only service users for this repo. | |
username_starts_with | Filter by username prefix (only works with repo_name). |
create_sc_service_user
Create a service user: the account an agent signs in as. Provide exactly one credential source, shaped as in `create_sc_repo_user`.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
resource * | string | The database the credential connects to: the Oracle service name; the MySQL, MSSQL, Postgres or Snowflake database; the Databricks catalog; the MongoDB database or Cassandra keyspace ("*" for all, cla… |
username * | string | Service user name: lowercase letters, digits and underscores, max 32 chars. |
aws_secrets_manager | AWS Secrets Manager config. | |
azure_key_vault | Azure Key Vault config. | |
environment_variable | Environment variable config. | |
secret_file | Secret file config. |
get_sc_service_user
Get details for a specific service user.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Service user name. |
update_sc_service_user
Update a service user. Only provided fields are changed. Give at most one credential source. A new source type clears the old one. An aws_secrets_manager update changes only the keys sent, so a stored 'iam_role' stays unless replaced.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Service user name. |
aws_secrets_manager | AWS Secrets Manager config. | |
azure_key_vault | Azure Key Vault config. | |
environment_variable | Environment variable config. | |
resource | Updated resource (see `create_sc_service_user`). | |
secret_file | Secret file config. |
disconnect_sc_service_user
Disconnect a service user from ALTR.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
username * | string | Service user name to disconnect. |
list_sc_sidecars
List sidecars in your organization.
| Parameter | Type | Description |
|---|---|---|
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). |
create_sc_sidecar
Create a new sidecar.
| Parameter | Type | Description |
|---|---|---|
hostname * | string | Sidecar hostname (max 500 chars). |
name * | string | Sidecar name (max 64 chars). |
description | Sidecar description (max 400 chars). | |
disable_platform_audits | If true, sidecar won't send activity audits. | |
public_key_1 | First public key for mTLS. | |
public_key_2 | Second public key for mTLS rotation. | |
unsupported_query_bypass | If true, unsupported queries bypass the query parser. |
get_sc_sidecar
Get details for a specific sidecar.
| Parameter | Type | Description |
|---|---|---|
sidecar_id * | string | Sidecar UUID. |
update_sc_sidecar
Update a sidecar. Only provided fields are changed.
| Parameter | Type | Description |
|---|---|---|
sidecar_id * | string | Sidecar UUID. |
description | Updated description. | |
disable_platform_audits | Updated audit setting. | |
hostname | Updated hostname. | |
name | Updated name. | |
public_key_1 | Updated first public key. | |
public_key_2 | Updated second public key. | |
unsupported_query_bypass | Updated bypass setting. |
disconnect_sc_sidecar
Disconnect a sidecar from ALTR. Must have no listeners.
| Parameter | Type | Description |
|---|---|---|
sidecar_id * | string | Sidecar UUID. |
list_sc_sidecar_listeners
List listener ports registered on a sidecar.
| Parameter | Type | Description |
|---|---|---|
sidecar_id * | string | Sidecar UUID. |
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). |
register_sc_sidecar_listener
Register a listener port on a sidecar.
| Parameter | Type | Description |
|---|---|---|
advertised_version * | string | Database version string the sidecar advertises to clients (max 128 chars). |
database_type * | string | "Oracle", "MSSQL", "MySQL", "Postgres", "MongoDB" or "Cassandra". |
port * | integer | Port number to listen on. |
sidecar_id * | string | Sidecar UUID. |
deregister_sc_sidecar_listener
Remove a listener port from a sidecar.
| Parameter | Type | Description |
|---|---|---|
port * | integer | Port number to deregister. |
sidecar_id * | string | Sidecar UUID. |
list_sc_sidecar_bindings
List repo bindings for a sidecar.
| Parameter | Type | Description |
|---|---|---|
sidecar_id * | string | Sidecar UUID. |
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). | |
ports | Comma-separated port filter. | |
repo_names | Comma-separated repo name filter. |
list_sc_repo_bindings
List sidecar bindings for a repository.
| Parameter | Type | Description |
|---|---|---|
repo_name * | string | Repository name. |
contiguous_id | Pagination token. | |
limit | Max items (default 50, max 100). | |
ports | Comma-separated port filter. | |
sidecar_ids | Comma-separated sidecar ID filter. |
get_sc_sidecar_binding
Get a specific sidecar-repo binding.
| Parameter | Type | Description |
|---|---|---|
port * | integer | Listener port number. |
repo_name * | string | Repository name. |
sidecar_id * | string | Sidecar UUID. |
create_sc_sidecar_binding
Bind a repository to a sidecar listener port.
| Parameter | Type | Description |
|---|---|---|
port * | integer | Listener port number. |
repo_name * | string | Repository name to bind. |
sidecar_id * | string | Sidecar UUID. |
disconnect_sc_sidecar_binding
Remove a repo binding from a sidecar listener port.
| Parameter | Type | Description |
|---|---|---|
port * | integer | Listener port number. |
repo_name * | string | Repository name to unbind. |
sidecar_id * | string | Sidecar UUID. |
vault_tokenize
Tokenize plaintext values using ALTR vaulted tokenization. Replaces plaintext strings with vault tokens. Non-deterministic tokens use the prefix `vaultn_`; deterministic tokens use `vaultd_`. Tokens are stored in the ALTR vault and can be detokenized later. Rate-limited to 492 requests/month and 50 requests/second. Maximum 4096 values per call. Each value must be under 1024 characters.
| Parameter | Type | Description |
|---|---|---|
values * | object | Dict mapping user-defined keys to plaintext strings to tokenize (e.g. {"ssn": "123-45-6789", "email": "user@example.com"}). |
deterministic | boolean | If True, the same plaintext always produces the same token. Default False (random token each time). |
vault_detokenize
Detokenize vault tokens to recover plaintext values. Fails if any value in `tokens` is not a valid vault token (prefix `vaultd_` or `vaultn_`). For mixed inputs (tokens and non-tokens), use `vault_partial_detokenize` instead. Rate-limited to 492 requests/month and 50 requests/second. Maximum 4096 values per call. Tokens are case-sensitive.
| Parameter | Type | Description |
|---|---|---|
tokens * | object | Dict mapping user-defined keys to vault tokens (e.g. {"ssn": "vaultn_abc123...", "email": "vaultn_xyz456..."}). |
vault_partial_detokenize
Detokenize vault tokens, passing non-token values through unchanged. Unlike `vault_detokenize`, this does not fail when non-token values are present. Valid tokens are detokenized; all other values are returned as-is. Rate-limited to 492 requests/month and 50 requests/second. Maximum 4096 values per call.
| Parameter | Type | Description |
|---|---|---|
values * | object | Dict mapping user-defined keys to vault tokens or plaintext strings. Non-token values are passed through (e.g. {"ssn": "vaultn_abc123...", "name": "already-plaintext"}). |
vault_delete_tokens
Permanently delete vault tokens from the ALTR vault. Deleted tokens cannot be detokenized. If a deleted deterministic token is re-tokenized with the same plaintext, a new token is generated. Rate-limited to 492 requests/month and 50 requests/second. Maximum 4096 values per call.
| Parameter | Type | Description |
|---|---|---|
tokens * | object | Dict mapping user-defined keys to vault tokens to delete (e.g. {"ssn": "vaultn_abc123...", "email": "vaultn_xyz456..."}). |
critical_tokenize
Tokenize plaintext values using ALTR critical tokenization. Replaces plaintext strings with critical tokens (format: `token_XXXX...`, 64+ chars). Tokens can be detokenized later. Deterministic tokenization produces the same token for the same input value. Maximum 1024 values per call. Each value must be under 128 UTF-8 code units.
| Parameter | Type | Description |
|---|---|---|
values * | object | Dict mapping user-defined keys to plaintext strings to tokenize (e.g. {"ssn": "123-45-6789", "email": "user@example.com"}). |
deterministic | boolean | If True, the same plaintext always produces the same token. Default False (random token each time). |
critical_detokenize
Detokenize critical tokens to recover plaintext values. Fails if any value in `tokens` is not a valid critical token (format: `token_XXXX...`, 64+ chars). For mixed inputs (tokens and non-tokens), use `critical_partial_detokenize` instead. Maximum 1024 values per call. Tokens are case-sensitive.
| Parameter | Type | Description |
|---|---|---|
tokens * | object | Dict mapping user-defined keys to critical tokens (e.g. {"ssn": "token_abc123...", "email": "token_xyz456..."}). |
critical_partial_detokenize
Detokenize critical tokens, passing non-token values through unchanged. Unlike `critical_detokenize`, this does not fail when non-token values are present. Valid tokens are detokenized; all other values are returned as-is. Maximum 1024 values per call.
| Parameter | Type | Description |
|---|---|---|
values * | object | Dict mapping user-defined keys to critical tokens or plaintext strings. Non-token values are passed through (e.g. {"ssn": "token_abc123...", "name": "already-plaintext"}). |
critical_delete_tokens
Delete critical tokens, removing them from the token store. Invalid tokens are silently ignored (no failure). If a deleted deterministic token is re-tokenized with the same plaintext, a new token is generated. Maximum 1024 values per call.
| Parameter | Type | Description |
|---|---|---|
tokens * | object | Dict mapping user-defined keys to critical tokens to delete (e.g. {"ssn": "token_abc123...", "email": "token_xyz456..."}). |
list_tweaks
List FPE tweaks for the organization. Tweaks are named random values used in format-preserving encryption. Results are paginated; use `contiguous_id` from the response to fetch subsequent pages.
| Parameter | Type | Description |
|---|---|---|
contain | Filter tweaks whose name contains this substring. | |
contiguous_id | Pagination cursor returned by a prior call. | |
limit | Max number of tweaks to return. | |
status | Filter by status — "active", "deactivated", or "any" (default "any"). |
get_tweak
Get a single FPE tweak by name. Returns the current (latest) version of the tweak. Pass `sequence` to retrieve a specific historical version instead.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the tweak. |
sequence | Version sequence identifier. Omit to get the latest. |
create_tweak
Create a new FPE tweak. Generates a new named random value for use in format-preserving encryption. The tweak name must not have leading or trailing spaces.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name for the new tweak (1–256 characters, no leading or trailing spaces). |
deactivate_tweak
Deactivate a specific version of an FPE tweak. Deactivated tweaks cannot be used for new FPE operations. Use `get_tweak` to discover the sequence identifier of a tweak version.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the tweak. |
sequence * | string | Version sequence identifier to deactivate. |
list_keys
List FPE keys within a namespace. Results are paginated; use `contiguous_id` from the response to fetch subsequent pages. The `fpe` namespace is most common for format-preserving encryption keys.
| Parameter | Type | Description |
|---|---|---|
namespace * | string | Namespace to list keys from (e.g. "fpe"). |
contain | Filter keys whose name contains this substring. | |
contiguous_id | Pagination cursor returned by a prior call. | |
limit | Max number of keys to return. | |
status | Filter by status — "active", "deactivated", or "any" (default "any"). |
get_key
Get a single FPE key by namespace and name. Returns the current (latest) version of the key. Pass `sequence` to retrieve a specific historical version.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the key. |
namespace * | string | Namespace where the key resides (e.g. "fpe"). |
sequence | Version sequence identifier. Omit to get the latest. |
create_key
Create a new FPE encryption key. Generates a new named key in the specified namespace. Keys are used for format-preserving encryption operations. The name and namespace must not have leading or trailing spaces.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name for the new key (1–256 characters, no leading or trailing spaces). |
namespace * | string | Namespace for the key (e.g. "fpe"). Must not have leading or trailing spaces. |
deactivate_key
Deactivate a specific version of an FPE key. Deactivated keys cannot be used for new encryption operations. Use `get_key` to discover the sequence identifier for a key version.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the key. |
namespace * | string | Namespace where the key resides. |
sequence * | string | Version sequence identifier to deactivate. |
rotate_key
Rotate the envelope key for a specific FPE key version. Envelope rotation re-wraps the data key under a new envelope key without changing the underlying encryption material. Use this for key rotation compliance requirements.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the key. |
namespace * | string | Namespace where the key resides. |
sequence * | string | Version sequence identifier of the key to rotate. |