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.

HTTP
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

Shell
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

model_id

integer

Yes

knowledge base ID.

source_row_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

tags

array of string

No

Override the source tag.

expires_at

integer or null

No

Unix timestamp. Pass in null to clear the expiration time.

enabled

boolean

No

The enabled status of the configuration.

force_enabled_after_expiry

boolean

No

Whether the source is still forced to be enabled after it expires.

Successful response

JSON
{
  "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

code

string

OK on success.

msg

string

OK on success.

data

object

response data.

data.source

object

Updated source record.

data.source.row_id

string

Source record ID.

data.source.source_id

string

Source ID. Returns if not empty.

data.source.source_type

string

Source type.

data.source.model_id

integer

Belonging knowledge base ID.

data.source.resource_id

string

Source resource ID.

data.source.source_resource_id

string

Original resource ID. Returned if there is a value.

data.source.kb_resource_id

string

Resource ID on the knowledge base side. Returned if there is a value.

data.source.source_file_id

string

Original file ID. Returned if there is a value.

data.source.kb_file_id

string

knowledge base file ID. Returned if there is a value.

data.source.source_table_id

integer

Original table ID. Returned if there is a value.

data.source.kb_table_id

integer

knowledge base table ID. Returned if there is a value.

data.source.display_name

string or null

Display name.

data.source.path

array of string

Source path.

data.source.source_path

string

Original source path. Returned if there is a value.

data.source.db_name

string or null

Database name.

data.source.table_name

string or null

Table name.

data.source.size_bytes

integer or null

File size.

data.source.row_count

integer or null

Number of table rows.

data.source.ingest_status

string or null

Source processing status.

data.source.tags

array of string

Updated label. May be omitted if not set.

data.source.expires_at

integer or null

Unix timestamp of expiration time. When not set, it is null.

data.source.enabled

boolean or null

The enabled status of the configuration. When not set, it is null.

data.source.expired

boolean

Has it expired?

data.source.effective_enabled

boolean

Current actual effective status.

data.source.force_enabled_after_expiry

boolean

Whether to force activation after expiration.

data.source.created_by

string

Creator ID. Returned if there is a value.

data.source.updated_by

string

Last updated by ID. Returned if there is a value.

data.source.updated_at

integer or null

Last updated time.

data.source.error

string or null

Handle errors.

data.source.governance_status

string

Current management status. Returns if not empty.

data.source.legacy_origin

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

JSON
{
  "code": "ErrParamInvalid",
  "msg": "Bad Request"
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

Last updated on