List data sources for a given project. If project_id is not provided, uses the default project.
ParametersExpand Collapse
ReturnsExpand Collapse
Component DataSourceComponentUnion
Component DataSourceComponentUnion
Component that implements the data source
One of the following:
type CloudAzStorageBlobDataSource struct{…}
type CloudAzStorageBlobDataSource struct{…}
type CloudSharepointDataSource struct{…}
type CloudSharepointDataSource struct{…}
ExcludePathPatterns []stringoptional
ExcludePathPatterns []stringoptional
List of regex patterns for file paths to exclude. Files whose paths (including filename) match any pattern will be excluded. Example: ['/temp/', '/backup/', '.git/', '.tmp$', '^~']
type CloudConfluenceDataSource struct{…}
type CloudConfluenceDataSource struct{…}
type CloudJiraDataSource struct{…}
type CloudJiraDataSource struct{…}
type CloudJiraDataSourceV2 struct{…}
type CloudJiraDataSourceV2 struct{…}
type CloudBoxDataSource struct{…}
type CloudBoxDataSource struct{…}
AuthenticationMechanism CloudBoxDataSourceAuthenticationMechanism
AuthenticationMechanism CloudBoxDataSourceAuthenticationMechanism
The type of authentication to use (Developer Token or CCG)
ClientID stringoptional
ClientID stringoptional
Box API key used for identifying the application the user is authenticating with
Version metadata for the data source
ReaderVersion DataSourceReaderVersionMetadataReaderVersionoptional
ReaderVersion DataSourceReaderVersionMetadataReaderVersionoptional
List Data Sources
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/llamacloud-prod-go"
"github.com/stainless-sdks/llamacloud-prod-go/option"
)
func main() {
client := llamacloudprod.NewClient(
option.WithAPIKey("My API Key"),
)
dataSources, err := client.DataSources.List(context.TODO(), llamacloudprod.DataSourceListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dataSources)
}
[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"component": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"source_type": "S3",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"updated_at": "2019-12-27T18:11:19.117Z",
"version_metadata": {
"reader_version": "1.0"
}
}
]Returns Examples
[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"component": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"source_type": "S3",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"updated_at": "2019-12-27T18:11:19.117Z",
"version_metadata": {
"reader_version": "1.0"
}
}
]