> For the complete documentation index, see [llms.txt](https://docs.soda.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.soda.io/reference/soda-apis/rest-api/datasources.md).

# Datasources

Soda Cloud API Datasource Endpoints

## List datasources

> This endpoint allows you to list datasources in your organization.\
> \
> This GET is a paginated API that uses the following parameters to request specific details:\
> \
> \- \`size\`: Supply an integer value between 10 and 1000, inclusive. The default value is 10.\
> \
> \- \`page\`: Supply an integer value. The default value is 0.\
> \
> \- \`search\`: Supply a string value to filter datasources by name (case-insensitive partial match).\
> \
> \- \`version\`: Optionally, use this parameter to list only datasources on a given Soda model version (\`3\` or \`4\`).\
> \
> Datasources that are being deleted are left out of the results, and out of \`totalElements\`, from the moment the delete is requested until the deletion has finished.\
> \
> \## Authorization\
> \
> Soda only returns datasources for which the user has the \*\*View\*\* permission. Soda Cloud Admins have access to all datasources.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"ModelVersionDTO":{"type":"string","enum":["3","4"]},"PublicApiListDatasourcesResponse":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDTO"}},"first":{"type":"boolean"},"last":{"type":"boolean"},"number":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int32"},"totalPages":{"type":"integer","format":"int32"}},"required":["content","first","last","number","size","totalElements","totalPages"]},"PublicApiDatasourceDTO":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"owner":{"type":"object","$ref":"#/components/schemas/UserContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceTypeDTO"},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"object","$ref":"#/components/schemas/ModelVersionDTO","description":"The Soda model version of the datasource: `3` or `4`."}}},"UserContentDTO":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"fullName":{"type":"string"},"lastName":{"type":"string"},"userId":{"type":"string"}},"required":["email","userId"]},"PublicApiDatasourceTypeDTO":{"type":"string","enum":["bigquery","mysql","mariadb","postgres","snowflake","dask","spark","sparkdf","redshift","duckdb","presto","oracle","athena","trino","dremio","vertica","denodo","db2","db2z","sqlserver","databricks","synapse","fabric","hana","salesforce"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources":{"get":{"description":"This endpoint allows you to list datasources in your organization.\n\nThis GET is a paginated API that uses the following parameters to request specific details:\n\n- `size`: Supply an integer value between 10 and 1000, inclusive. The default value is 10.\n\n- `page`: Supply an integer value. The default value is 0.\n\n- `search`: Supply a string value to filter datasources by name (case-insensitive partial match).\n\n- `version`: Optionally, use this parameter to list only datasources on a given Soda model version (`3` or `4`).\n\nDatasources that are being deleted are left out of the results, and out of `totalElements`, from the moment the delete is requested until the deletion has finished.\n\n## Authorization\n\nSoda only returns datasources for which the user has the **View** permission. Soda Cloud Admins have access to all datasources.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"GET/api/v1/datasources","parameters":[{"in":"query","name":"page","schema":{"type":"integer","format":"int32"}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"size","schema":{"type":"integer","format":"int32"}},{"in":"query","name":"version","schema":{"type":"object","$ref":"#/components/schemas/ModelVersionDTO"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiListDatasourcesResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"List datasources","tags":["Datasources"]}}}}
```

## Create a datasource

> Creates a new V4 datasource with the provided configuration.\
> \
> The datasource type is extracted from the YAML configuration file contents.\
> \
> The \`ownerId\` is optional and defaults to the user making the request. Runner service users cannot own a datasource.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_DATASOURCES\_AND\_AGENTS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 10 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiCreateDatasourceRequestDTO":{"type":"object","properties":{"configurationFileContents":{"type":"string"},"label":{"type":"string"},"ownerId":{"type":"string"},"runnerId":{"type":"string"}},"required":["configurationFileContents"]},"PublicApiCreateDatasourceResponse":{"type":"object","properties":{"datasource":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDTO"},"discoveryScanId":{"type":"string"}}},"PublicApiDatasourceDTO":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"owner":{"type":"object","$ref":"#/components/schemas/UserContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceTypeDTO"},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"object","$ref":"#/components/schemas/ModelVersionDTO","description":"The Soda model version of the datasource: `3` or `4`."}}},"UserContentDTO":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"fullName":{"type":"string"},"lastName":{"type":"string"},"userId":{"type":"string"}},"required":["email","userId"]},"PublicApiDatasourceTypeDTO":{"type":"string","enum":["bigquery","mysql","mariadb","postgres","snowflake","dask","spark","sparkdf","redshift","duckdb","presto","oracle","athena","trino","dremio","vertica","denodo","db2","db2z","sqlserver","databricks","synapse","fabric","hana","salesforce"]},"ModelVersionDTO":{"type":"string","enum":["3","4"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources":{"post":{"description":"Creates a new V4 datasource with the provided configuration.\n\nThe datasource type is extracted from the YAML configuration file contents.\n\nThe `ownerId` is optional and defaults to the user making the request. Runner service users cannot own a datasource.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_DATASOURCES_AND_AGENTS to execute this call.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n10 requests/60 seconds","operationId":"POST/api/v1/datasources","requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiCreateDatasourceRequestDTO"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiCreateDatasourceResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Create a datasource","tags":["Datasources"]}}}}
```

## Test datasource connection

> This endpoint triggers an asynchronous connection test for a datasource configuration.\
> \
> The response includes an operation ID that you can use to poll the status of the connection test.\
> \
> \## Authorization\
> \
> Any authenticated Soda Cloud user in your organization may test a datasource connection. The test runs against a configuration provided in the request, not against an existing datasource.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 10 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiTestConnectionRequestDTO":{"type":"object","properties":{"configurationFileContents":{"type":"string"},"runnerId":{"type":"string"}},"required":["configurationFileContents","runnerId"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/actions/testConnection":{"post":{"description":"This endpoint triggers an asynchronous connection test for a datasource configuration.\n\nThe response includes an operation ID that you can use to poll the status of the connection test.\n\n## Authorization\n\nAny authenticated Soda Cloud user in your organization may test a datasource connection. The test runs against a configuration provided in the request, not against an existing datasource.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n10 requests/60 seconds","operationId":"POST/api/v1/datasources/actions/testConnection","requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiTestConnectionRequestDTO"}}},"required":true},"responses":{"202":{"description":"Accepted","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Test datasource connection","tags":["Datasources"]}}}}
```

## Get status for async connection test

> This endpoint allows you to check the status of an asynchronous connection test operation.\
> \
> Use the operation ID returned by the test connection endpoint to poll for its current state.\
> \
> \## Authorization\
> \
> Any authenticated Soda Cloud user in your organization may poll the status of a connection test operation.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiTestConnectionStatusResponse":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"started":{"type":"string","format":"date-time"},"state":{"type":"object","$ref":"#/components/schemas/PublicApiTestConnectionStateDTO"}},"required":["id","state"]},"PublicApiTestConnectionStateDTO":{"type":"string","enum":["queued","processing","completed","failed","cancelled"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/actions/testConnection/{operationId}":{"get":{"description":"This endpoint allows you to check the status of an asynchronous connection test operation.\n\nUse the operation ID returned by the test connection endpoint to poll for its current state.\n\n## Authorization\n\nAny authenticated Soda Cloud user in your organization may poll the status of a connection test operation.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"GET/api/v1/datasources/actions/testConnection/{operationId}","parameters":[{"in":"path","name":"operationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiTestConnectionStatusResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get status for async connection test","tags":["Datasources"]}}}}
```

## Get the default datasource responsibilities

> This endpoint returns the organization-wide defaults that Soda applies to every newly created datasource: the datasource role granted to the datasource owner, and the users and user groups that are assigned a datasource role automatically.\
> \
> Assignments whose role has since been deleted are left out, because they no longer grant anything.\
> \
> Datasource roles must be enabled for your organization; if they are not, this endpoint answers 400.\
> \
> \## Authorization\
> \
> Only users with the \*\*Manage organization settings\*\* permission can read the default datasource responsibilities.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_ORGANISATION\_SETTINGS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDatasourceDefaultResponsibilitiesResponse":{"type":"object","properties":{"assignments":{"type":"array","description":"Users and user groups that are granted a datasource role on every newly created datasource.","items":{"type":"object","$ref":"#/components/schemas/DatasourceDefaultAssignmentContentDTO"}},"defaultOwnerRole":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO","description":"Datasource role granted to the owner of a newly created datasource. Null when no role is configured."}},"required":["assignments"]},"DatasourceDefaultAssignmentContentDTO":{"type":"object","properties":{"role":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/ResponsibilityTypeDTO"},"userGroupId":{"type":"string"},"userId":{"type":"string"}},"required":["role","type"]},"DatasourceRoleContentDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"id":{"type":"string"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["id","name"]},"ResponsibilityTypeDTO":{"type":"string","enum":["user","userGroup"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/defaultResponsibilities":{"get":{"description":"This endpoint returns the organization-wide defaults that Soda applies to every newly created datasource: the datasource role granted to the datasource owner, and the users and user groups that are assigned a datasource role automatically.\n\nAssignments whose role has since been deleted are left out, because they no longer grant anything.\n\nDatasource roles must be enabled for your organization; if they are not, this endpoint answers 400.\n\n## Authorization\n\nOnly users with the **Manage organization settings** permission can read the default datasource responsibilities.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_ORGANISATION_SETTINGS to execute this call.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"GET/api/v1/datasources/defaultResponsibilities","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDefaultResponsibilitiesResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get the default datasource responsibilities","tags":["Datasources"]}}}}
```

## Update the default datasource responsibilities

> This endpoint updates the organization-wide defaults that Soda applies to every newly created datasource.\
> \
> \*\*Note\*\*: \`assignments\` fully replaces the current list, so send every assignment you want to keep. Leave it out to keep the list that is configured now, or send an empty list to remove every assignment. Leaving out \`defaultOwnerRoleId\` keeps the role that is configured now; changing it also repoints the owner permissions Soda manages on the datasources that already exist.\
> \
> Existing datasources keep the responsibilities they already have, apart from that owner role.\
> \
> Datasource roles must be enabled for your organization; if they are not, this endpoint answers 400.\
> \
> \## Authorization\
> \
> Only users with the \*\*Manage organization settings\*\* permission can update the default datasource responsibilities.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_ORGANISATION\_SETTINGS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiUpdateDatasourceDefaultResponsibilitiesRequestDTO":{"type":"object","properties":{"assignments":{"type":"array","description":"Replaces the whole list of default assignments. Leave it out to keep the assignments that are configured now, or send an empty list to remove all of them.","items":{"type":"object","$ref":"#/components/schemas/DatasourceDefaultAssignmentRequestDTO"}},"defaultOwnerRoleId":{"type":"string","description":"Id of the datasource role to grant to the owner of a newly created datasource. Leave it out to keep the role that is configured now."}}},"DatasourceDefaultAssignmentRequestDTO":{"type":"object","properties":{"roleId":{"type":"string"},"type":{"type":"object","$ref":"#/components/schemas/ResponsibilityTypeDTO"},"userGroupId":{"type":"string"},"userId":{"type":"string"}},"required":["roleId","type"]},"ResponsibilityTypeDTO":{"type":"string","enum":["user","userGroup"]},"PublicApiDatasourceDefaultResponsibilitiesResponse":{"type":"object","properties":{"assignments":{"type":"array","description":"Users and user groups that are granted a datasource role on every newly created datasource.","items":{"type":"object","$ref":"#/components/schemas/DatasourceDefaultAssignmentContentDTO"}},"defaultOwnerRole":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO","description":"Datasource role granted to the owner of a newly created datasource. Null when no role is configured."}},"required":["assignments"]},"DatasourceDefaultAssignmentContentDTO":{"type":"object","properties":{"role":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/ResponsibilityTypeDTO"},"userGroupId":{"type":"string"},"userId":{"type":"string"}},"required":["role","type"]},"DatasourceRoleContentDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"id":{"type":"string"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["id","name"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/defaultResponsibilities":{"post":{"description":"This endpoint updates the organization-wide defaults that Soda applies to every newly created datasource.\n\n**Note**: `assignments` fully replaces the current list, so send every assignment you want to keep. Leave it out to keep the list that is configured now, or send an empty list to remove every assignment. Leaving out `defaultOwnerRoleId` keeps the role that is configured now; changing it also repoints the owner permissions Soda manages on the datasources that already exist.\n\nExisting datasources keep the responsibilities they already have, apart from that owner role.\n\nDatasource roles must be enabled for your organization; if they are not, this endpoint answers 400.\n\n## Authorization\n\nOnly users with the **Manage organization settings** permission can update the default datasource responsibilities.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_ORGANISATION_SETTINGS to execute this call.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"POST/api/v1/datasources/defaultResponsibilities","requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceDefaultResponsibilitiesRequestDTO"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDefaultResponsibilitiesResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Update the default datasource responsibilities","tags":["Datasources"]}}}}
```

## List datasource roles

> This endpoint enables you to gather information about the datasource roles available in your organization's Soda Cloud account. Use the datasource roles to manage access to individual datasources.\
> \
> This GET is a paginated API that uses the following parameters to request specific details:\
> \
> \- \`size\`: Supply an integer value between 10 and 100, inclusive. The default value is 100.\
> \
> \- \`page\`: Supply an integer value. The default value is 0.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Any Soda Cloud user in your organization may execute this query.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDatasourceRolesResponse":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO"}},"first":{"type":"boolean"},"last":{"type":"boolean"},"number":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int32"},"totalPages":{"type":"integer","format":"int32"}},"required":["content","first","last","number","size","totalElements","totalPages"]},"DatasourceRoleContentDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"id":{"type":"string"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["id","name"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/roles":{"get":{"description":"This endpoint enables you to gather information about the datasource roles available in your organization's Soda Cloud account. Use the datasource roles to manage access to individual datasources.\n\nThis GET is a paginated API that uses the following parameters to request specific details:\n\n- `size`: Supply an integer value between 10 and 100, inclusive. The default value is 100.\n\n- `page`: Supply an integer value. The default value is 0.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nAny Soda Cloud user in your organization may execute this query.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"GET/api/v1/datasources/roles","parameters":[{"in":"query","name":"page","schema":{"type":"integer","format":"int32"}},{"in":"query","name":"size","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceRolesResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"List datasource roles","tags":["Datasources"]}}}}
```

## Create a datasource role

> This endpoint allows you to create a new custom datasource role in your organization's Soda Cloud account. Datasource roles define a named set of permissions that control what actions users can perform on individual datasources, such as creating datasets, managing datasource settings, managing permissions, or deleting the datasource.\
> \
> Once created, the role can be assigned to users or user groups via the datasource responsibilities endpoints.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_ORGANISATION\_SETTINGS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDatasourceRoleRequestDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["name"]},"PublicApiCreateDatasourceRoleResponse":{"type":"object","properties":{"datasourceRole":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO"}},"required":["datasourceRole"]},"DatasourceRoleContentDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"id":{"type":"string"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["id","name"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/roles":{"post":{"description":"This endpoint allows you to create a new custom datasource role in your organization's Soda Cloud account. Datasource roles define a named set of permissions that control what actions users can perform on individual datasources, such as creating datasets, managing datasource settings, managing permissions, or deleting the datasource.\n\nOnce created, the role can be assigned to users or user groups via the datasource responsibilities endpoints.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_ORGANISATION_SETTINGS to execute this call.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"POST/api/v1/datasources/roles","requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceRoleRequestDTO"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiCreateDatasourceRoleResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Create a datasource role","tags":["Datasources"]}}}}
```

## Update a datasource role

> This endpoint allows you to update the name or permissions of an existing custom datasource role. Datasource roles define a named set of permissions that control what actions users can perform on individual datasources, such as creating datasets, managing datasource settings, managing permissions, or deleting the datasource.\
> \
> Changes apply immediately to all users and user groups assigned this role.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_ORGANISATION\_SETTINGS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDatasourceRoleRequestDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["name"]},"PublicApiUpdateDatasourceRoleResponse":{"type":"object","properties":{"datasourceRole":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO"}},"required":["datasourceRole"]},"DatasourceRoleContentDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"id":{"type":"string"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["id","name"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/roles/{roleId}":{"post":{"description":"This endpoint allows you to update the name or permissions of an existing custom datasource role. Datasource roles define a named set of permissions that control what actions users can perform on individual datasources, such as creating datasets, managing datasource settings, managing permissions, or deleting the datasource.\n\nChanges apply immediately to all users and user groups assigned this role.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_ORGANISATION_SETTINGS to execute this call.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"POST/api/v1/datasources/roles/{roleId}","parameters":[{"in":"path","name":"roleId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceRoleRequestDTO"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceRoleResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Update a datasource role","tags":["Datasources"]}}}}
```

## Delete a datasource role

> This endpoint allows you to delete a custom datasource role from your organization's Soda Cloud account. Datasource roles define a named set of permissions that control what actions users can perform on individual datasources, such as creating datasets, managing datasource settings, managing permissions, or deleting the datasource.\
> \
> Deletion is performed asynchronously and may take some time to complete.\
> \
> Deletion will fail if the role is still assigned to any datasource permissions or used in responsibility settings.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_ORGANISATION\_SETTINGS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDeleteDatasourceRoleResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/roles/{roleId}":{"delete":{"description":"This endpoint allows you to delete a custom datasource role from your organization's Soda Cloud account. Datasource roles define a named set of permissions that control what actions users can perform on individual datasources, such as creating datasets, managing datasource settings, managing permissions, or deleting the datasource.\n\nDeletion is performed asynchronously and may take some time to complete.\n\nDeletion will fail if the role is still assigned to any datasource permissions or used in responsibility settings.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Authorization\n\nUsers must have global role permission MANAGE_ORGANISATION_SETTINGS to execute this call.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"DELETE/api/v1/datasources/roles/{roleId}","parameters":[{"in":"path","name":"roleId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDeleteDatasourceRoleResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Delete a datasource role","tags":["Datasources"]}}}}
```

## Get a datasource

> This endpoint allows you to retrieve a specific datasource by its ID.\
> \
> A datasource that is being deleted returns \`400\` with error code \`resource\_in\_deletion\` until the deletion has finished, after which it returns \`404\`.\
> \
> \## Authorization\
> \
> Users with the \*\*View\*\* permission on the datasource can retrieve its details.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 1000 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiGetDatasourceResponse":{"type":"object","properties":{"datasource":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDTO"}}},"PublicApiDatasourceDTO":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"owner":{"type":"object","$ref":"#/components/schemas/UserContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceTypeDTO"},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"object","$ref":"#/components/schemas/ModelVersionDTO","description":"The Soda model version of the datasource: `3` or `4`."}}},"UserContentDTO":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"fullName":{"type":"string"},"lastName":{"type":"string"},"userId":{"type":"string"}},"required":["email","userId"]},"PublicApiDatasourceTypeDTO":{"type":"string","enum":["bigquery","mysql","mariadb","postgres","snowflake","dask","spark","sparkdf","redshift","duckdb","presto","oracle","athena","trino","dremio","vertica","denodo","db2","db2z","sqlserver","databricks","synapse","fabric","hana","salesforce"]},"ModelVersionDTO":{"type":"string","enum":["3","4"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}":{"get":{"description":"This endpoint allows you to retrieve a specific datasource by its ID.\n\nA datasource that is being deleted returns `400` with error code `resource_in_deletion` until the deletion has finished, after which it returns `404`.\n\n## Authorization\n\nUsers with the **View** permission on the datasource can retrieve its details.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n1000 requests/60 seconds","operationId":"GET/api/v1/datasources/{datasourceId}","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiGetDatasourceResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get a datasource","tags":["Datasources"]}}}}
```

## Update a datasource

> Updates the configuration of an existing contract (V4) datasource.\
> \
> Only the fields provided in the request body will be updated.\
> \
> Supplying \`ownerId\` transfers ownership of the datasource. Runner service users cannot own a datasource.\
> \
> \## Authorization\
> \
> Users with the \*\*Manage datasource settings\*\* permission on the datasource, or the organization-level \*\*Manage datasources and runners\*\* permission, can update its configuration.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 100 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiUpdateDatasourceRequestDTO":{"type":"object","properties":{"configurationFileContents":{"type":"string"},"label":{"type":"string"},"ownerId":{"type":"string"},"runnerId":{"type":"string"}}},"PublicApiUpdateDatasourceResponse":{"type":"object","properties":{"datasource":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDTO"}}},"PublicApiDatasourceDTO":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"owner":{"type":"object","$ref":"#/components/schemas/UserContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceTypeDTO"},"updatedAt":{"type":"string","format":"date-time"},"version":{"type":"object","$ref":"#/components/schemas/ModelVersionDTO","description":"The Soda model version of the datasource: `3` or `4`."}}},"UserContentDTO":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"fullName":{"type":"string"},"lastName":{"type":"string"},"userId":{"type":"string"}},"required":["email","userId"]},"PublicApiDatasourceTypeDTO":{"type":"string","enum":["bigquery","mysql","mariadb","postgres","snowflake","dask","spark","sparkdf","redshift","duckdb","presto","oracle","athena","trino","dremio","vertica","denodo","db2","db2z","sqlserver","databricks","synapse","fabric","hana","salesforce"]},"ModelVersionDTO":{"type":"string","enum":["3","4"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}":{"post":{"description":"Updates the configuration of an existing contract (V4) datasource.\n\nOnly the fields provided in the request body will be updated.\n\nSupplying `ownerId` transfers ownership of the datasource. Runner service users cannot own a datasource.\n\n## Authorization\n\nUsers with the **Manage datasource settings** permission on the datasource, or the organization-level **Manage datasources and runners** permission, can update its configuration.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n100 requests/60 seconds","operationId":"POST/api/v1/datasources/{datasourceId}","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceRequestDTO"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Update a datasource","tags":["Datasources"]}}}}
```

## Delete a datasource

> Deletes an existing datasource and all its associated resources.\
> \
> The deletion is performed asynchronously.\
> \
> \## Authorization\
> \
> Users with the \*\*Delete\*\* permission on the datasource, or the organization-level \*\*Manage datasources and runners\*\* permission, can delete it.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 10 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDeleteDatasourceResponse":{"type":"object","properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}":{"delete":{"description":"Deletes an existing datasource and all its associated resources.\n\nThe deletion is performed asynchronously.\n\n## Authorization\n\nUsers with the **Delete** permission on the datasource, or the organization-level **Manage datasources and runners** permission, can delete it.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n10 requests/60 seconds","operationId":"DELETE/api/v1/datasources/{datasourceId}","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDeleteDatasourceResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Delete a datasource","tags":["Datasources"]}}}}
```

## Get datasource configuration file contents

> This endpoint returns the connection configuration YAML currently stored for a datasource in your organization's Soda Cloud account.\
> \
> Use it to read the configuration before editing it: send the returned YAML, with your edits applied, as \`configurationFileContents\` to \`POST /api/v1/datasources/{datasourceId}\`. That update replaces the whole file, so starting from this response is what keeps the settings you do not want to change.\
> \
> Passwords and other credentials are stored as \`${secret.NAME}\` placeholders when the configuration was created with secrets, and those placeholders are what this endpoint returns. A configuration that was created with literal credentials returns them as they were stored.\
> \
> \## Authorization\
> \
> Users with the \*\*Manage datasource settings\*\* permission on the datasource, or the organization-level \*\*Manage datasources and runners\*\* permission, can retrieve its configuration file contents.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 1000 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiGetDatasourceConfigurationFileContentsResponse":{"type":"object","properties":{"configurationFileContents":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/configurationFileContents":{"get":{"description":"This endpoint returns the connection configuration YAML currently stored for a datasource in your organization's Soda Cloud account.\n\nUse it to read the configuration before editing it: send the returned YAML, with your edits applied, as `configurationFileContents` to `POST /api/v1/datasources/{datasourceId}`. That update replaces the whole file, so starting from this response is what keeps the settings you do not want to change.\n\nPasswords and other credentials are stored as `${secret.NAME}` placeholders when the configuration was created with secrets, and those placeholders are what this endpoint returns. A configuration that was created with literal credentials returns them as they were stored.\n\n## Authorization\n\nUsers with the **Manage datasource settings** permission on the datasource, or the organization-level **Manage datasources and runners** permission, can retrieve its configuration file contents.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n1000 requests/60 seconds","operationId":"GET/api/v1/datasources/{datasourceId}/configurationFileContents","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiGetDatasourceConfigurationFileContentsResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get datasource configuration file contents","tags":["Datasources"]}}}}
```

## Get datasource diagnostics warehouse configuration

> This endpoint allows you to retrieve the diagnostics warehouse configuration for a specific datasource in your organization's Soda Cloud account. The diagnostics warehouse collects scan-related data and securely forwards it to the customer's warehouse for storage and analysis.\
> \
> \`schema\` is the schema the diagnostics tables are created in. It is \`null\` when no schema was configured, in which case Soda creates and uses a default schema. When the destination is qualified with a database or catalog, \`schema\` reports the schema part of it; the qualifier is not exposed here, and is preserved when you set \`schema\` through the update endpoint.\
> \
> A datasource with no diagnostics warehouse configured returns \`{"enabled": false}\`, with every other field left out. It reads back the same way as a datasource whose diagnostics warehouse is turned off.\
> \
> \## Authorization\
> \
> Users with the \*\*View\*\* permission on the datasource can retrieve its diagnostics warehouse configuration.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 1000 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDatasourceDiagnosticsWarehouseResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"failedRowsConfiguration":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse_FailedRowsConfigurationDTO"},"reuseDatasource":{"type":"boolean"},"scanAndResultsConfiguration":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse_ScanAndResultsConfigurationDTO"},"schema":{"oneOf":[{"type":"string"},{"type":"null"}]},"tableNameTemplate":{"type":"string"}}},"PublicApiDatasourceDiagnosticsWarehouseResponse_FailedRowsConfigurationDTO":{"type":"object","properties":{"actionButton":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse_ActionButtonDTO"},"enabled":{"type":"boolean"},"exposeQueries":{"type":"boolean"},"failedRowSamples":{"type":"object","$ref":"#/components/schemas/FailedRowSamplesDTO"},"failedRowsCollectionStrategy":{"type":"object","$ref":"#/components/schemas/FailedRowsCollectionStrategyDTO"},"locationMessage":{"type":"string"},"maxRowCount":{"type":"integer","format":"int32"}}},"PublicApiDatasourceDiagnosticsWarehouseResponse_ActionButtonDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string"},"url":{"type":"string"}}},"FailedRowSamplesDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"sampleSize":{"type":"integer","format":"int32"}}},"FailedRowsCollectionStrategyDTO":{"type":"object","properties":{"maxRowCountOverride":{"type":"integer","format":"int32"},"threshold":{"type":"number"},"thresholdCondition":{"type":"object","$ref":"#/components/schemas/ThresholdConditionDTO"},"type":{"type":"object","$ref":"#/components/schemas/FailedRowsCollectionStrategyTypeDTO"}},"required":["threshold","thresholdCondition"]},"ThresholdConditionDTO":{"type":"string","enum":["greaterThan","lessThan"]},"FailedRowsCollectionStrategyTypeDTO":{"type":"string","enum":["useDefaultMaxRowCount","absolute","percentage"]},"PublicApiDatasourceDiagnosticsWarehouseResponse_ScanAndResultsConfigurationDTO":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/diagnosticsWarehouse":{"get":{"description":"This endpoint allows you to retrieve the diagnostics warehouse configuration for a specific datasource in your organization's Soda Cloud account. The diagnostics warehouse collects scan-related data and securely forwards it to the customer's warehouse for storage and analysis.\n\n`schema` is the schema the diagnostics tables are created in. It is `null` when no schema was configured, in which case Soda creates and uses a default schema. When the destination is qualified with a database or catalog, `schema` reports the schema part of it; the qualifier is not exposed here, and is preserved when you set `schema` through the update endpoint.\n\nA datasource with no diagnostics warehouse configured returns `{\"enabled\": false}`, with every other field left out. It reads back the same way as a datasource whose diagnostics warehouse is turned off.\n\n## Authorization\n\nUsers with the **View** permission on the datasource can retrieve its diagnostics warehouse configuration.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n1000 requests/60 seconds","operationId":"GET/api/v1/datasources/{datasourceId}/diagnosticsWarehouse","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get datasource diagnostics warehouse configuration","tags":["Datasources"]}}}}
```

## Update datasource diagnostics warehouse configuration

> This endpoint allows you to update the diagnostics warehouse configuration for a specific datasource in your organization's Soda Cloud account. The diagnostics warehouse collects scan-related data and securely stores it in your warehouse for storage and analysis.\
> \
> \## Schema\
> \
> The \`schema\` field sets the schema the diagnostics tables are created in, for every dataset of this datasource. Leave it out (or send an empty string) to let Soda create and use a default schema. Individual datasets can override it through \`schema\` on \`POST /api/v1/datasets/{datasetId}\` in their \`diagnosticsWarehouse\` block.\
> \
> This request replaces the stored configuration, so a field you leave out is cleared. Read the current values with \`GET /api/v1/datasources/{datasourceId}/diagnosticsWarehouse\` first if you only mean to change some of them.\
> \
> If the destination is qualified with a database or catalog, sending \`schema\` changes only the schema and keeps the qualifier, so reading the configuration and sending it back leaves the destination as it was.\
> \
> \## Table name template\
> \
> The \`tableNameTemplate\` field controls how diagnostic tables are named in the warehouse. Use the \`{dataset\_name}\` placeholder to include the source dataset name. For example, \`dwh\_{dataset\_name}\_failed\` produces table names like \`dwh\_orders\_failed\`.\
> \
> \## Authorization\
> \
> Users with the \*\*Manage datasource settings\*\* permission on the datasource, or the organization-level \*\*Manage datasources and runners\*\* permission, can update its diagnostics warehouse configuration.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 100 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO":{"type":"object","properties":{"configurationFileContents":{"type":"string"},"enabled":{"type":"boolean"},"failedRowsConfiguration":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO_FailedRowsConfigurationRequestDTO"},"reuseDatasource":{"type":"boolean"},"scanAndResultsConfiguration":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO_ScanAndResultsConfigurationRequestDTO"},"schema":{"type":"string"},"tableNameTemplate":{"type":"string"}}},"PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO_FailedRowsConfigurationRequestDTO":{"type":"object","properties":{"actionButton":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO_ActionButtonRequestDTO"},"enabled":{"type":"boolean"},"exposeQueries":{"type":"boolean"},"failedRowSamples":{"type":"object","$ref":"#/components/schemas/FailedRowSamplesDTO"},"failedRowsCollectionStrategy":{"type":"object","$ref":"#/components/schemas/FailedRowsCollectionStrategyDTO"},"locationMessage":{"type":"string"},"maxRowCount":{"type":"integer","format":"int32"}}},"PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO_ActionButtonRequestDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string"},"url":{"type":"string"}}},"FailedRowSamplesDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"sampleSize":{"type":"integer","format":"int32"}}},"FailedRowsCollectionStrategyDTO":{"type":"object","properties":{"maxRowCountOverride":{"type":"integer","format":"int32"},"threshold":{"type":"number"},"thresholdCondition":{"type":"object","$ref":"#/components/schemas/ThresholdConditionDTO"},"type":{"type":"object","$ref":"#/components/schemas/FailedRowsCollectionStrategyTypeDTO"}},"required":["threshold","thresholdCondition"]},"ThresholdConditionDTO":{"type":"string","enum":["greaterThan","lessThan"]},"FailedRowsCollectionStrategyTypeDTO":{"type":"string","enum":["useDefaultMaxRowCount","absolute","percentage"]},"PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO_ScanAndResultsConfigurationRequestDTO":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"PublicApiDatasourceDiagnosticsWarehouseResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"failedRowsConfiguration":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse_FailedRowsConfigurationDTO"},"reuseDatasource":{"type":"boolean"},"scanAndResultsConfiguration":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse_ScanAndResultsConfigurationDTO"},"schema":{"oneOf":[{"type":"string"},{"type":"null"}]},"tableNameTemplate":{"type":"string"}}},"PublicApiDatasourceDiagnosticsWarehouseResponse_FailedRowsConfigurationDTO":{"type":"object","properties":{"actionButton":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse_ActionButtonDTO"},"enabled":{"type":"boolean"},"exposeQueries":{"type":"boolean"},"failedRowSamples":{"type":"object","$ref":"#/components/schemas/FailedRowSamplesDTO"},"failedRowsCollectionStrategy":{"type":"object","$ref":"#/components/schemas/FailedRowsCollectionStrategyDTO"},"locationMessage":{"type":"string"},"maxRowCount":{"type":"integer","format":"int32"}}},"PublicApiDatasourceDiagnosticsWarehouseResponse_ActionButtonDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string"},"url":{"type":"string"}}},"PublicApiDatasourceDiagnosticsWarehouseResponse_ScanAndResultsConfigurationDTO":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/diagnosticsWarehouse":{"post":{"description":"This endpoint allows you to update the diagnostics warehouse configuration for a specific datasource in your organization's Soda Cloud account. The diagnostics warehouse collects scan-related data and securely stores it in your warehouse for storage and analysis.\n\n## Schema\n\nThe `schema` field sets the schema the diagnostics tables are created in, for every dataset of this datasource. Leave it out (or send an empty string) to let Soda create and use a default schema. Individual datasets can override it through `schema` on `POST /api/v1/datasets/{datasetId}` in their `diagnosticsWarehouse` block.\n\nThis request replaces the stored configuration, so a field you leave out is cleared. Read the current values with `GET /api/v1/datasources/{datasourceId}/diagnosticsWarehouse` first if you only mean to change some of them.\n\nIf the destination is qualified with a database or catalog, sending `schema` changes only the schema and keeps the qualifier, so reading the configuration and sending it back leaves the destination as it was.\n\n## Table name template\n\nThe `tableNameTemplate` field controls how diagnostic tables are named in the warehouse. Use the `{dataset_name}` placeholder to include the source dataset name. For example, `dwh_{dataset_name}_failed` produces table names like `dwh_orders_failed`.\n\n## Authorization\n\nUsers with the **Manage datasource settings** permission on the datasource, or the organization-level **Manage datasources and runners** permission, can update its diagnostics warehouse configuration.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n100 requests/60 seconds","operationId":"POST/api/v1/datasources/{datasourceId}/diagnosticsWarehouse","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceDiagnosticsWarehouseRequestDTO"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceDiagnosticsWarehouseResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Update datasource diagnostics warehouse configuration","tags":["Datasources"]}}}}
```

## Trigger datasource discovery

> This endpoint triggers a discovery scan on the specified datasource.\
> \
> Discovery scans detect new tables and schemas in the datasource. Use this to run discovery on-demand instead of waiting for the scheduled cron.\
> \
> The response includes a \`Location\` header and \`X-Soda-Scan-Id\` header identifying the triggered scan. Use the scan ID with the \*\*Get scan status\*\* endpoint to poll for completion.\
> \
> \## Authorization\
> \
> Users with the \*\*Manage datasource settings\*\* permission on the datasource, or the organization-level \*\*Manage datasources and runners\*\* permission, can trigger discovery on the datasource.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 10 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/discover":{"post":{"description":"This endpoint triggers a discovery scan on the specified datasource.\n\nDiscovery scans detect new tables and schemas in the datasource. Use this to run discovery on-demand instead of waiting for the scheduled cron.\n\nThe response includes a `Location` header and `X-Soda-Scan-Id` header identifying the triggered scan. Use the scan ID with the **Get scan status** endpoint to poll for completion.\n\n## Authorization\n\nUsers with the **Manage datasource settings** permission on the datasource, or the organization-level **Manage datasources and runners** permission, can trigger discovery on the datasource.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n10 requests/60 seconds","operationId":"POST/api/v1/datasources/{datasourceId}/discover","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","headers":{"Location":{"schema":{"type":"string"}},"X-Soda-Scan-Id":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Trigger datasource discovery","tags":["Datasources"]}}}}
```

## Onboard discovered datasets

> This endpoint triggers the asynchronous onboarding of discovered datasets for a datasource.\
> \
> Supply a list of discovered dataset IDs in the request body to onboard them as datasets.\
> \
> The response includes an onboarding ID that you can use to poll the status of the onboarding process.\
> \
> \## Authorization\
> \
> Users with the \*\*Create datasets\*\* permission on the datasource, or the organization-level \*\*Create new datasources and datasets\*\* permission, can onboard discovered datasets.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 10 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiOnboardDatasetsRequestDTO":{"type":"object","properties":{"discoveredDatasetIds":{"type":"array","items":{"type":"string"}}},"required":["discoveredDatasetIds"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/onboardDatasets":{"post":{"description":"This endpoint triggers the asynchronous onboarding of discovered datasets for a datasource.\n\nSupply a list of discovered dataset IDs in the request body to onboard them as datasets.\n\nThe response includes an onboarding ID that you can use to poll the status of the onboarding process.\n\n## Authorization\n\nUsers with the **Create datasets** permission on the datasource, or the organization-level **Create new datasources and datasets** permission, can onboard discovered datasets.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n10 requests/60 seconds","operationId":"POST/api/v1/datasources/{datasourceId}/onboardDatasets","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiOnboardDatasetsRequestDTO"}}},"required":true},"responses":{"202":{"description":"Accepted","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Onboard discovered datasets","tags":["Datasources"]}}}}
```

## Get status for async dataset onboarding process

> This endpoint allows you to check the status of an asynchronous dataset onboarding operation.\
> \
> Use the operation ID returned by the onboard datasets endpoint to poll for its current state.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiOnboardDatasetsStatusResponse":{"type":"object","properties":{"ended":{"type":"string","format":"date-time"},"id":{"type":"string"},"message":{"type":"string"},"started":{"type":"string","format":"date-time"},"state":{"type":"object","$ref":"#/components/schemas/PublicApiOnboardingStateDTO"}},"required":["id","state"]},"PublicApiOnboardingStateDTO":{"type":"string","enum":["queued","processing","completed","failed","cancelled"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/onboardDatasets/{operationId}":{"get":{"description":"This endpoint allows you to check the status of an asynchronous dataset onboarding operation.\n\nUse the operation ID returned by the onboard datasets endpoint to poll for its current state.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n60 requests/60 seconds","operationId":"GET/api/v1/datasources/{datasourceId}/onboardDatasets/{operationId}","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}},{"in":"path","name":"operationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiOnboardDatasetsStatusResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Get status for async dataset onboarding process","tags":["Datasources"]}}}}
```

## List datasource responsibilities

> This endpoint enables you to gather information about the user and user groups permissions assigned to a datasource, and their associated roles in your organization's Soda Cloud account.\
> \
> This GET is a paginated API that uses the following parameters to request specific details:\
> \
> \- \`size\`: Supply an integer value between 1 and 100, inclusive. The default value is 100.\
> \
> \- \`page\`: Supply an integer value. The default value is 0.\
> \
> \## Authorization\
> \
> Soda only returns the datasource responsibilities to which the user has \*\*View datasource\*\* permissions. Soda Cloud Admins have access to all datasource responsibilities.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 100 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiDatasourceResponsibilitiesResponse":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/DatasourceResponsibilityContentDTO"}},"first":{"type":"boolean"},"last":{"type":"boolean"},"number":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int32"},"totalPages":{"type":"integer","format":"int32"}},"required":["content","first","last","number","size","totalElements","totalPages"]},"DatasourceResponsibilityContentDTO":{"type":"object","properties":{"managed":{"type":"boolean"},"role":{"type":"object","$ref":"#/components/schemas/DatasourceRoleContentDTO"},"type":{"type":"object","$ref":"#/components/schemas/ResponsibilityTypeDTO"},"userGroupId":{"type":"string"},"userId":{"type":"string"}},"required":["managed","role","type"]},"DatasourceRoleContentDTO":{"type":"object","properties":{"createDatasets":{"type":"boolean"},"deleteDatasource":{"type":"boolean"},"id":{"type":"string"},"manageDatasourceSettings":{"type":"boolean"},"managePermissions":{"type":"boolean"},"name":{"type":"string"},"viewDatasource":{"type":"boolean"}},"required":["id","name"]},"ResponsibilityTypeDTO":{"type":"string","enum":["user","userGroup"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/responsibilities":{"get":{"description":"This endpoint enables you to gather information about the user and user groups permissions assigned to a datasource, and their associated roles in your organization's Soda Cloud account.\n\nThis GET is a paginated API that uses the following parameters to request specific details:\n\n- `size`: Supply an integer value between 1 and 100, inclusive. The default value is 100.\n\n- `page`: Supply an integer value. The default value is 0.\n\n## Authorization\n\nSoda only returns the datasource responsibilities to which the user has **View datasource** permissions. Soda Cloud Admins have access to all datasource responsibilities.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n100 requests/60 seconds","operationId":"GET/api/v1/datasources/{datasourceId}/responsibilities","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer","format":"int32"}},{"in":"query","name":"size","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceResponsibilitiesResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"List datasource responsibilities","tags":["Datasources"]}}}}
```

## Update datasource responsibilities

> This endpoint enables you to update the user and user groups permissions and their associated roles for a datasource in your organization's Soda Cloud account.\
> \
> \*\*Note\*\*: This API fully replaces the existing responsibilities. The entire list of responsibilities must be provided in the request, including both new and existing entries, as any omissions will result in their removal.\
> \
> \## Authorization\
> \
> Only users with \*\*Manage datasource responsibilities\*\* permission can update datasource responsibilities. Soda Cloud Admins have permission to update all datasources responsibilities.The Response of this call, when successful, is \`201\` and contains header \`Location\` which identify the URL where the responsibilities will eventually become available.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint accepts authentication via API keys in the \`Basic\` authentication header, or a pre-authenticated token in HTTP cookie \`token\`. Cookie sessions extend automatically on each request.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 100 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v4","version":"v1"},"tags":[{"description":"Soda Cloud API Datasource Endpoints","name":"Datasources"}],"servers":[{"description":"Cloud EU","url":"https://cloud.soda.io"},{"description":"Cloud US","url":"https://cloud.us.soda.io"}],"security":[{"basicAuthApiKey":[]},{"cookieToken":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"},"cookieToken":{"in":"cookie","name":"token","type":"apiKey"}},"schemas":{"PublicApiUpdateDatasourceResponsibilitiesRequestDTO":{"type":"object","properties":{"responsibilities":{"type":"array","items":{"type":"object","$ref":"#/components/schemas/DatasourceResponsibilityContentRequestDTO"}}},"required":["responsibilities"]},"DatasourceResponsibilityContentRequestDTO":{"type":"object","properties":{"roleId":{"type":"string"},"type":{"type":"object","$ref":"#/components/schemas/ResponsibilityTypeDTO"},"userGroupId":{"type":"string"},"userId":{"type":"string"}},"required":["roleId","type"]},"ResponsibilityTypeDTO":{"type":"string","enum":["user","userGroup"]},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/datasources/{datasourceId}/responsibilities":{"post":{"description":"This endpoint enables you to update the user and user groups permissions and their associated roles for a datasource in your organization's Soda Cloud account.\n\n**Note**: This API fully replaces the existing responsibilities. The entire list of responsibilities must be provided in the request, including both new and existing entries, as any omissions will result in their removal.\n\n## Authorization\n\nOnly users with **Manage datasource responsibilities** permission can update datasource responsibilities. Soda Cloud Admins have permission to update all datasources responsibilities.The Response of this call, when successful, is `201` and contains header `Location` which identify the URL where the responsibilities will eventually become available.\n\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint accepts authentication via API keys in the `Basic` authentication header, or a pre-authenticated token in HTTP cookie `token`. Cookie sessions extend automatically on each request.\n\n## Tags\n\n`Datasources`\n\n## Rate limiting\n\n100 requests/60 seconds","operationId":"POST/api/v1/datasources/{datasourceId}/responsibilities","parameters":[{"in":"path","name":"datasourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/PublicApiUpdateDatasourceResponsibilitiesRequestDTO"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"summary":"Update datasource responsibilities","tags":["Datasources"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.soda.io/reference/soda-apis/rest-api/datasources.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
