Get Data Source
client.DataSources.Get(ctx, dataSourceID) (*DataSource, error)
GET/api/v1/data-sources/{data_source_id}
Get a data source by ID.
ReturnsExpand Collapse
type DataSource struct{…}
type DataSource struct{…}
Schema for a data source.
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
Get Data Source
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"),
)
dataSource, err := client.DataSources.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dataSource.ID)
}
{
"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"
}
}