Indexing API/Debugging
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.api_client import Glean
import os
with Glean(
api_token=os.getenv("GLEAN_INDEXING_API_TOKEN", ""),
server_url=os.getenv("GLEAN_SERVER_URL", ""),
) as client:
try:
res = client.indexing.datasources.retrieve_config(datasource="gleantest")
print(res)
except Exception as e:
print(f"Exception when getting datasource config: {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
}
/getdatasourceconfigendpoint 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
/adddatasourceendpoint again to override the previous config.