{
  "openapi": "3.0.3",
  "info": {
    "title": "Data Warehouse API",
    "version": "1.0.0",
    "description": "The Versus data warehouse \u2014 exports, inventory import, reverse-ETL, and shares."
  },
  "servers": [
    {
      "url": "https://versus-demo.com"
    }
  ],
  "paths": {
    "/api/warehouse/connections/": {
      "get": {
        "operationId": "warehouse_connections_list",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSnowflakeConnectionList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List connections"
      },
      "post": {
        "operationId": "warehouse_connections_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Create connection"
      }
    },
    "/api/warehouse/connections/{id}/": {
      "get": {
        "operationId": "warehouse_connections_retrieve",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve connection"
      },
      "put": {
        "operationId": "warehouse_connections_update",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update connection"
      },
      "patch": {
        "operationId": "warehouse_connections_partial_update",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSnowflakeConnectionRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update connection"
      },
      "delete": {
        "operationId": "warehouse_connections_destroy",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "summary": "Delete connection"
      }
    },
    "/api/warehouse/connections/{id}/enrich/": {
      "post": {
        "operationId": "warehouse_connections_enrich_create",
        "description": "Enrichment write-back (\u00a714): update allow-listed Device fields from a\nSnowflake source. Body: {source_object, match_field, column_map}.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Enrich: connection"
      }
    },
    "/api/warehouse/connections/{id}/named_query/": {
      "post": {
        "operationId": "warehouse_connections_named_query_create",
        "description": "Run a governed catalog query (reverse-ETL pushdown, \u00a714).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Named query: connection"
      }
    },
    "/api/warehouse/connections/{id}/provision/": {
      "post": {
        "operationId": "warehouse_connections_provision_create",
        "description": "Create Snowflake objects idempotently (\u00a79, \u00a710). Body flags select what:\n{raw:true, pipes:false, elt:false, share:<consumer_account>}. Requires a\nlive/reachable Snowflake (returns 502 with the cause otherwise).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Provision: connection"
      }
    },
    "/api/warehouse/connections/{id}/runs/": {
      "get": {
        "operationId": "warehouse_connections_runs_retrieve",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Runs: connection"
      }
    },
    "/api/warehouse/connections/{id}/sync/": {
      "post": {
        "operationId": "warehouse_connections_sync_create",
        "description": "Trigger an incremental export. Body: {domain, dry_run?, load?}. Runs\ninline for now (a domain batch); a scheduled/queued runner lands later.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Sync: connection"
      }
    },
    "/api/warehouse/connections/{id}/test/": {
      "post": {
        "operationId": "warehouse_connections_test_create",
        "description": "Validate auth + reachability against Snowflake. Updates the connection's\nstate/last_ok_at/last_error. Never returns the secret.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this snowflake connection.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SnowflakeConnectionRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnowflakeConnection"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Test: connection"
      }
    },
    "/api/warehouse/inventory-sources/": {
      "get": {
        "operationId": "warehouse_inventory_sources_list",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedInventorySourceList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List inventory sources"
      },
      "post": {
        "operationId": "warehouse_inventory_sources_create",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Create inventory source"
      }
    },
    "/api/warehouse/inventory-sources/{id}/": {
      "get": {
        "operationId": "warehouse_inventory_sources_retrieve",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve inventory source"
      },
      "put": {
        "operationId": "warehouse_inventory_sources_update",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update inventory source"
      },
      "patch": {
        "operationId": "warehouse_inventory_sources_partial_update",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInventorySourceRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInventorySourceRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedInventorySourceRequest"
              }
            }
          }
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Update inventory source"
      },
      "delete": {
        "operationId": "warehouse_inventory_sources_destroy",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "summary": "Delete inventory source"
      }
    },
    "/api/warehouse/inventory-sources/{id}/apply/": {
      "post": {
        "operationId": "warehouse_inventory_sources_apply_create",
        "description": "Apply a previously-previewed plan (`run` id in body) \u2014 \u00a714a.5. Writes\ninventory records only; conflicts are skipped for human resolution.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Apply: inventory source"
      }
    },
    "/api/warehouse/inventory-sources/{id}/preview/": {
      "post": {
        "operationId": "warehouse_inventory_sources_preview_create",
        "description": "Dry-run plan (create/update/conflict/retire/noop per source row) \u2014\n\u00a714a.5. Body may include `rows` (list of dicts) to plan without a live\nSnowflake; otherwise rows are read from the source table.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/InventorySourceRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Preview: inventory source"
      }
    },
    "/api/warehouse/inventory-sources/{id}/runs/": {
      "get": {
        "operationId": "warehouse_inventory_sources_runs_retrieve",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this inventory source.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySource"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Runs: inventory source"
      }
    },
    "/api/warehouse/runs/": {
      "get": {
        "operationId": "warehouse_runs_list",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "name": "ordering",
            "required": false,
            "in": "query",
            "description": "Which field to use when ordering the results.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "description": "A page number within the paginated result set.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page_size",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedWarehouseSyncRunList"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List runs"
      }
    },
    "/api/warehouse/runs/{id}/": {
      "get": {
        "operationId": "warehouse_runs_retrieve",
        "description": "Deploy-safe base for making an existing DRF ModelViewSet tenant-isolated\n(VS-SPEC-TENANT-IDENTITY-001 \u00a714). Use as the FIRST base:\n\n    class DeviceViewSet(TenantScopedModelViewSet, viewsets.ModelViewSet):\n        queryset = Device.objects.select_related(...)\n        ...\n\nUnlike the strict TenantScopedViewSet pilot, this **degrades gracefully**:\nit is INERT unless the tenant_scoped alias is configured\n(TENANT_SCOPED_DATABASE_URL) AND the request carries a tenant_id claim.\nWhen inert it behaves exactly like a plain ModelViewSet \u2014 so the rollout\nlands additively and isolation switches on only once the non-superuser\nPostgres role exists (mirrors tenant_subdomain.py's \"inert unless\nconfigured\" contract). When active: reads route through the RLS-enforcing\nconnection and tenant_id is stamped server-side (never client input).",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "A UUID string identifying this warehouse sync run.",
            "required": true
          }
        ],
        "tags": [
          "warehouse"
        ],
        "security": [
          {
            "jwtAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarehouseSyncRun"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Retrieve run"
      }
    }
  },
  "components": {
    "schemas": {
      "WarehouseSyncRunStatusEnum": {
        "enum": [
          "running",
          "success",
          "error",
          "partial",
          "skipped"
        ],
        "type": "string",
        "description": "* `running` - Running\n* `success` - Success\n* `error` - Error\n* `partial` - Partial\n* `skipped` - Skipped"
      },
      "SyncModeEnum": {
        "enum": [
          "scheduled",
          "continuous"
        ],
        "type": "string",
        "description": "* `scheduled` - Scheduled\n* `continuous` - Continuous"
      },
      "PaginatedInventorySourceList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventorySource"
            }
          }
        }
      },
      "PiiPolicyEnum": {
        "enum": [
          "mask",
          "hash",
          "include"
        ],
        "type": "string",
        "description": "* `mask` - Mask\n* `hash` - Hash\n* `include` - Include"
      },
      "SnowflakeConnectionStateEnum": {
        "enum": [
          "draft",
          "validating",
          "active",
          "error",
          "paused"
        ],
        "type": "string",
        "description": "* `draft` - Draft\n* `validating` - Validating\n* `active` - Active\n* `error` - Error\n* `paused` - Paused"
      },
      "SnowflakeConnectionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "mode": {
            "$ref": "#/components/schemas/SnowflakeConnectionModeEnum"
          },
          "account": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "region": {
            "type": "string",
            "maxLength": 60
          },
          "warehouse": {
            "type": "string",
            "maxLength": 120
          },
          "database": {
            "type": "string",
            "maxLength": 120
          },
          "snow_role": {
            "type": "string",
            "maxLength": 120
          },
          "auth_method": {
            "$ref": "#/components/schemas/SnowflakeConnectionAuthMethodEnum"
          },
          "snow_user": {
            "type": "string",
            "maxLength": 200
          },
          "secret_ref": {
            "type": "string",
            "writeOnly": true
          },
          "storage_integration": {
            "type": "string",
            "maxLength": 200
          },
          "stage_url": {
            "type": "string",
            "maxLength": 400
          },
          "ingest_method": {
            "$ref": "#/components/schemas/IngestMethodEnum"
          },
          "network": {
            "$ref": "#/components/schemas/SnowflakeConnectionNetworkEnum"
          },
          "flows": {},
          "domains": {},
          "sync_mode": {
            "$ref": "#/components/schemas/SyncModeEnum"
          },
          "schedule_cron": {
            "type": "string",
            "maxLength": 120
          },
          "pii_policy": {
            "$ref": "#/components/schemas/PiiPolicyEnum"
          },
          "retention_days": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "nullable": true
          }
        },
        "required": [
          "account",
          "name"
        ]
      },
      "SnowflakeConnectionModeEnum": {
        "enum": [
          "customer_push",
          "managed_share",
          "internal"
        ],
        "type": "string",
        "description": "* `customer_push` - Customer-owned push (Mode A)\n* `managed_share` - Versus-managed + Secure Share (Mode B)\n* `internal` - Internal only (Mode C)"
      },
      "PatchedSnowflakeConnectionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "mode": {
            "$ref": "#/components/schemas/SnowflakeConnectionModeEnum"
          },
          "account": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "region": {
            "type": "string",
            "maxLength": 60
          },
          "warehouse": {
            "type": "string",
            "maxLength": 120
          },
          "database": {
            "type": "string",
            "maxLength": 120
          },
          "snow_role": {
            "type": "string",
            "maxLength": 120
          },
          "auth_method": {
            "$ref": "#/components/schemas/SnowflakeConnectionAuthMethodEnum"
          },
          "snow_user": {
            "type": "string",
            "maxLength": 200
          },
          "secret_ref": {
            "type": "string",
            "writeOnly": true
          },
          "storage_integration": {
            "type": "string",
            "maxLength": 200
          },
          "stage_url": {
            "type": "string",
            "maxLength": 400
          },
          "ingest_method": {
            "$ref": "#/components/schemas/IngestMethodEnum"
          },
          "network": {
            "$ref": "#/components/schemas/SnowflakeConnectionNetworkEnum"
          },
          "flows": {},
          "domains": {},
          "sync_mode": {
            "$ref": "#/components/schemas/SyncModeEnum"
          },
          "schedule_cron": {
            "type": "string",
            "maxLength": 120
          },
          "pii_policy": {
            "$ref": "#/components/schemas/PiiPolicyEnum"
          },
          "retention_days": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "nullable": true
          }
        }
      },
      "InventorySource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "connection": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "source_object": {
            "type": "string",
            "maxLength": 300
          },
          "source_query": {
            "type": "string"
          },
          "field_map": {},
          "match_keys": {},
          "vendor_map": {},
          "site_rule": {
            "nullable": true
          },
          "cred_rule": {
            "nullable": true
          },
          "on_missing": {
            "$ref": "#/components/schemas/OnMissingEnum"
          },
          "schedule_cron": {
            "type": "string",
            "maxLength": 120
          },
          "dry_run_only": {
            "type": "boolean"
          },
          "watermark_column": {
            "type": "string",
            "maxLength": 120
          },
          "state": {
            "type": "string",
            "readOnly": true
          },
          "last_ok_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "connection",
          "created_at",
          "id",
          "last_ok_at",
          "name",
          "state",
          "updated_at"
        ]
      },
      "WarehouseSyncRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "domain": {
            "type": "string",
            "maxLength": 40
          },
          "status": {
            "$ref": "#/components/schemas/WarehouseSyncRunStatusEnum"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "rows_out": {
            "type": "integer",
            "maximum": 9223372036854775807,
            "minimum": -9223372036854775808,
            "format": "int64"
          },
          "bytes_out": {
            "type": "integer",
            "maximum": 9223372036854775807,
            "minimum": -9223372036854775808,
            "format": "int64"
          },
          "files": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648
          },
          "watermark_from": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "watermark_to": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "snowflake_pipe": {
            "type": "string",
            "maxLength": 200
          },
          "dlq_object": {
            "type": "string",
            "maxLength": 400
          },
          "error": {
            "type": "string"
          },
          "connection": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "connection",
          "id",
          "started_at"
        ]
      },
      "PaginatedWarehouseSyncRunList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarehouseSyncRun"
            }
          }
        }
      },
      "PatchedInventorySourceRequest": {
        "type": "object",
        "properties": {
          "connection": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "source_object": {
            "type": "string",
            "maxLength": 300
          },
          "source_query": {
            "type": "string"
          },
          "field_map": {},
          "match_keys": {},
          "vendor_map": {},
          "site_rule": {
            "nullable": true
          },
          "cred_rule": {
            "nullable": true
          },
          "on_missing": {
            "$ref": "#/components/schemas/OnMissingEnum"
          },
          "schedule_cron": {
            "type": "string",
            "maxLength": 120
          },
          "dry_run_only": {
            "type": "boolean"
          },
          "watermark_column": {
            "type": "string",
            "maxLength": 120
          }
        }
      },
      "SnowflakeConnectionNetworkEnum": {
        "enum": [
          "public",
          "privatelink"
        ],
        "type": "string",
        "description": "* `public` - Public (TLS + network policy)\n* `privatelink` - PrivateLink"
      },
      "InventorySourceRequest": {
        "type": "object",
        "properties": {
          "connection": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "source_object": {
            "type": "string",
            "maxLength": 300
          },
          "source_query": {
            "type": "string"
          },
          "field_map": {},
          "match_keys": {},
          "vendor_map": {},
          "site_rule": {
            "nullable": true
          },
          "cred_rule": {
            "nullable": true
          },
          "on_missing": {
            "$ref": "#/components/schemas/OnMissingEnum"
          },
          "schedule_cron": {
            "type": "string",
            "maxLength": 120
          },
          "dry_run_only": {
            "type": "boolean"
          },
          "watermark_column": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "connection",
          "name"
        ]
      },
      "OnMissingEnum": {
        "enum": [
          "ignore",
          "retire",
          "flag"
        ],
        "type": "string",
        "description": "* `ignore` - Ignore\n* `retire` - Retire (soft)\n* `flag` - Flag stale"
      },
      "PaginatedSnowflakeConnectionList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=4"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?page=2"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnowflakeConnection"
            }
          }
        }
      },
      "IngestMethodEnum": {
        "enum": [
          "batch_copy",
          "snowpipe",
          "snowpipe_streaming"
        ],
        "type": "string",
        "description": "* `batch_copy` - Batch COPY\n* `snowpipe` - Snowpipe (auto-ingest)\n* `snowpipe_streaming` - Snowpipe Streaming"
      },
      "SnowflakeConnectionAuthMethodEnum": {
        "enum": [
          "keypair",
          "oauth_cc",
          "oauth_authcode"
        ],
        "type": "string",
        "description": "* `keypair` - Key-pair (RSA JWT)\n* `oauth_cc` - OAuth client-credentials\n* `oauth_authcode` - OAuth authorization-code"
      },
      "SnowflakeConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "mode": {
            "$ref": "#/components/schemas/SnowflakeConnectionModeEnum"
          },
          "account": {
            "type": "string",
            "maxLength": 200
          },
          "region": {
            "type": "string",
            "maxLength": 60
          },
          "warehouse": {
            "type": "string",
            "maxLength": 120
          },
          "database": {
            "type": "string",
            "maxLength": 120
          },
          "snow_role": {
            "type": "string",
            "maxLength": 120
          },
          "auth_method": {
            "$ref": "#/components/schemas/SnowflakeConnectionAuthMethodEnum"
          },
          "snow_user": {
            "type": "string",
            "maxLength": 200
          },
          "storage_integration": {
            "type": "string",
            "maxLength": 200
          },
          "stage_url": {
            "type": "string",
            "maxLength": 400
          },
          "ingest_method": {
            "$ref": "#/components/schemas/IngestMethodEnum"
          },
          "network": {
            "$ref": "#/components/schemas/SnowflakeConnectionNetworkEnum"
          },
          "flows": {},
          "domains": {},
          "sync_mode": {
            "$ref": "#/components/schemas/SyncModeEnum"
          },
          "schedule_cron": {
            "type": "string",
            "maxLength": 120
          },
          "pii_policy": {
            "$ref": "#/components/schemas/PiiPolicyEnum"
          },
          "retention_days": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": -2147483648,
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SnowflakeConnectionStateEnum"
              }
            ],
            "readOnly": true
          },
          "last_ok_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "nullable": true
          },
          "last_error": {
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "account",
          "created_at",
          "id",
          "last_error",
          "last_ok_at",
          "name",
          "state",
          "updated_at"
        ]
      }
    }
  }
}