from glean import Glean, models
import os


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

    g_client.indexing.datasources.add(name="<value>", url_regex="https://example-company.datasource.com/.*", quicklinks=[
        {
            "icon_config": {
                "color": "#343CED",
                "key": "person_icon",
                "icon_type": models.IconType.GLYPH,
                "name": "user",
            },
        },
        {
            "icon_config": {
                "color": "#343CED",
                "key": "person_icon",
                "icon_type": models.IconType.GLYPH,
                "name": "user",
            },
        },
    ])

    # Use the SDK ...

Authorizations

Authorization
string
header
required

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

Body

application/json

Structure describing config properties of a custom datasource

Response

200

OK