Learn how to create and configure connectors programmatically
Prepare your request
Prepare your ConnectorSpecificConfig
ConnectorSpecificConfig
that is used to initialize the specific Connector class.
To find the correct configuration, find your relevant Connector in backend/onyx/connectors/
.For Jira, since we’re indexing a selection of projects, rather than all projects, we’ll need to specify jira_base_url
, project_key
, and optionally comment_email_blacklist
.ConnectorSpecificConfig
are the same fields you fill out in the Admin Dashboard when creating a Connector.Prepare your Connector payload
ConnectorSpecificConfig
, we also need to satisfy the schema for the ConnectorUpdateRequest
object.
See Core Concepts: Connectors for more details.In this example, we’ll set the access_type
, name
, source
, input_type
, refresh_freq
, and prune_freq
.Make the request
Find your Credentials for the Connector
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.Associate the Credential with the Connector
Connector
is not fully created and you will not see it in the Admin Dashboard!