POST
/
api
/
index
/
v1
/
getdatasourceconfig
from glean import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:

    res = g_client.indexing.datasources.retrieve_config(datasource="<value>")

    # Handle response
    print(res)
{
  "name": "<string>",
  "displayName": "<string>",
  "datasourceCategory": "UNCATEGORIZED",
  "urlRegex": "https://example-company.datasource.com/.*",
  "iconUrl": "<string>",
  "objectDefinitions": [
    {
      "name": "<string>",
      "displayLabel": "<string>",
      "docCategory": "UNCATEGORIZED",
      "propertyDefinitions": [
        {
          "name": "<string>",
          "displayLabel": "<string>",
          "displayLabelPlural": "<string>",
          "propertyType": "TEXT",
          "uiOptions": "NONE",
          "hideUiFacet": true,
          "uiFacetOrder": 123,
          "skipIndexing": true,
          "group": "<string>"
        }
      ],
      "propertyGroups": [
        {
          "name": "<string>",
          "displayLabel": "<string>"
        }
      ],
      "summarizable": true
    }
  ],
  "suggestionText": "<string>",
  "homeUrl": "<string>",
  "crawlerSeedUrls": [
    "<string>"
  ],
  "iconDarkUrl": "<string>",
  "hideBuiltInFacets": [
    "TYPE"
  ],
  "canonicalizingURLRegex": [
    {
      "matchRegex": "<string>",
      "rewriteRegex": "<string>"
    }
  ],
  "canonicalizingTitleRegex": [
    {
      "matchRegex": "<string>",
      "rewriteRegex": "<string>"
    }
  ],
  "redlistTitleRegex": "<string>",
  "connectorType": "API_CRAWL",
  "quicklinks": [
    {
      "name": "<string>",
      "shortName": "<string>",
      "url": "<string>",
      "iconConfig": {
        "color": "#343CED",
        "key": "person_icon",
        "iconType": "GLYPH",
        "name": "user"
      },
      "id": "<string>",
      "scopes": [
        "APP_CARD"
      ]
    }
  ],
  "renderConfigPreset": "<string>",
  "aliases": [
    "<string>"
  ],
  "isOnPrem": true,
  "trustUrlRegexForViewActivity": true,
  "includeUtmSource": true,
  "stripFragmentInCanonicalUrl": true,
  "identityDatasourceName": "<string>",
  "productAccessGroup": "<string>",
  "isUserReferencedByEmail": true,
  "isEntityDatasource": false,
  "isTestDatasource": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Describes the request body of the /getdatasourceconfig API call

Response

200
application/json
OK

Structure describing config properties of a custom datasource