Skip to main content
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.json())
{
  "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"
}

Query Parameters

validateOnly
boolean
default:false

Indicates if the configuration should be created (persisted) or just validated.

context
string

The app to which this datasource belongs.

Body

application/json · object

Response

201 - application/json

Created

The response is of type object.