Update data source management settings¶
Update the data source’s label, expiration time, and enabled status. The fields that can be modified depend on the source type.
PATCH $CLOUDSIGMA_API_BASE/semantic-models/{model_id}/sources/{source_row_id}/governance
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the knowledge base data source list to obtain the source record ID. Prepare a personal access token and target workspace ID that can access the target workspace.
Request body¶
curl -X PATCH "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID/sources/$SOURCE_ROW_ID/governance" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"tags": ["product"]
}'
The Catalog table source only supports updating the expiration time and activation status, and does not support labels or forced activation after expiration.
Before the file source is updated to enabled, the confirmation process has been created and the current identity can view the vector table. Otherwise the request will fail.
Path parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
knowledge base ID. |
|
string |
Yes |
Source record ID. |
Request body
Supports modifying governance settings, including labels, expiration time, enabled, and forced activation after expiration. The file source can be set with a label first. When you need to change the enabled status, wait until the processing is completed before submitting.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
array of string |
No |
Override the source tag. |
|
integer or null |
No |
Unix timestamp. Pass in |
|
boolean |
No |
The enabled status of the configuration. |
|
boolean |
No |
Whether the source is still forced to be enabled after it expires. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"source": {
"row_id": "src_01",
"source_type": "file",
"model_id": 401,
"resource_id": "file_01",
"tags": ["product"],
"enabled": false,
"effective_enabled": false,
"governance_status": "managed"
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
response data. |
|
object |
Updated source record. |
|
string |
Source record ID. |
|
string |
Source ID. Returns if not empty. |
|
string |
Source type. |
|
integer |
Belonging knowledge base ID. |
|
string |
Source resource ID. |
|
string |
Original resource ID. Returned if there is a value. |
|
string |
Resource ID on the knowledge base side. Returned if there is a value. |
|
string |
Original file ID. Returned if there is a value. |
|
string |
knowledge base file ID. Returned if there is a value. |
|
integer |
Original table ID. Returned if there is a value. |
|
integer |
knowledge base table ID. Returned if there is a value. |
|
string or null |
Display name. |
|
array of string |
Source path. |
|
string |
Original source path. Returned if there is a value. |
|
string or null |
Database name. |
|
string or null |
Table name. |
|
integer or null |
File size. |
|
integer or null |
Number of table rows. |
|
string or null |
Source processing status. |
|
array of string |
Updated label. May be omitted if not set. |
|
integer or null |
Unix timestamp of expiration time. When not set, it is |
|
boolean or null |
The enabled status of the configuration. When not set, it is |
|
boolean |
Has it expired? |
|
boolean |
Current actual effective status. |
|
boolean |
Whether to force activation after expiration. |
|
string |
Creator ID. Returned if there is a value. |
|
string |
Last updated by ID. Returned if there is a value. |
|
integer or null |
Last updated time. |
|
string or null |
Handle errors. |
|
string |
Current management status. Returns if not empty. |
|
string |
Historical source markers. Returned if there is a value. |
The response returns the updated data source record. Before writing the segment, separately Query the knowledge base document details to obtain the current snapshot data.etag.
Error response¶
{
"code": "ErrParamInvalid",
"msg": "Bad Request"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |