Datasource Config
Gather information about the datasource's config.
Sample Request
- cURL
- Python
curl -X POST https://customer-be.glean.com/api/index/v1/getdatasourceconfig \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type : application/json' \
-d '{
"datasource": "gleantest"
}'
from glean_indexing_api_client.api import datasources_api
from glean_indexing_api_client.model.get_datasource_config_request import GetDatasourceConfigRequest
from glean_indexing_api_client.model.custom_datasource_config import CustomDatasourceConfig
from pprint import pprint
# Please refer to the Getting Started page for more details on how to setup api_client
datasource_api = datasources_api.DatasourcesApi(api_client)
get_datasource_config_request = GetDatasourceConfigRequest(
datasource="gleantest"
)
try:
api_response = datasource_api.getdatasourceconfig_post(get_datasource_config_request)
pprint(api_response)
except glean_indexing_api_client.ApiException as e:
print("Exception when calling DatasourcesApi->getdatasourceconfig_post: %s\n" % e)
Sample Response
{
"name": "CUSTOM_GLEANTEST",
"displayName": "Glean Test Datasource",
"homeUrl": "https://www.gleantest.com",
"objectDefinitions": [
{
"name": "EngineeringDoc",
"propertyDefinitions": [
{
"name": "Org",
"displayLabel": "Organization",
"propertyType": "TEXT",
"uiOptions": "SEARCH_RESULT",
"hideUiFacet": false
}
]
}
],
"urlRegex": "https://www.gleantest.com/.*",
"datasourceCategory": "PUBLISHED_CONTENT",
"isOnPrem": false,
"isUserReferencedByEmail": true,
"isEntityDatasource": false,
"isTestDatasource": false
}
/getdatasourceconfig
endpoint returns the current state of the datasource config.- This can be used to double-check if the config is correct. If you need to make any changes to the config, you can use the
/adddatasource
endpoint again to override the previous config.