Create Smart Source
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/smart-sources \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"custom_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"is_active": true,
"external_id_field": "",
"api": {
"api_url": "<string>",
"http_method": "GET",
"request_headers": {},
"request_body_template": {},
"auth_type": "none",
"auth_credential": "<string>",
"auth_header_name": "",
"response_data_path": "",
"next_page_path": "",
"field_mappings": [
{
"source_field": "<string>",
"target_column": "<string>",
"transform": "<string>"
}
]
},
"s3": {
"s3_bucket": "<string>",
"s3_prefix": "",
"s3_region": "eu-central-1",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_file_pattern": "*",
"extraction_prompt_override": ""
},
"sharepoint": {
"sharepoint_tenant_id": "",
"sharepoint_client_id": "",
"sharepoint_client_secret": "<string>",
"sharepoint_site_id": "",
"sharepoint_drive_id": "",
"sharepoint_folder_id": "",
"sharepoint_folder_drive_id": "",
"sharepoint_folder_path": "",
"sharepoint_file_pattern": "*",
"extraction_prompt_override": ""
},
"schedule": {
"auto_sync_enabled": false,
"schedule_minutes": 123,
"schedule_time": "<string>",
"schedule_days": [
123
],
"schedule_timezone": "UTC"
}
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/smart-sources"
payload = {
"custom_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"is_active": True,
"external_id_field": "",
"api": {
"api_url": "<string>",
"http_method": "GET",
"request_headers": {},
"request_body_template": {},
"auth_type": "none",
"auth_credential": "<string>",
"auth_header_name": "",
"response_data_path": "",
"next_page_path": "",
"field_mappings": [
{
"source_field": "<string>",
"target_column": "<string>",
"transform": "<string>"
}
]
},
"s3": {
"s3_bucket": "<string>",
"s3_prefix": "",
"s3_region": "eu-central-1",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_file_pattern": "*",
"extraction_prompt_override": ""
},
"sharepoint": {
"sharepoint_tenant_id": "",
"sharepoint_client_id": "",
"sharepoint_client_secret": "<string>",
"sharepoint_site_id": "",
"sharepoint_drive_id": "",
"sharepoint_folder_id": "",
"sharepoint_folder_drive_id": "",
"sharepoint_folder_path": "",
"sharepoint_file_pattern": "*",
"extraction_prompt_override": ""
},
"schedule": {
"auto_sync_enabled": False,
"schedule_minutes": 123,
"schedule_time": "<string>",
"schedule_days": [123],
"schedule_timezone": "UTC"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_data_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '',
is_active: true,
external_id_field: '',
api: {
api_url: '<string>',
http_method: 'GET',
request_headers: {},
request_body_template: {},
auth_type: 'none',
auth_credential: '<string>',
auth_header_name: '',
response_data_path: '',
next_page_path: '',
field_mappings: [{source_field: '<string>', target_column: '<string>', transform: '<string>'}]
},
s3: {
s3_bucket: '<string>',
s3_prefix: '',
s3_region: 'eu-central-1',
s3_access_key: '<string>',
s3_secret_key: '<string>',
s3_file_pattern: '*',
extraction_prompt_override: ''
},
sharepoint: {
sharepoint_tenant_id: '',
sharepoint_client_id: '',
sharepoint_client_secret: '<string>',
sharepoint_site_id: '',
sharepoint_drive_id: '',
sharepoint_folder_id: '',
sharepoint_folder_drive_id: '',
sharepoint_folder_path: '',
sharepoint_file_pattern: '*',
extraction_prompt_override: ''
},
schedule: {
auto_sync_enabled: false,
schedule_minutes: 123,
schedule_time: '<string>',
schedule_days: [123],
schedule_timezone: 'UTC'
}
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/smart-sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"is_active": true,
"external_id_field": "<string>",
"api": {
"api_url": "<string>",
"http_method": "GET",
"request_headers": {},
"request_body_template": {},
"auth_type": "none",
"auth_credential": "<string>",
"auth_header_name": "",
"response_data_path": "",
"next_page_path": "",
"field_mappings": [
{
"source_field": "<string>",
"target_column": "<string>",
"transform": "<string>"
}
]
},
"s3": {
"s3_bucket": "<string>",
"s3_prefix": "",
"s3_region": "eu-central-1",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_file_pattern": "*",
"extraction_prompt_override": ""
},
"sharepoint": {
"sharepoint_tenant_id": "",
"sharepoint_client_id": "",
"sharepoint_client_secret": "<string>",
"sharepoint_site_id": "",
"sharepoint_drive_id": "",
"sharepoint_folder_id": "",
"sharepoint_folder_drive_id": "",
"sharepoint_folder_path": "",
"sharepoint_file_pattern": "*",
"extraction_prompt_override": ""
},
"schedule": {
"auto_sync_enabled": false,
"schedule_minutes": 123,
"schedule_time": "<string>",
"schedule_days": [
123
],
"schedule_timezone": "UTC"
},
"sync_status": "<string>",
"last_synced_at": "2023-11-07T05:31:56Z",
"last_auto_sync_at": "2023-11-07T05:31:56Z",
"next_sync_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Smart Sources
Create Smart Source
POST
/
api
/
v1
/
smart-sources
Create Smart Source
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/smart-sources \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"custom_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"is_active": true,
"external_id_field": "",
"api": {
"api_url": "<string>",
"http_method": "GET",
"request_headers": {},
"request_body_template": {},
"auth_type": "none",
"auth_credential": "<string>",
"auth_header_name": "",
"response_data_path": "",
"next_page_path": "",
"field_mappings": [
{
"source_field": "<string>",
"target_column": "<string>",
"transform": "<string>"
}
]
},
"s3": {
"s3_bucket": "<string>",
"s3_prefix": "",
"s3_region": "eu-central-1",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_file_pattern": "*",
"extraction_prompt_override": ""
},
"sharepoint": {
"sharepoint_tenant_id": "",
"sharepoint_client_id": "",
"sharepoint_client_secret": "<string>",
"sharepoint_site_id": "",
"sharepoint_drive_id": "",
"sharepoint_folder_id": "",
"sharepoint_folder_drive_id": "",
"sharepoint_folder_path": "",
"sharepoint_file_pattern": "*",
"extraction_prompt_override": ""
},
"schedule": {
"auto_sync_enabled": false,
"schedule_minutes": 123,
"schedule_time": "<string>",
"schedule_days": [
123
],
"schedule_timezone": "UTC"
}
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/smart-sources"
payload = {
"custom_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "",
"is_active": True,
"external_id_field": "",
"api": {
"api_url": "<string>",
"http_method": "GET",
"request_headers": {},
"request_body_template": {},
"auth_type": "none",
"auth_credential": "<string>",
"auth_header_name": "",
"response_data_path": "",
"next_page_path": "",
"field_mappings": [
{
"source_field": "<string>",
"target_column": "<string>",
"transform": "<string>"
}
]
},
"s3": {
"s3_bucket": "<string>",
"s3_prefix": "",
"s3_region": "eu-central-1",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_file_pattern": "*",
"extraction_prompt_override": ""
},
"sharepoint": {
"sharepoint_tenant_id": "",
"sharepoint_client_id": "",
"sharepoint_client_secret": "<string>",
"sharepoint_site_id": "",
"sharepoint_drive_id": "",
"sharepoint_folder_id": "",
"sharepoint_folder_drive_id": "",
"sharepoint_folder_path": "",
"sharepoint_file_pattern": "*",
"extraction_prompt_override": ""
},
"schedule": {
"auto_sync_enabled": False,
"schedule_minutes": 123,
"schedule_time": "<string>",
"schedule_days": [123],
"schedule_timezone": "UTC"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_data_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '',
is_active: true,
external_id_field: '',
api: {
api_url: '<string>',
http_method: 'GET',
request_headers: {},
request_body_template: {},
auth_type: 'none',
auth_credential: '<string>',
auth_header_name: '',
response_data_path: '',
next_page_path: '',
field_mappings: [{source_field: '<string>', target_column: '<string>', transform: '<string>'}]
},
s3: {
s3_bucket: '<string>',
s3_prefix: '',
s3_region: 'eu-central-1',
s3_access_key: '<string>',
s3_secret_key: '<string>',
s3_file_pattern: '*',
extraction_prompt_override: ''
},
sharepoint: {
sharepoint_tenant_id: '',
sharepoint_client_id: '',
sharepoint_client_secret: '<string>',
sharepoint_site_id: '',
sharepoint_drive_id: '',
sharepoint_folder_id: '',
sharepoint_folder_drive_id: '',
sharepoint_folder_path: '',
sharepoint_file_pattern: '*',
extraction_prompt_override: ''
},
schedule: {
auto_sync_enabled: false,
schedule_minutes: 123,
schedule_time: '<string>',
schedule_days: [123],
schedule_timezone: 'UTC'
}
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/smart-sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_data_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"is_active": true,
"external_id_field": "<string>",
"api": {
"api_url": "<string>",
"http_method": "GET",
"request_headers": {},
"request_body_template": {},
"auth_type": "none",
"auth_credential": "<string>",
"auth_header_name": "",
"response_data_path": "",
"next_page_path": "",
"field_mappings": [
{
"source_field": "<string>",
"target_column": "<string>",
"transform": "<string>"
}
]
},
"s3": {
"s3_bucket": "<string>",
"s3_prefix": "",
"s3_region": "eu-central-1",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_file_pattern": "*",
"extraction_prompt_override": ""
},
"sharepoint": {
"sharepoint_tenant_id": "",
"sharepoint_client_id": "",
"sharepoint_client_secret": "<string>",
"sharepoint_site_id": "",
"sharepoint_drive_id": "",
"sharepoint_folder_id": "",
"sharepoint_folder_drive_id": "",
"sharepoint_folder_path": "",
"sharepoint_file_pattern": "*",
"extraction_prompt_override": ""
},
"schedule": {
"auto_sync_enabled": false,
"schedule_minutes": 123,
"schedule_time": "<string>",
"schedule_days": [
123
],
"schedule_timezone": "UTC"
},
"sync_status": "<string>",
"last_synced_at": "2023-11-07T05:31:56Z",
"last_auto_sync_at": "2023-11-07T05:31:56Z",
"next_sync_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
Available options:
api, s3, sharepoint Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
201 - application/json
Created
Available options:
api, s3, sharepoint Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
