SharePoint API Configuration
Request
POST https://api.fivetran.com/v1/connections
{
"group_id": "group_id",
"service": "share_point",
"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"
},
"config": {
"access_type": "CUSTOM_APP | SPECIFIC_SITES | ALL_SITES",
"file_handling": "structured",
"quote_character_enabled": true,
"prefix": "folder_link_url",
"pattern": "file_pattern",
"json_delivery_mode": "Packed | Unpacked",
"skip_after": 0,
"quote_char": "string",
"skip_before": 0,
"empty_header": true,
"sync_permissions": true,
"delimiter": "|",
"file_type": "tsv | xml | csv | spreadsheet | json | jsonl | avro | parquet",
"on_error": "fail | skip",
"archive_pattern": "regex_pattern",
"append_file_option": "upsert_file",
"escape_char": "escape_char",
"line_separator": ";",
"null_sequence": "string",
"is_single_table_mode": true,
"share_url": "target_share_url",
"files": [
{
"file_pattern": "string",
"table_name": "string",
"archive_pattern": "string"
}
],
"compression": "zip | gz | tar_gz | tar | infer | gzip | uncompressed | bz2 | tar_bz2",
"schema": "schema_name",
"table_group_name": "string"
},
"auth": {
"tenant_id": "my_tenand_id",
"refresh_token": "my_refresh_token",
"client_access": {
"client_secret": "my_client_secret",
"client_id": "my_client_id"
}
}
}
Config parameters
Name | Description |
---|---|
access_type | Access Type |
file_handling | Files will be processed and synced according to the selected file handling option. Supported values:structured - (Default) Extract structured data into destination tables for analysis. Commonly used.unstructured - Replicate files in their original format. Best for PDFs, images, and other unstructured content. Learn more about unstructured file replication in our documentation.. |
quote_character_enabled | If you don’t want to use an enclosing character while processing the files, set the value to false. By default, the value is set to true and is considered " as quote character. |
prefix | All files and folders under this folder path link will be searched for files to sync. This can be any shared folder link. |
pattern | All files in your search path matching this regular expression will be synced. |
json_delivery_mode | Control how your JSON data is delivered into your destination |
skip_after | We will skip over the number of lines specified at the end so as to not introduce aberrant data into your destination. |
quote_char | You can specify the enclosing character used in your CSVs here. Fivetran will consider " as the quote character if this field is empty and quote_character_enabled is set to true. |
skip_before | We will skip over the number of lines specified before syncing data. |
empty_header | Optional. If your CSV generating software doesn't provide header line for the documents, Fivetran can generate the generic column names and sync data rows with them. |
sync_permissions | Optional. Set to true to sync per-user file access permissions to control visibility in downstream applications. |
delimiter | You can specify the delimiter that your CSVs use here. Fivetran generally tries to infer the delimiter, but in some cases this is impossible. |
file_type | If your files are saved with improper extensions, you can force them to be synced as the selected file type. |
on_error | If you know that your files contain some errors, you can choose to have poorly formatted lines skipped. We recommend leaving the value as fail unless you are certain that you have undesirable, malformed data. |
archive_pattern | Files inside of compressed archives with filenames matching this regular expression will be synced. |
append_file_option | If you know that the source completely over-writes the same file with new data, you can append the changes instead of upserting based on filename and line number. |
escape_char | If your CSV generator follows non-standard rules for escaping quotation marks, you can set the escape character here. |
line_separator | You can specify the custom line separator for your CSV files. The line separator is used in files to separate one row from the next. |
null_sequence | If your CSVs use a special value indicating null, you can specify it here. |
is_single_table_mode | Allows the creation of connector using Merge Mode strategy. |
share_url | Your SharePoint folder URL. You can find the folder URL by following the steps mentioned here. |
files | Mapped file name patterns to a destination table. |
files[0].file_pattern | All files in your search path matching this regular expression will be synced per table. |
files[0].table_name | All files matching the above pattern will be synced to this table. |
files[0].archive_pattern | All Files inside of compressed archives with filenames matching this regular expression will be synced. |
compression | The compression format is used to let Fivetran know that even files without a compression extension should be decompressed using the selected compression format. |
schema (required) | Destination schema name. Schema name is permanent and cannot be changed after connection creation |
table_group_name (required) | Combined with the schema to form the Fivetran connection name <schema>.<table_group_name> . Lets you create multiple Merge Mode connections per schema. |
Authorization
There are two ways to authorize this connector type:
- By specifying the values for the
client_access
andrefresh_token
parameters in theauth
section.POST https://api.fivetran.com/v1/connections
{ "service": "share_point", "group_id": "group_id", "auth": { "client_access": { "client_secret": "my_client_secret", "client_id": "my_client_id" }, "refresh_token": "my_refresh_token" } }
Auth Parameters
Name Description refresh_token
The long-lived Refresh token carries the information necessary to get a new access token for API resources. client_access
client_access.client_secret
Client Secret
of your Microsoft client application.client_access.client_id
Client ID
of your Microsoft client application.It is recommended to use this authorization with theCUSTOM_APP
access type. By using the Connect Card or the Fivetran dashboard.