Update source
PUT
/api/sources/{sourceId}
const url = 'https://firma.company-gpt.com/companygpt/rag/api/api/sources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","config":{},"enabled":true,"syncSchedule":"example","collectionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://firma.company-gpt.com/companygpt/rag/api/api/sources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "config": {}, "enabled": true, "syncSchedule": "example", "collectionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Path Parameters
Abschnitt betitelt „Path Parameters“sourceId
required
string format: uuid
Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“Media typeapplication/json
Type is immutable and not part of this request
object
name
string
config
object
key
additional properties
any
enabled
boolean
syncSchedule
Null/omitted: leave unchanged; “”: clear; “hourly”/“daily”/“weekly”: set
string
collectionId
string format: uuid
Examplegenerated
{ "name": "example", "config": {}, "enabled": true, "syncSchedule": "example", "collectionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Abschnitt betitelt „Responses“Source updated
Media typeapplication/json
Data source configuration (database.SourceConfig)
object
id
required
string format: uuid
name
required
string
sourceType
required
string
config
required
Source-specific configuration
object
key
additional properties
any
enabled
required
boolean
syncSchedule
string
collectionId
string format: uuid
createdBy
string format: uuid
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
lastSyncAt
string format: date-time
Example
{ "sourceType": "webcrawl", "syncSchedule": "hourly"}Invalid request
Unauthorized
Source not found