# 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).\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint enforces authentication using the API keys you provide in the \`Basic\` authentication header.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_DATASOURCES\_AND\_AGENTS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 60 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v3","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":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"}},"schemas":{"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"},"type":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceTypeDTO"},"updatedAt":{"type":"string","format":"date-time"}}},"PublicApiDatasourceTypeDTO":{"type":"string","enum":["bigquery","mysql","postgres","snowflake","dask","spark","sparkdf","redshift","duckdb","presto","oracle","athena","trino","dremio","vertica","denodo","db2","sqlserver","databricks","synapse","fabric"]},"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## Authentication\n\nUser authentication required: `true`\n\nThis endpoint enforces authentication using the API keys you provide in the `Basic` authentication header.\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\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"}}],"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"]}}}}
```

## Get a datasource

> This endpoint allows you to retrieve a specific datasource by its ID.\
> \
> \## Authentication\
> \
> User authentication required: \`true\`\
> \
> This endpoint enforces authentication using the API keys you provide in the \`Basic\` authentication header.\
> \
> \## Authorization\
> \
> Users must have global role permission MANAGE\_DATASOURCES\_AND\_AGENTS to execute this call.\
> \
> \## Tags\
> \
> \`Datasources\`\
> \
> \## Rate limiting\
> \
> 1000 requests/60 seconds

```json
{"openapi":"3.1.0","info":{"title":"Soda Cloud API v3","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":[]}],"components":{"securitySchemes":{"basicAuthApiKey":{"scheme":"basic","type":"http"}},"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"},"type":{"type":"object","$ref":"#/components/schemas/PublicApiDatasourceTypeDTO"},"updatedAt":{"type":"string","format":"date-time"}}},"PublicApiDatasourceTypeDTO":{"type":"string","enum":["bigquery","mysql","postgres","snowflake","dask","spark","sparkdf","redshift","duckdb","presto","oracle","athena","trino","dremio","vertica","denodo","db2","sqlserver","databricks","synapse","fabric"]},"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\n## Authentication\n\nUser authentication required: `true`\n\nThis endpoint enforces authentication using the API keys you provide in the `Basic` authentication header.\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\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"]}}}}
```
