{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sifflet/main/json-schema/sifflet-public-update-source-dto-schema.json",
  "title": "PublicUpdateSourceDto",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sifflet-backend-api-openapi.yml#/components/schemas/PublicUpdateSourceDto",
  "type": "object",
  "properties": {
    "credentials": {
      "type": "string",
      "description": "Credentials of the source. Required for all sources type except 'ATHENA', 'DBT', 'QUICKSIGHT'."
    },
    "description": {
      "type": "string",
      "description": "Description of the source"
    },
    "name": {
      "type": "string",
      "description": "Name of the source"
    },
    "parameters": {
      "oneOf": [
        {
          "$ref": "#/$defs/PublicAirflowParametersDto"
        },
        {
          "$ref": "#/$defs/PublicAthenaParametersDto"
        },
        {
          "$ref": "#/$defs/PublicBigQueryParametersDto"
        },
        {
          "$ref": "#/$defs/PublicDatabricksParametersDto"
        },
        {
          "$ref": "#/$defs/PublicDbtCloudParametersDto"
        },
        {
          "$ref": "#/$defs/PublicDbtParametersDto"
        },
        {
          "$ref": "#/$defs/PublicDeclarativeParametersDto"
        },
        {
          "$ref": "#/$defs/PublicFivetranParametersDto"
        },
        {
          "$ref": "#/$defs/PublicLookerParametersDto"
        },
        {
          "$ref": "#/$defs/PublicMssqlParametersDto"
        },
        {
          "$ref": "#/$defs/PublicMysqlParametersDto"
        },
        {
          "$ref": "#/$defs/PublicOracleParametersDto"
        },
        {
          "$ref": "#/$defs/PublicPostgresqlParametersDto"
        },
        {
          "$ref": "#/$defs/PublicPowerBiParametersDto"
        },
        {
          "$ref": "#/$defs/PublicQuicksightParametersDto"
        },
        {
          "$ref": "#/$defs/PublicRedshiftParametersDto"
        },
        {
          "$ref": "#/$defs/PublicSnowflakeParametersDto"
        },
        {
          "$ref": "#/$defs/PublicSynapseParametersDto"
        },
        {
          "$ref": "#/$defs/PublicTableauParametersDto"
        }
      ]
    },
    "schedule": {
      "type": "string",
      "description": "Schedule of the source. Supports CRON syntax. If empty, the source won't be scheduled."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicTagReferenceDto"
      }
    },
    "timezone": {
      "type": "string",
      "description": "A string representing a timezone identifier (e.g. 'UTC' or 'Europe/Paris')",
      "default": "UTC"
    }
  },
  "$defs": {
    "GitConnection": {
      "required": [
        "authType",
        "secretId",
        "url"
      ],
      "type": "object",
      "properties": {
        "authType": {
          "type": "string",
          "enum": [
            "HTTP_AUTHORIZATION_HEADER",
            "USER_PASSWORD",
            "SSH"
          ]
        },
        "branch": {
          "type": "string"
        },
        "secretId": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "description": "The LookML configuration. See https://docs.siffletdata.com/docs/looker.\nIf you don’t use LookML or omit this field, it will default to an empty list.\n"
    },
    "PublicAirflowParametersDto": {
      "required": [
        "host",
        "port",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "host": {
              "type": "string",
              "description": "Your Airflow server hostname"
            },
            "port": {
              "type": "integer",
              "description": "Your Airflow server port",
              "format": "int32"
            }
          }
        }
      ]
    },
    "PublicAthenaParametersDto": {
      "required": [
        "database",
        "datasource",
        "region",
        "roleArn",
        "s3OutputLocation",
        "type",
        "workgroup"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your Athena database name"
            },
            "datasource": {
              "type": "string",
              "description": "Your Athena data source name"
            },
            "region": {
              "type": "string",
              "description": "Your Athena instance AWS region"
            },
            "roleArn": {
              "type": "string",
              "description": "ARN of the IAM role to use for Athena queries"
            },
            "s3OutputLocation": {
              "type": "string",
              "description": "The S3 location where Athena query results are stored"
            },
            "vpcUrl": {
              "type": "string",
              "description": "Your VPC URL for Athena connection"
            },
            "workgroup": {
              "type": "string",
              "description": "Your Athena workgroup name"
            }
          }
        }
      ]
    },
    "PublicBigQueryParametersDto": {
      "required": [
        "datasetId",
        "projectId",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "billingProjectId": {
              "type": "string",
              "description": "Your billing project ID"
            },
            "datasetId": {
              "type": "string",
              "description": "Your BigQuery dataset ID"
            },
            "projectId": {
              "type": "string",
              "description": "Your BigQuery project ID"
            },
            "workerProjectIds": {
              "type": "string",
              "description": "Comma separated list of project ids where your queries run. Optional if it's the same as the projectId parameter"
            }
          }
        }
      ]
    },
    "PublicDatabricksParametersDto": {
      "required": [
        "catalog",
        "host",
        "httpPath",
        "port",
        "schema",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "catalog": {
              "type": "string",
              "description": "Your Databricks catalog"
            },
            "host": {
              "type": "string",
              "description": "Your Databricks server hostname"
            },
            "httpPath": {
              "type": "string",
              "description": "Your Databricks HTTP path"
            },
            "port": {
              "type": "integer",
              "description": "Your Databricks server port",
              "format": "int32"
            },
            "schema": {
              "type": "string",
              "description": "Your Databricks schema"
            }
          }
        }
      ]
    },
    "PublicDbtCloudParametersDto": {
      "required": [
        "accountId",
        "baseUrl",
        "projectId",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string",
              "description": "Your dbt Cloud account ID"
            },
            "baseUrl": {
              "type": "string",
              "description": "Your dbt Cloud base URL"
            },
            "jobDefinitionId": {
              "type": "string",
              "description": "Your dbt Cloud job ID"
            },
            "projectId": {
              "type": "string",
              "description": "Your dbt Cloud project ID"
            }
          }
        }
      ]
    },
    "PublicDbtParametersDto": {
      "required": [
        "projectName",
        "target",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "projectName": {
              "type": "string",
              "description": "Your dbt project name (the 'name' value in your dbt_project.yml file)"
            },
            "target": {
              "type": "string",
              "description": "Your dbt target name (the 'target' value in your profiles.yml file)"
            }
          }
        }
      ]
    },
    "PublicDeclarativeParametersDto": {
      "required": [
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        }
      ]
    },
    "PublicFivetranParametersDto": {
      "required": [
        "host",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "host": {
              "type": "string",
              "description": "Your Fivetran environment URL"
            }
          }
        }
      ]
    },
    "PublicLookerParametersDto": {
      "required": [
        "gitConnections",
        "host",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "gitConnections": {
              "type": "array",
              "description": "The LookML configuration. See https://docs.siffletdata.com/docs/looker. If you don't use LookML, use an empty list `[]`",
              "items": {
                "$ref": "#/$defs/GitConnection"
              }
            },
            "host": {
              "type": "string",
              "description": "URL of the Looker site and append at the end the following \"/api/4.0\".\nFor instance if you usually connect to Looker on \"https://abcdef.cloud.looker.com/\",\n then you should add the following on host: \"https://abcdef.cloud.looker.com/api/4.0\"\n"
            }
          }
        }
      ]
    },
    "PublicMssqlParametersDto": {
      "required": [
        "database",
        "host",
        "port",
        "schema",
        "ssl",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "host": {
              "type": "string",
              "description": "Your MSSQL server hostname"
            },
            "port": {
              "type": "integer",
              "description": "Your MSSQL server port",
              "format": "int32"
            },
            "schema": {
              "type": "string",
              "description": "Your schema name"
            },
            "ssl": {
              "type": "boolean",
              "description": "Whether to use SSL to connect to your MSSQL server (recommended: true)"
            }
          }
        }
      ]
    },
    "PublicMysqlParametersDto": {
      "required": [
        "database",
        "host",
        "mysqlTlsVersion",
        "port",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "host": {
              "type": "string",
              "description": "Your MySQL server hostname"
            },
            "mysqlTlsVersion": {
              "type": "string",
              "description": "The TLS version to use to connect to your MySQL server",
              "enum": [
                "TLS_V_1_2",
                "TLS_V_1_3"
              ]
            },
            "port": {
              "type": "integer",
              "description": "Your MySQL server port",
              "format": "int32"
            }
          }
        }
      ]
    },
    "PublicOracleParametersDto": {
      "required": [
        "database",
        "host",
        "port",
        "schema",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "host": {
              "type": "string",
              "description": "Your Oracle server hostname"
            },
            "port": {
              "type": "integer",
              "description": "Your Oracle server port",
              "format": "int32"
            },
            "schema": {
              "type": "string",
              "description": "Your schema name"
            }
          }
        }
      ]
    },
    "PublicPostgresqlParametersDto": {
      "required": [
        "database",
        "host",
        "port",
        "schema",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "host": {
              "type": "string",
              "description": "Your PostgreSQL server host"
            },
            "port": {
              "type": "integer",
              "description": "Your PostgreSQL server port",
              "format": "int32"
            },
            "schema": {
              "type": "string",
              "description": "Your schema name"
            }
          }
        }
      ]
    },
    "PublicPowerBiParametersDto": {
      "required": [
        "clientId",
        "tenantId",
        "type",
        "workspaceId"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "clientId": {
              "type": "string",
              "description": "Your Azure AD client ID"
            },
            "tenantId": {
              "type": "string",
              "description": "Your Azure AD tenant ID"
            },
            "workspaceId": {
              "type": "string",
              "description": "Your Power BI workspace ID"
            }
          }
        }
      ]
    },
    "PublicQuicksightParametersDto": {
      "required": [
        "accountId",
        "awsRegion",
        "roleArn",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "accountId": {
              "type": "string",
              "description": "Your AWS account ID"
            },
            "awsRegion": {
              "type": "string",
              "description": "Your AWS region"
            },
            "roleArn": {
              "type": "string",
              "description": "The ARN for your QuickSight role"
            }
          }
        }
      ]
    },
    "PublicRedshiftParametersDto": {
      "required": [
        "database",
        "host",
        "port",
        "schema",
        "ssl",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "host": {
              "type": "string",
              "description": "Your Redshift server host"
            },
            "port": {
              "type": "integer",
              "description": "Your Redshift server port",
              "format": "int32"
            },
            "schema": {
              "type": "string",
              "description": "Your schema name"
            },
            "ssl": {
              "type": "boolean",
              "description": "Whether to use SSL to connect to your Redshift server"
            }
          }
        }
      ]
    },
    "PublicSnowflakeParametersDto": {
      "required": [
        "accountIdentifier",
        "database",
        "schema",
        "type",
        "warehouse"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "accountIdentifier": {
              "type": "string",
              "description": "Your Snowflake account identifier"
            },
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "schema": {
              "type": "string",
              "description": "Your schema name"
            },
            "warehouse": {
              "type": "string",
              "description": "Your Snowflake warehouse"
            }
          }
        }
      ]
    },
    "PublicSourceParametersDto": {
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ATHENA",
            "BIGQUERY",
            "REDSHIFT",
            "SNOWFLAKE",
            "DATABRICKS",
            "MSSQL",
            "MYSQL",
            "POSTGRESQL",
            "ORACLE",
            "SYNAPSE",
            "LOOKER",
            "TABLEAU",
            "QUICKSIGHT",
            "AIRFLOW",
            "DBT",
            "DBT_CLOUD",
            "FIVETRAN",
            "POWER_BI",
            "DECLARATIVE",
            "_UNKNOWN_"
          ]
        }
      },
      "description": "Parameters of the source"
    },
    "PublicSynapseParametersDto": {
      "required": [
        "database",
        "host",
        "port",
        "schema",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "database": {
              "type": "string",
              "description": "Your database name"
            },
            "host": {
              "type": "string",
              "description": "The host of your Synapse server"
            },
            "port": {
              "type": "integer",
              "description": "Your Synapse server port",
              "format": "int32"
            },
            "schema": {
              "type": "string",
              "description": "Your schema name"
            }
          }
        }
      ]
    },
    "PublicTableauParametersDto": {
      "required": [
        "host",
        "type"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/PublicSourceParametersDto"
        },
        {
          "type": "object",
          "properties": {
            "host": {
              "type": "string",
              "description": "Your Tableau Server hostname"
            },
            "site": {
              "type": "string",
              "description": "Your Tableau Server site. Leave empty if your Tableau environment is using the Default Site."
            }
          }
        }
      ]
    },
    "PublicTagReferenceDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the referenced object",
          "format": "uuid"
        },
        "kind": {
          "type": "string",
          "description": "Type of the referenced tag",
          "enum": [
            "TAG",
            "CLASSIFICATION"
          ]
        },
        "name": {
          "type": "string",
          "description": "Name of the referenced object"
        }
      },
      "description": "Tags of the source. A tag can either be referenced by its id or its name or its name and kind."
    }
  }
}