Create a V2 datasource
import requests
url = "https://{FUSION HOST}/api/connectors/configs"
payload = {
"parserId": "api-test-app",
"id": "lucidworks_file_upload-api-test-app",
"type": "lucidworks.file-upload",
"collectionId": "api-test-app",
"properties": {
"mediaType": "application/octet-stream",
"fileId": "pokedex.json.zip"
},
"pipelineId": "api-test-app"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"parserId": "api-test-app",
"coreProperties": {},
"id": "lucidworks_file_upload-api-test-app",
"type": "lucidworks.file-upload",
"collectionId": "api-test-app",
"properties": {
"mediaType": "application/octet-stream",
"fileId": "pokedex.json.zip"
},
"pipelineId": "api-test-app"
}Create a V2 datasource
Create a new connector V2 datasource configuration. The configuration schema depends on the connector type. Use /connectors/plugins/{type} to get the configuration schema for the connector you want to use.
POST
/
connectors
/
configs
Create a V2 datasource
import requests
url = "https://{FUSION HOST}/api/connectors/configs"
payload = {
"parserId": "api-test-app",
"id": "lucidworks_file_upload-api-test-app",
"type": "lucidworks.file-upload",
"collectionId": "api-test-app",
"properties": {
"mediaType": "application/octet-stream",
"fileId": "pokedex.json.zip"
},
"pipelineId": "api-test-app"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"parserId": "api-test-app",
"coreProperties": {},
"id": "lucidworks_file_upload-api-test-app",
"type": "lucidworks.file-upload",
"collectionId": "api-test-app",
"properties": {
"mediaType": "application/octet-stream",
"fileId": "pokedex.json.zip"
},
"pipelineId": "api-test-app"
}Was this page helpful?
⌘I