# Data Sources

## Create one or more Data Sources

> Creates one or multiple data sources with provided metadata and configuration

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/data-sources":{"post":{"summary":"Create one or more Data Sources","tags":["Data Sources"],"description":"Creates one or multiple data sources with provided metadata and configuration","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"}},"required":["resourceName","databaseType"]},{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"}},"required":["resourceName","databaseType"]},"minItems":1}]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the data source"},"pId":{"type":"number","description":"Project ID"},"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"userId":{"type":"string","description":"User ID","format":"uuid"},"date":{"type":"string","format":"date-time","description":"Date created"}}},"description":"Array of created data sources"}},"required":["status","data"]}}}},"207":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the data source"},"pId":{"type":"number","description":"Project ID"},"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"userId":{"type":"string","description":"User ID","format":"uuid"},"date":{"type":"string","format":"date-time","description":"Date created"}}},"description":"Array of created data sources"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}},"required":["status","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Get Data Source by ID

> Returns metadata and configuration for a single data source by its ID

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/data-sources/{id}":{"get":{"summary":"Get Data Source by ID","tags":["Data Sources"],"description":"Returns metadata and configuration for a single data source by its ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Data Source ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"data":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the data source"},"pId":{"type":"number","description":"Project ID"},"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"userId":{"type":"string","description":"User ID","format":"uuid"},"date":{"type":"string","format":"date-time","description":"Date created"}},"description":"Metadata and configuration of the requested data source"}},"required":["status","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Update Data Source Attributes

> Update attributes of a data source connection.\
> &#x20;  \
> \
> 🚨 \*\*Note:\*\*\
> &#x20;        \
> &#x20;\- Only the specified fields will be affected — other attributes remain untouched.\
> &#x20;        \
> &#x20;\- Scalar fields (e.g. \`description\`, \`host\`, \`port\`) will overwrite the current value.\
> &#x20;        \
> &#x20;\- Array-type fields (e.g. \`includePatterns\`, \`excludePatterns\`) will fully replace existing values if provided.

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/data-sources/{id}":{"patch":{"summary":"Update Data Source Attributes","tags":["Data Sources"],"description":"Update attributes of a data source connection.\n   \n\n🚨 **Note:**\n         \n - Only the specified fields will be affected — other attributes remain untouched.\n         \n - Scalar fields (e.g. `description`, `host`, `port`) will overwrite the current value.\n         \n - Array-type fields (e.g. `includePatterns`, `excludePatterns`) will fully replace existing values if provided.","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"region":{"type":"string","description":"AWS region"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"accountName":{"type":"string","description":"Account name"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"note":{"type":"string","description":"Note"},"description":{"type":"string","description":"Description"},"affinityId":{"type":"string","description":"Affinity ID"},"role":{"type":"string","description":"Role"},"host":{"type":"string","description":"Host"},"port":{"type":"string","description":"Port"},"databaseName":{"type":"string","description":"Database name"},"warehouse":{"type":"string","description":"Warehouse"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"totalCapacity":{"type":"number","description":"Total capacity"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"driverClassName":{"type":"string","description":"Driver class name"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"scanSinceTimeframe":{"type":"string","description":"Scan since timeframe"},"incremental":{"type":"boolean","description":"Enable incremental scanning"},"uri":{"type":"string","description":"URI"},"path":{"type":"string","description":"Path"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Data Source ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"data":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the data source"},"pId":{"type":"number","description":"Project ID"},"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"userId":{"type":"string","description":"User ID","format":"uuid"},"date":{"type":"string","format":"date-time","description":"Date created"}},"description":"Updated data source"}},"required":["status","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Get Data Sources by IDs

> Returns an array of metadata and configuration for multiple data sources by their IDs

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/data-sources/by-ids":{"post":{"summary":"Get Data Sources by IDs","tags":["Data Sources"],"description":"Returns an array of metadata and configuration for multiple data sources by their IDs","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","minItems":1,"items":{"type":"string","description":"Data Source ID"},"description":"List of data source IDs"}},"required":["ids"]}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"data":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the data source"},"pId":{"type":"number","description":"Project ID"},"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"userId":{"type":"string","description":"User ID","format":"uuid"},"date":{"type":"string","format":"date-time","description":"Date created"}},"description":"Metadata and configuration of a data source"},"description":"Array of data sources"}},"required":["status","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```

## Filter Data Sources

> Returns array of data sources filtered by criteria with pagination support.\
> &#x20;              \
> \
> \*\*Wildcard Support:\*\* The \`resourceNames\` and \`databaseTypes\` filters support wildcard patterns using \`\*\`.\
> &#x20;              \
> \- Exact match: \`my-db\`\
> &#x20;              \
> \- Prefix search: \`prod-\*\`\
> &#x20;              \
> \- Suffix search: \`\*-primary\`\
> &#x20;              \
> \- Contains: \`\*postgres\*\`

```json
{"openapi":"3.0.3","info":{"title":"PDC Public API (v2)","version":"v2"},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Insert the JWT token here","bearerFormat":"JWT"}}},"paths":{"/api/public/v2/data-sources/filter":{"post":{"summary":"Filter Data Sources","tags":["Data Sources"],"description":"Returns array of data sources filtered by criteria with pagination support.\n               \n\n**Wildcard Support:** The `resourceNames` and `databaseTypes` filters support wildcard patterns using `*`.\n               \n- Exact match: `my-db`\n               \n- Prefix search: `prod-*`\n               \n- Suffix search: `*-primary`\n               \n- Contains: `*postgres*`","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","description":"Data Source ID"},"description":"Filter by array of data source IDs (exact match)"},"resourceNames":{"type":"array","items":{"type":"string","description":"Resource name"},"description":"Filter by array of resource names. Supports exact match, wildcard (*), prefix (value*), and suffix (*value) search."},"databaseTypes":{"type":"array","items":{"type":"string","description":"Database type"},"description":"Filter by array of database types. Supports exact match, wildcard (*), prefix (value*), and suffix (*value) search."}},"additionalProperties":false,"description":"Filter criteria for data sources"}},"additionalProperties":false,"required":["filters"],"description":"At least one filter must be provided"}}},"required":true,"description":"At least one filter must be provided"},"parameters":[{"schema":{"type":"integer","minimum":0,"default":0},"in":"query","name":"skip","required":false,"description":"Number of documents to skip"},{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":100},"in":"query","name":"limit","required":false,"description":"Maximum number of documents to return (max 10000)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"data":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the data source"},"pId":{"type":"number","description":"Project ID"},"databaseName":{"type":"string","description":"Database name"},"owners":{"type":"array","description":"Owners","items":{"type":"object"}},"jobClasspath":{"type":"string","description":"Job classpath"},"driverClassName":{"type":"string","description":"Driver class name"},"resourceName":{"type":"string","description":"Resource name"},"resourceId":{"type":"string","description":"Resource ID"},"fqdnId":{"type":"string","description":"FQDN ID"},"configMethod":{"type":"string","description":"Config method"},"host":{"type":"string","description":"Host"},"lastTestConnectionId":{"type":"string","description":"Last test connection ID"},"lastIngestId":{"type":"string","description":"Last ingest ID"},"affinityId":{"type":"string","description":"Affinity ID"},"port":{"type":"string","description":"Port"},"uri":{"type":"string","description":"URI"},"databaseType":{"type":"string","description":"Database type"},"spiVersion":{"type":"string","description":"SPI version"},"serviceType":{"type":"string","description":"Service type"},"description":{"type":"string","description":"Description"},"status":{"type":"string","description":"Status"},"users":{"type":"array","items":{"type":"string"},"description":"Users"},"userName":{"type":"string","description":"User name"},"password":{"type":"string","description":"Password"},"encryptedPassword":{"type":"string","description":"Encrypted password"},"note":{"type":"string","description":"Note"},"oauthClientId":{"type":"string","description":"OAuth client ID"},"oauthClientSecret":{"type":"string","description":"OAuth client secret"},"hdfsCredType":{"type":"string","description":"HDFS credential type"},"endpoint":{"type":"string","description":"Endpoint"},"accessKey":{"type":"string","description":"Access key"},"container":{"type":"string","description":"Container"},"accessId":{"type":"string","description":"Access ID"},"secretKey":{"type":"string","description":"Secret key"},"secretManagerKey":{"type":"string","description":"Secret manager key"},"totalCapacity":{"type":"number","description":"Total capacity"},"project":{"type":"string","description":"Project"},"oAuthType":{"type":"number","enum":[0],"description":"OAuth type"},"keyPath":{"type":"string","description":"Key path"},"clientEmail":{"type":"string","description":"Client email"},"warehouse":{"type":"string","description":"Warehouse"},"noAuth":{"type":"boolean","description":"no auth"},"defaultEndpointsProtocol":{"type":"string","description":"http or https protocol"},"schemaNames":{"type":"array","items":{"type":"string"},"description":"Schema names to ingest"},"includePatterns":{"type":"array","items":{"type":"string"},"description":"Include patterns - Resources matching these patterns"},"excludePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude patterns - Resources matching these patterns"},"includeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Include schema patterns - Schemas matching these patterns"},"excludeSchemaPatterns":{"type":"array","items":{"type":"string"},"description":"Exclude schema patterns - Schemas matching these patterns"},"includeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Include table patterns - Tables matching these patterns"},"excludeTablePatterns":{"type":"array","items":{"type":"string"},"description":"Exclude table patterns - Tables matching these patterns"},"deleteEmptyFolders":{"type":"boolean","description":"Delete empty folders after processing"},"region":{"type":"string","description":"AWS region"},"accountNumber":{"type":"string","description":"AWS account number"},"iamUsername":{"type":"string","description":"IAM username"},"accessKeyID":{"type":"string","description":"AWS access key ID"},"secretAccessKey":{"type":"string","description":"AWS secret access key"},"assumeRole":{"type":"string","description":"Assume role"},"role":{"type":"string","description":"Role"},"externalID":{"type":"string","description":"External ID"},"sslType":{"type":"string","description":"SSL type","enum":["encryptionOnly","encryptionWithAuthentication"]},"trustStoreType":{"type":"string","description":"Trust store type"},"trustStoreLocation":{"type":"string","description":"Trust store location"},"trustStorePassword":{"type":"string","description":"Trust store password"},"keyStoreType":{"type":"string","description":"Key store type"},"keyStoreLocation":{"type":"string","description":"Key store location"},"keyStorePassword":{"type":"string","description":"Key store password"},"cipherSuite":{"type":"string","description":"Cipher suite"},"serverDistinguishedName":{"type":"string","description":"Server distinguished name"},"connectionType":{"type":"string","description":"MSSQL connection type"},"fileSystemType":{"type":"string","description":"File system type"},"path":{"type":"string","description":"Path"},"followSymLinks":{"type":"string","description":"Follow symbolic links"},"domain":{"type":"string","description":"Domain"},"shareName":{"type":"string","description":"Share name"},"accountName":{"type":"string","description":"Account name"},"azureCredType":{"type":"string","description":"Azure credential type"},"azureSharedKey":{"type":"string","description":"Azure shared key"},"azureTenantId":{"type":"string","description":"Azure tenant ID"},"availableForMigration":{"type":"boolean","description":"Available for migration"},"enabledForMigration":{"type":"boolean","description":"Enabled for migration"},"availableForWriting":{"type":"boolean","description":"Available for writing"},"availableForDataMastering":{"type":"boolean","description":"Available for data mastering"},"costPerTb":{"type":"object","properties":{"price":{"type":"number","description":"Price per TB"},"currency":{"type":"string","description":"Currency"},"frequency":{"type":"string","description":"Frequency","enum":["month","day","week","year"]}},"description":"Cost per TB"},"location":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"street_address":{"type":"string","description":"Street address"},"street_address_2":{"type":"string","description":"Street address 2"},"locality_city":{"type":"string","description":"City"},"state_province":{"type":"string","description":"State/Province"},"postal_code":{"type":"string","description":"Postal code"},"country":{"type":"string","description":"Country"}},"description":"Location"},"userId":{"type":"string","description":"User ID","format":"uuid"},"date":{"type":"string","format":"date-time","description":"Date created"}},"description":"Metadata and configuration of a data source"},"description":"Array of filtered data sources"},"pageInfo":{"type":"object","properties":{"skip":{"type":"integer","description":"Number of documents skipped"},"limit":{"type":"integer","description":"Maximum number of documents returned"},"totalCount":{"type":"integer","description":"Total number of matching documents"}},"required":["skip","limit","totalCount"],"description":"Pagination information"}},"required":["status","data","pageInfo"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Bad Request","type":"object","properties":{"status":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object","additionalProperties":true}]}}}}}},"401":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","content":{"application/json":{"schema":{"description":"Unauthorized - The request requires a valid Bearer token.\n\n    \tTo access this endpoint:\n\n        1. Make a POST request to /api/public/v1/auth with valid credentials to obtain the access token.\n        2. Click the \"Authorize\" button in the Swagger UI and enter the token.\n        3. All protected endpoints require the Authorization header: \"Authorization: 'Bearer your-access-token'\"\n    ","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Internal Server Error","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable — Connection Refused","content":{"application/json":{"schema":{"description":"Service Unavailable — Connection Refused","type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}}}}}}}}
```
