Update a datasource
import requests
url = "https://{FUSION HOST}/api/connectors/datasources/{id}"
payload = {
"id": "pokedex_json_zip-api-test-app",
"connector": "lucid.fileupload",
"type": "fileupload",
"pipeline": "api-test-app",
"parserId": "pokedex_json_zip-api-test-app",
"properties": {
"collection": "api-test-collection",
"fileId": "pokedex.json.zip",
"mediaType": "application/octet-stream"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "pokedex_json_zip-api-test-app",
"created": "2024-08-02T18:19:09.458Z",
"modified": "2024-08-02T19:43:28.394Z",
"connector": "lucid.fileupload",
"type": "fileupload",
"pipeline": "api-test-app",
"parserId": "pokedex_json_zip-api-test-app",
"properties": {
"collection": "api-test-collection",
"fileId": "pokedex.json.zip",
"mediaType": "application/octet-stream"
}
}Update a datasource
Update the configuration properties of the specified datasource configuration.
PUT
/
connectors
/
datasources
/
{id}
Update a datasource
import requests
url = "https://{FUSION HOST}/api/connectors/datasources/{id}"
payload = {
"id": "pokedex_json_zip-api-test-app",
"connector": "lucid.fileupload",
"type": "fileupload",
"pipeline": "api-test-app",
"parserId": "pokedex_json_zip-api-test-app",
"properties": {
"collection": "api-test-collection",
"fileId": "pokedex.json.zip",
"mediaType": "application/octet-stream"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "pokedex_json_zip-api-test-app",
"created": "2024-08-02T18:19:09.458Z",
"modified": "2024-08-02T19:43:28.394Z",
"connector": "lucid.fileupload",
"type": "fileupload",
"pipeline": "api-test-app",
"parserId": "pokedex_json_zip-api-test-app",
"properties": {
"collection": "api-test-collection",
"fileId": "pokedex.json.zip",
"mediaType": "application/octet-stream"
}
}Path Parameters
The datasource configuration ID.
Query Parameters
Indicates if the configuration should be validated.
The context of resource. It usually is the app inside which the resource is created.
Body
application/json
The body is of type object.
Response
200 - application/json
OK
The response is of type object.
Was this page helpful?
⌘I