Verify semantic entries¶
Check whether the knowledge base and its semantic entries comply with the verification rules.
POST $CLOUDSIGMA_API_BASE/semantic-models/{model_id}/validate
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 list to obtain the knowledge base ID. Prepare a personal access token and target workspace ID that can access the target workspace.
Request parameters¶
curl -X POST "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID/validate" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
The knowledge base ID to be verified. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"valid": false,
"errors": ["entry total_rows is invalid"]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
The return data of this operation. |
|
boolean |
Whether the current knowledge base passes the server-side verification. |
|
array of string |
List of errors when verification fails. May be omitted or empty when passed. |
Error response¶
{
"code": "ErrNotFound",
"msg": "resource not found",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
|