ALTR Classification Jobs API

The Classification Jobs API from ALTR — 21 operation(s) for classification jobs.

Documentation

📖
Documentation
https://altrnet.live.altr.com/api/swagger/
📖
APIReference
https://altrnet.live.altr.com/api/swagger/
📖
Authentication
https://raw.githubusercontent.com/api-evangelist/altr/refs/heads/main/authentication/altr-authentication.yml
📖
Documentation
https://api.live.altr.com/v1/unified-policy/docs
📖
APIReference
https://api.live.altr.com/v1/unified-policy/docs
📖
Documentation
https://api.live.altr.com/v1/rbac/api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/rbac/api-docs/index.html
📖
Documentation
https://docs.classification.live.altr.com/v1/docs
📖
APIReference
https://docs.classification.live.altr.com/v1/docs
📖
Documentation
https://api.live.altr.com/v1/tag/auto-tagging-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/tag/auto-tagging-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/tag/masking-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/tag/masking-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/tag/refresh-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/tag/refresh-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/alpha/dbx/tag-policy/docs/index.html
📖
APIReference
https://api.live.altr.com/v1/alpha/dbx/tag-policy/docs/index.html
📖
Documentation
https://api.live.altr.com/v1/dis/swagger/
📖
APIReference
https://api.live.altr.com/v1/dis/swagger/
📖
Documentation
https://api.live.altr.com/v1/snowflake/metadata-api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/snowflake/metadata-api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/query-audits/api-docs/index.html
📖
APIReference
https://api.live.altr.com/v1/query-audits/api-docs/index.html
📖
Documentation
https://api.live.altr.com/v1/dam/docs
📖
APIReference
https://api.live.altr.com/v1/dam/docs
📖
Documentation
https://docs.dam-alerting.live.altr.com/v1/dam-alerting/docs
📖
APIReference
https://docs.dam-alerting.live.altr.com/v1/dam-alerting/docs
📖
Documentation
https://docs.audit-report.live.altr.com/v1/audit-reports/docs
📖
APIReference
https://docs.audit-report.live.altr.com/v1/audit-reports/docs
📖
Documentation
https://docs.notifications.live.altr.com/v1/notification-integration/docs
📖
APIReference
https://docs.notifications.live.altr.com/v1/notification-integration/docs
📖
Documentation
https://docs.critical.live.altr.com/v2
📖
APIReference
https://docs.critical.live.altr.com/v2
📖
Documentation
https://docs.sc-control.live.altr.com/v1/repo-config-docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/repo-config-docs
📖
Documentation
https://docs.sc-control.live.altr.com/v1/audits/docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/audits/docs
📖
Documentation
https://docs.sc-control.live.altr.com/v1/sidecars/telemetry/docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/sidecars/telemetry/docs
📖
Documentation
https://docs.sc-control.live.altr.com/v1/access-tokens/docs
📖
APIReference
https://docs.sc-control.live.altr.com/v1/access-tokens/docs
📖
Documentation
https://docs.service-user.live.altr.com/v1/docs
📖
APIReference
https://docs.service-user.live.altr.com/v1/docs

Specifications

OpenAPI Specification

altr-classification-jobs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@altr.com
    name: API Support
  description: This API manages classifiers, collections, and classification reports for ALTR's classification engine.
  termsOfService: https://altr.com/info/altr-solutions-inc-terms-of-service/
  title: ALTR Classification Engine Classification Jobs API
  version: 1.1.0
servers:
- url: https://{orgID}.classification.live.altr.com/v1
  variables:
    orgID:
      default: ''
security:
- basic: []
tags:
- name: Classification Jobs
paths:
  /jobs:
    get:
      description: Retrieves a paginated list of classification jobs with optional filtering by status, type, or database.
      parameters:
      - description: 'Maximum number of jobs to return (default: 50, max: 50)'
        example: 50
        in: query
        name: limit
        schema:
          type: integer
      - description: Pagination token from previous response
        example: eyJQSyI6eyJTIjoiT1JHSUQjMTIzNDU2Nzg5MCJ9fQ
        in: query
        name: contiguous_id
        schema:
          type: string
      - description: Filter by job status
        example: RUNNING
        in: query
        name: status
        schema:
          enum:
          - RUNNING
          - PAUSED
          - COMPLETED
          - CANCELLED
          - FAILED
          type: string
      - description: Filter by job type
        example: FULL
        in: query
        name: job_type
        schema:
          enum:
          - FULL
          - INCREMENTAL
          type: string
      - description: Filter by database ID (numeric)
        example: 1
        in: query
        name: database_id
        schema:
          type: integer
      - description: Filter by agent ID (UUID v4). Only matches OLTP jobs.
        example: 123e4567-e89b-12d3-a456-426614174000
        in: query
        name: agent_id
        schema:
          type: string
      - description: Filter by classification type
        example: 5
        in: query
        name: classification_type
        schema:
          enum:
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
          type: integer
      - description: 'Sort order by start time (asc or desc, default: desc)'
        example: desc
        in: query
        name: order
        schema:
          enum:
          - asc
          - desc
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitlab_ch5_altr_com_altrdb_altr-classification-engine_lambda_api_jobs.ListJobsResponse'
          description: List of jobs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid query parameters
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: List classification jobs
      tags:
      - Classification Jobs
    patch:
      description: Updates the status of an existing classification job. Use to pause, resume, or cancel jobs.
      parameters:
      - description: 'Job ID (Only supports OLTP agent-managed jobs: ALTRNative type 5, GDLPByok type 6)'
        example: 123e4567-e89b-12d3-a456-426614174000
        in: path
        name: job_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jobs.UpdateJobStatusInput'
        description: 'Job update details. Example: {\'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.JobItem'
          description: Job status updated successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid request body
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Job not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: Update classification job status
      tags:
      - Classification Jobs
    post:
      deprecated: true
      description: 'Deprecated: Use POST /jobs/snowflake or POST /jobs/oltp instead. Creates a new classification job. If agent_id is present, creates an OLTP job; otherwise creates a Snowflake job.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jobs.CreateJobInput'
        description: Job details
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.JobItem'
          description: Job created successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid request body
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Database or collection not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: Create classification job (deprecated)
      tags:
      - Classification Jobs
  /jobs/active:
    get:
      description: Retrieves a paginated list of active (non-terminal) classification jobs. Uses a sparse index for efficient queries — only jobs with non-terminal statuses (CREATED, RESUMED, PAUSED, RUNNING, PENDING_CANCEL, UPLOADING_REPORT, PROCESSING_REPORT, PROCESSING_FINDINGS, AWAITING_REVIEW) are included.
      parameters:
      - description: 'Maximum number of jobs to return (default: 50, max: 50)'
        example: 50
        in: query
        name: limit
        schema:
          type: integer
      - description: Pagination token from previous response
        example: eyJQSyI6eyJTIjoiT1JHSUQjMTIzNDU2Nzg5MCJ9fQ
        in: query
        name: contiguous_id
        schema:
          type: string
      - description: Filter by active job status
        example: RUNNING
        in: query
        name: status
        schema:
          enum:
          - CREATED
          - RESUMED
          - PAUSED
          - RUNNING
          - PENDING_CANCEL
          - UPLOADING_REPORT
          - PROCESSING_REPORT
          - PROCESSING_FINDINGS
          - AWAITING_REVIEW
          type: string
      - description: Filter by job type
        example: FULL
        in: query
        name: job_type
        schema:
          enum:
          - FULL
          - INCREMENTAL
          type: string
      - description: Filter by database ID (numeric)
        example: 1
        in: query
        name: database_id
        schema:
          type: integer
      - description: Filter by agent ID (UUID v4). Only matches OLTP jobs.
        example: 123e4567-e89b-12d3-a456-426614174000
        in: query
        name: agent_id
        schema:
          type: string
      - description: Filter by classification type
        example: 5
        in: query
        name: classification_type
        schema:
          enum:
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
          type: integer
      - description: 'Sort order (asc or desc, default: desc)'
        example: desc
        in: query
        name: order
        schema:
          enum:
          - asc
          - desc
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitlab_ch5_altr_com_altrdb_altr-classification-engine_lambda_api_jobs.ListJobsResponse'
          description: List of active jobs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid query parameters
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: List active classification jobs
      tags:
      - Classification Jobs
  /jobs/databricks:
    post:
      description: 'Creates a new Databricks classification job using Google DLP. Scans all accessible catalogs and tables in the connected Databricks workspace.


        **GDLP collection:** Optionally specify `collection_name` to restrict classification to the infoTypes defined in that collection. When omitted, all default Google DLP infoTypes are used.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jobs.CreateDatabricksJobInput'
            examples:
              Databricks — all infoTypes:
                summary: Scan all catalogs and tables using all default Google DLP infoTypes
                value:
                  database_id: 57
              Databricks — scoped collection:
                summary: Restrict inspection to specific infoTypes via a GDLP collection
                value:
                  database_id: 57
                  collection_name: financial_pci
              Databricks + DATA_LENGTH — evaluate value-length conditions:
                summary: Databricks GDLP scan with DATA_LENGTH in condition_types. The classifier Lambda measures per-column byte-length histograms from its sample; DATA_LENGTH leaves evaluate against them with the per-leaf comparator, length, trim, and minimum_threshold.
                value:
                  database_id: 845
                  collection_name: pii-baseline
                  condition_types:
                  - GDLP
                  - METADATA
                  - COLUMN_LOCATION
                  - DATA_LENGTH
              Databricks + COLUMN_SIZE — evaluate declared column-size conditions:
                summary: Databricks GDLP scan with COLUMN_SIZE in condition_types. The classifier Lambda reads each column's declared type and size from the table schema (e.g. varchar(255) -> 255; unbounded STRING auto-resolves evaluated=false); COLUMN_SIZE leaves evaluate against the declared size with the per-leaf comparator.
                value:
                  database_id: 845
                  collection_name: pii-baseline
                  condition_types:
                  - GDLP
                  - METADATA
                  - COLUMN_LOCATION
                  - COLUMN_SIZE
              Databricks + CONTENT_TYPE — evaluate content-format conditions:
                summary: Databricks GDLP scan with CONTENT_TYPE in condition_types. The classifier Lambda emits a per-column content-format aggregate (single detection pass per column); the report generator distributes it to every CONTENT_TYPE leaf in compound rulesets.
                value:
                  database_id: 57
                  collection_name: structured_payload_classifiers
                  condition_types:
                  - GDLP
                  - METADATA
                  - COLUMN_LOCATION
                  - CONTENT_TYPE
              Databricks + AMAZON_COMPREHEND — ML PII detection:
                summary: Databricks GDLP scan with AMAZON_COMPREHEND in condition_types. The classifier Lambda runs AWS Comprehend PII detection over each column's sample (using the Lambda's IAM role — no BYOK) alongside Google DLP, and evaluates every AMAZON_COMPREHEND leaf. AMAZON_COMPREHEND leaves carry entity_type + minimum_score (spec) and actual_score + finding_count (evidence) on the decision_lineage.
                value:
                  database_id: 845
                  collection_name: pii-baseline
                  condition_types:
                  - GDLP
                  - METADATA
                  - COLUMN_LOCATION
                  - AMAZON_COMPREHEND
        description: Databricks job details
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.JobItem'
          description: Job created successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid request body
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: GDLP collection not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Job already exists
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: Create Databricks GDLP classification job
      tags:
      - Classification Jobs
  /jobs/groups:
    get:
      description: 'Retrieves classification runs grouped by (collection × classification method × datasource) — the report-list view, ordered by each group''s most recent run. Optional status and connection_type filters run server-side; keep them stable across pages, as contiguous_id is a native index cursor. Pagination: page until contiguous_id is absent, NOT until the first empty page — with a selective filter a 200 can return groups: [] together with a non-empty contiguous_id (there may be matches deeper in the index).'
      parameters:
      - description: 'Maximum number of groups to return (default: 50, max: 50)'
        example: 50
        in: query
        name: limit
        schema:
          type: integer
      - description: Pagination token from previous response
        in: query
        name: contiguous_id
        schema:
          type: string
      - description: Filter by report status (group's latest run); repeat the param to OR across multiple (e.g. status=confirmed&status=needs_review)
        in: query
        name: status
        schema:
          items:
            enum:
            - needs_review
            - in_progress
            - confirmed
            type: string
          type: array
        style: form
      - description: Filter by connection type; repeat the param to OR across multiple (e.g. connection_type=databricks&connection_type=mysql)
        in: query
        name: connection_type
        schema:
          items:
            type: string
          type: array
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/jobs.ListJobGroupsResponse'
          description: List of report groups
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid query parameters
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: List report groups
      tags:
      - Classification Jobs
  /jobs/groups/{group_id}/runs:
    get:
      description: Returns one page of a report group's classification runs, newest-first. The group is identified by the opaque group_id from GET /jobs/groups. Paginated with a native cursor.
      parameters:
      - description: Opaque report-group id from GET /jobs/groups
        in: path
        name: group_id
        required: true
        schema:
          type: string
      - description: 'Maximum runs to return (default: 50, max: 50)'
        example: 50
        in: query
        name: limit
        schema:
          type: integer
      - description: Pagination token from previous response
        in: query
        name: contiguous_id
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/jobs.ListGroupRunsResponse'
          description: Page of runs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid group_id, limit, or token
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: List a report group's runs
      tags:
      - Classification Jobs
  /jobs/oltp:
    post:
      description: Creates a new agent-based (OLTP) classification job. Requires an agent_id identifying the classification agent, repository connection details, and service user credentials.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jobs.CreateOLTPJobInput'
            examples:
              ALTR Native — row sampling:
                summary: Regex classification with 1000 sampled rows per column
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  sample_strategy: ROWS
                  sample_size: 1000
                  sample_type: ROWS
                  classification_type: 5
                  collection_name: pii_classifiers
              ALTR Native — metadata only:
                summary: Classify columns by name only — no database connection needed for sampling
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  sample_strategy: METADATA
                  classification_type: 5
                  collection_name: pii_classifiers
              ALTR Native — partial condition_types (METADATA + COLUMN_LOCATION only):
                summary: Evaluate only METADATA and COLUMN_LOCATION conditions; ROW_DATA conditions are auto-resolved to false (no row sampling performed)
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  classification_type: 5
                  collection_name: pii_classifiers
                  condition_types:
                  - METADATA
                  - COLUMN_LOCATION
              ALTR Native + DATA_LENGTH — evaluate value-length conditions on sampled rows:
                summary: Include DATA_LENGTH in condition_types so the agent measures each sampled value's byte length and evaluates every DATA_LENGTH leaf (greater_than / less_than / equals etc.). Requires ROW_DATA sampling.
                value:
                  agent_id: 9b2f1c44-7a6e-4f7e-9d2b-1d2f3a4b5c6d
                  classification_type: 5
                  collection_name: pii-baseline
                  repo_name: orders-mysql
                  sample_strategy: COMBINED
                  service_name: orders
                  service_user_name: altr_svc
                  sample_size: 100
                  sample_type: ROWS
                  condition_types:
                  - ROW_DATA
                  - METADATA
                  - COLUMN_LOCATION
                  - DATA_LENGTH
              ALTR Native + COLUMN_SIZE — evaluate declared column-size conditions:
                summary: 'Include COLUMN_SIZE in condition_types so the agent evaluates every COLUMN_SIZE leaf against each column''s declared catalog size (e.g. VARCHAR(255) -> 255). COLUMN_SIZE is metadata-level: it does not require row sampling and is evaluable under METADATA sampling.'
                value:
                  agent_id: 9b2f1c44-7a6e-4f7e-9d2b-1d2f3a4b5c6d
                  classification_type: 5
                  collection_name: pii-baseline
                  repo_name: orders-mysql
                  sample_strategy: METADATA
                  service_name: orders
                  service_user_name: altr_svc
                  condition_types:
                  - METADATA
                  - COLUMN_LOCATION
                  - COLUMN_SIZE
              ALTR Native + CONTENT_TYPE — evaluate content-format conditions on sampled rows:
                summary: Include CONTENT_TYPE in condition_types so the agent runs content-format detection once per column and evaluates every CONTENT_TYPE leaf against the dominant detected format. Requires ROW_DATA sampling.
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  sample_strategy: ROWS
                  sample_size: 1000
                  sample_type: ROWS
                  classification_type: 5
                  collection_name: structured_payload_classifiers
                  condition_types:
                  - ROW_DATA
                  - METADATA
                  - COLUMN_LOCATION
                  - CONTENT_TYPE
              GDLP BYOK — all infoTypes:
                summary: Google DLP classification using customer GCP credentials
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  sample_strategy: ROWS
                  sample_size: 100
                  sample_type: ROWS
                  classification_type: 6
              GDLP BYOK — scoped collection:
                summary: Google DLP with a GDLP collection to limit inspected infoTypes
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_oracle
                  service_user_name: altr_classification_svc
                  sample_strategy: ROWS
                  sample_size: 200
                  sample_type: ROWS
                  classification_type: 6
                  collection_name: healthcare_phi
                  service_name: ORCL
              GDLP BYOK — GDLP + METADATA condition_types:
                summary: 'Google DLP with explicit condition_types: evaluates GDLP and METADATA conditions; COLUMN_LOCATION and ROW_DATA are auto-resolved to false'
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  sample_size: 100
                  sample_type: ROWS
                  classification_type: 6
                  collection_name: healthcare_phi
                  condition_types:
                  - GDLP
                  - METADATA
              ALTR Native + AMAZON_COMPREHEND — ML PII detection on sampled rows:
                summary: Include AMAZON_COMPREHEND in condition_types so the agent runs AWS Comprehend PII detection (a cheap ContainsPiiEntities screen, then DetectPiiEntities only on columns that screen positive) over each column's sampled values and evaluates every AMAZON_COMPREHEND leaf. Requires ROW_DATA sampling. Comprehend credentials come from COMPREHEND_AWS_ACCESS_KEY_ID/SECRET (BYOK override), COMPREHEND_ROLE_ARN (cross-account assume-role, auto-refreshed), or the agent's default AWS chain; Comprehend cost bills to the supplying account.
                value:
                  agent_id: c5750de6-170d-46d3-a9bc-b5f7ba032ad0
                  repo_name: production_postgres
                  service_user_name: altr_classification_svc
                  sample_strategy: ROWS
                  sample_size: 100
                  sample_type: ROWS
                  classification_type: 5
                  collection_name: pii_classifiers
                  condition_types:
                  - ROW_DATA
                  - METADATA
                  - COLUMN_LOCATION
                  - AMAZON_COMPREHEND
        description: OLTP job details
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.JobItem'
          description: Job created successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Invalid request body, validation error, or GDLP collection not found/deleted
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Collection, repo, or service user not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Job already exists
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fiber.APIError'
          description: Internal server error
      security:
      - basic: []
      summary: Create OLTP classification job
      tags:
      - Classification Jobs
  /jobs/snowflake:
    post:
      description: 'Creates a new Snowflake-based classification job.


        **Classification type:** Controls which classification engine runs the job.

        - `altr_native` (default when omitted): ALTR''s built-in regex classification via Snowflake UDFs. Requires `collection_name` and `job_type`.

        - `gdlp`: Google DLP-powered classification hosted by ALTR. Does not require `job_type` (defaults to FULL). Optionally accepts `collection_name` to scope which infoTypes are inspected.


        **Sample strategies:** ROWS (sample a fixed number of rows per column), METADATA (column names only — ALTR Native only), COMBINED (both row data and metadata).


        **Sampling configuration:** Optionally specify `sample_size` and `sample_type` to control how many rows are sampled per column. Defaults to 100 ROWS when not provided. When `sample_strategy` is METADATA, sampling fields are not used.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/jobs.CreateSnowflakeJobInput'
            examples:
              ALTR Native — row sampling:
                summary: Regex classification with 500 sampled rows per column
                value:
                  database_id: 42
                  collection_name: pii_classifiers
                  sample_size: 500
                  sample_type: ROWS
              ALTR Native — metadata only:
                summary: Classify columns by name only — no row data sampled
                value:
                  database_id: 42
                  collection_name: pii_classifiers
                  sample_strategy: METADATA
              GDLP — all infoTypes:
                summary: Google DLP scan using all ~150 built-in infoTypes
                value:
                  database_id: 42
                  classification_type: gdlp
              GDLP — scoped to collection:
                summary: Google DLP scan restricted to specific infoTypes (e.g. healthcare PHI)
                value:
                  database_id: 42
                  classification_type: gdlp
                  collection_name: healthcare_phi
              GDLP — with sampling:
                summary: Google DLP scan with explicit row sampling configuration
                value:
                  database_id: 42
                  classification_type: gdlp
                  collection_name: financial_pci
                  sample_size: 200
                  sample_type: ROWS
              GDLP — explicit condition_types (GDLP + METADATA):
                summary: GDLP scan evaluating only GDLP and METADATA conditions; COLUMN_LOCATION is auto-resolved to false
                value:
                  database_id: 42
                  classification_type: gdlp
                  collection_name: financial_pci
                  condition_types:
                  - GDLP
                  - METADATA
              ALTR Native — SNOWFLAKE_NATIVE condition_types:
                summary: ALTR Native scan that additionally evaluates SNOWFLAKE_NATIVE conditions against Snowflake's SEMANTIC_CATEGORY / PRIVACY_CATEGORY tags
                value:
                  database_id: 42
                  collection_name: pii_classifiers
                  sample_strategy: COMBINED
                  sample_size: 500
                  sample_type: ROWS
                  condition_types:
                  - ROW_DATA
                  - METADATA
                  - COLUMN_LOCATION
                  - SNOWFLAKE_NATIVE
              GDLP — cross-target with SNOWFLAKE_NATIVE (extreme coverage):
                summary: Google DLP scan whose collection contains hybrid GDLP + SNOWFLAKE_NATIVE compound classifiers. The worker fetches SEMANTIC_CATEGORY / PRIVACY_CATEGORY tags from INFORMATION_SCHEMA.TAG_REFERENCES_ALL_COLUMNS alongside its DLP findings so both targets evaluate against real data in the same job — GDLP leaf carries actual_likelihood + finding_count, SNOWFLAKE_NATIVE leaf carries actual_semantic_category + actual_privacy_category.
                value:
                  database_id: 42
                  classification_type: gdlp
                  collection_name: hybrid_gdlp_sfnative
                  condition_types:
                  - GDLP
                  - METADATA
                  - SNOWFLAKE_NATIVE
              GDLP — all five condition targets in compound rulesets:
                summary: Google DLP scan against a collection whose compounds combine GDLP + SNOWFLAKE_NATIVE + METADATA + COLUMN_LOCATION. ROW_DATA conditions auto-resolve on the SF GDLP path (no row sampling); GDLP + SF_NATIVE evaluate against Cloud DLP findings + Snowflake tag pre-pass respectively.
                value:
                  database_id: 42
                  classification_type: gdlp
                  collection_name: all_targets_hybrid
                  condition_types:
                  - GDLP
                  - SNOWFLAKE_NATIVE
                  - METADATA
                  - COLUMN_LOCATION
              GDLP + DATA_LENGTH — evaluate value-length conditions:
                summary: Snowflake GDLP scan with DATA_LENGTH in condition_types. The GDLP worker measures per-column byte-length histograms once from TABLESAMPLE rows; the report generator evaluates every DATA_LENGTH leaf (greater_than / less_than / equals etc.) against them.
                value:
                  database_id: 1342
                  classification_type: gdlp
                  collection_name: pii-baseline
                  job_type: FULL
                  condition_types:
                  - GDLP
                  - METADATA
                  - COLUMN_LOCATION
                  - DATA_LENGTH
              GDLP + COLUMN_SIZE — evaluate declared column-size conditions:
                summary: Snowflake GDLP scan with COLUMN_SIZE in condition_types. The GDLP worker captures each column's declared type and size from the TABLESAMPLE result-set metadata; the report generator evaluates every COLUMN_SIZE leaf (greater_than / less_than / eq

# --- truncated at 32 KB (131 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/altr/refs/heads/main/openapi/altr-classification-jobs-api-openapi.yml