Connector management needs a vector database. On deployments running with
DISABLE_VECTOR_DB set (Onyx Lite),
the /manage/admin/connector endpoints answer with 501.Guide
Skip to the Full Code section if you don’t want the step-by-step guide. In this example, we’ll automate creating Jira Connectors for a selection of projects. You will need an API key that can manage connectors. Its service account must be in the Admin group, or in a group granting Manage Connectors & Document Sets. Every request in this guide is gated onmanage:connectors.
A full-access Personal Access Token from a user with that permission also works. A limited-access token does not,
because no token scope grants manage:connectors.
See Understanding Permissions.
1
Prepare your request
2
Prepare your ConnectorSpecificConfig
Each Connector type has a different Leave
ConnectorSpecificConfig. To find the correct configuration,
find your relevant Connector in
backend/onyx/connectors/.For Jira, we index a selection of projects rather than everything, so we set jira_base_url and project_key.
comment_email_blacklist is optional.JSON
project_key and jql_query empty to index everything.
Set jql_query instead of project_key to scope the connector with a JQL query.
Issues that carry a label in labels_to_skip are not indexed.The
ConnectorSpecificConfig fields are the same fields you fill out in the Admin Panel when you create a
Connector.3
Prepare your Connector payload
In addition to the
ConnectorSpecificConfig,
we also need to satisfy the schema for the ConnectorUpdateRequest object. See Core Concepts:
Connectors for more details.4
Make the request
5
Find your Credentials for the Connector
The easiest way to create a Credential is the Add Connector flow in Admin Panel > Connectors.
Credentials created this way are reusable across Connectors of the same source.Certain Connectors, such as the File and Web connectors, do not need a Credential.
credential_id: 0 is a default empty Credential you can use for these Connectors.To list your Credentials, you can use the GET manage/admin/credential endpoint.6
Associate the Credential with the Connector
If you do not do this step, your
Connector is not fully created and you will not see it in the Admin Panel!name and access_type are required. Optional fields: groups (user group IDs that manage the pair)
and auto_sync_options (settings for permission sync, when access_type is sync or sync_restricted).