GitHub API Configuration
Request
POST https://api.fivetran.com/v1/connections
{ "group_id": "group_id", "service": "github", "trust_certificates": true, "trust_fingerprints": true, "run_setup_tests": true, "paused": false, "pause_after_trial": false, "sync_frequency": 1440, "data_delay_sensitivity": "NORMAL", "data_delay_threshold": 0, "daily_sync_time": "14:00", "schedule_type": "auto", "connect_card_config": { "redirect_uri": "https://your.site/path", "hide_setup_guide": true }, "proxy_agent_id": "proxy_agent_id", "private_link_id": "private_link_id", "networking_method": "Directly", "hybrid_deployment_agent_id": "hybrid_deployment_agent_id", "destination_configuration": { "virtual_warehouse": "virtual_warehouse" }, "destination_schema_names": "SOURCE_NAMING", "config": { "sync_mode": "SpecificRepositories | AllRepositories", "use_webhooks": true, "host_url": "github.mycompany.com/api/v3", "pats": [ "string" ], "repositories": [ "string" ], "private_key": "string", "auth_mode": "JWT | PersonalAccessToken | OAuth", "client_id": "string", "username": "string", "schema": "schema_name" } }
Config parameters
| Name | Description |
|---|---|
sync_mode | Whether to sync all repositories or specific repositories. |
use_webhooks | Set to true to capture deletes. |
host_url | The GHES instance host address. Only for on-premises installations. |
pats | The Personal Access Tokens. |
repositories | Specific Repository IDs to sync. Must be populated if syncMode is set to SpecificRepositories. |
private_key | Your Private Key |
auth_mode | Authorization type. |
client_id | GitHub App Client ID |
username | Login of your GitHub profile. |
schema (required) | Destination schema name. Schema name is permanent and cannot be changed after connection creation |
Authorization
There are three ways to authorize this connector type:
- Personal Access Tokens: By specifying the
auth_modeas"PersonalAccessToken"and the value for thepatsparameter in the request.POST https://api.fivetran.com/v1/connections{ "service": "github", "group_id": "group_id", "config": { "pats": [ "string" ], "auth_mode": "PersonalAccessToken" } } - GitHub App (JWT): By specifying the
auth_modeas"JWT"and the values for theclient_idandprivate_keyparameters in the request.POST https://api.fivetran.com/v1/connections{ "service": "github", "group_id": "group_id", "config": { "client_id": "string", "private_key": "string", "auth_mode": "JWT" } } By using the Connect Card or the Fivetran dashboard.