> ## Documentation Index
> Fetch the complete documentation index at: https://help.statisfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an integration's config

> A SQL warehouse's settings: the week start for product usage, the table allowlist (allowed_schemas, allowed_tables) and the defaults unqualified names resolve against. Its queries are /queries. `version` is 0 when it was never saved.



## OpenAPI

````yaml /api/statisfy-api.openapi.json get /v1/integrations/{key}/config
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/{key}/config:
    get:
      tags:
        - integrations
      summary: Get an integration's config
      description: >-
        A SQL warehouse's settings: the week start for product usage, the table
        allowlist (allowed_schemas, allowed_tables) and the defaults unqualified
        names resolve against. Its queries are /queries. `version` is 0 when it
        was never saved.
      operationId: integrations_get_config
      parameters:
        - description: The integration key, such as snowflake or salesforce
          in: path
          name: key
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationConfig'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    IntegrationConfig:
      description: >-
        A SQL warehouse's settings. Its queries are their own resource
        (`/queries`).
      properties:
        allowed_schemas:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            The table allowlist's schemas: queries and browsing stay inside
            them. Null = no limit
          title: Allowed Schemas
        allowed_tables:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            The table allowlist's tables, as table or schema.table. Null = every
            table in the allowed schemas
          title: Allowed Tables
        default_catalog:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Databricks: the catalog unqualified names resolve in'
          title: Default Catalog
        default_database:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Snowflake: the database unqualified names resolve in'
          title: Default Database
        default_project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 'BigQuery: the project queries run in'
          title: Default Project Id
        default_schema:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Snowflake, Databricks: the schema unqualified names resolve in'
          title: Default Schema
        default_warehouse:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Snowflake: the warehouse queries run on'
          title: Default Warehouse
        max_bytes_billed:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            BigQuery: the most bytes one /sql or /preview query may bill; null
            means 10 GB
          title: Max Bytes Billed
        post_processing:
          description: >-
            Derived metrics computed after product usage queries. Read-only
            here: set up by Statisfy
          items:
            $ref: '#/components/schemas/PostProcessingConfig'
          title: Post Processing
          type: array
        version:
          description: >-
            The config's version: send it as `expected_version` with a change (0
            = never saved)
          title: Version
          type: integer
        week_start_day:
          description: 'The day product usage weeks start on: 0 = Monday … 6 = Sunday'
          title: Week Start Day
          type: integer
      required:
        - version
        - week_start_day
        - allowed_schemas
        - allowed_tables
        - default_project_id
        - max_bytes_billed
        - default_warehouse
        - default_database
        - default_schema
        - default_catalog
        - post_processing
      title: IntegrationConfig
      type: object
    PostProcessingConfig:
      description: >-
        Post-processing computation that runs after product_usage queries
        complete.


        Hydrated against a closed registry in
        `warehouse.post_processing_registry`.

        The function name must be a known key in `POST_PROCESSING_FUNCTIONS`;
        the

        callable receives `(tenant_id, customer_id, start_date, period)` and is

        expected to write derived metrics back into product_usage_store.


        Why a registry instead of an importable Python path: JSON configs cross
        the

        network and are user-editable in the wizard. A closed registry keeps the

        apply path from invoking arbitrary Python.


        Why no `@field_validator` on `function`: Pydantic v2 fires field
        validators

        on every `model_validate`, so any process that calls
        `get_warehouse_config`

        would transitively import `post_processing_registry` →

        `vidyard_post_processing_methods` → `gateway.index` just to read a
        config.

        That's expensive and couples schema-loading to heavy modules.

        Garbage-in is handled at the only two boundaries that matter: the
        migration

        script's apply path (which constructs configs explicitly) and

        `WarehouseProcessor._run_post_processing` (which logs + skips unknown

        function names rather than crashing).
      properties:
        custom_field_key:
          description: Identifier shown in logs; the metric the function writes
          title: Custom Field Key
          type: string
        function:
          description: >-
            Registry key in
            warehouse.post_processing_registry.POST_PROCESSING_FUNCTIONS
          title: Function
          type: string
        period:
          default: MONTHLY
          description: >-
            Period passed to the function; controls the start_date alignment.
            Functions in the legacy redshift config all use MONTHLY.
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
          title: Period
          type: string
      required:
        - function
        - custom_field_key
      title: PostProcessingConfig
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.