Describe task knowledge tables

Query table schemas available to the task.

POST https://api.moi.matrixorigin.cn/v5/semantic-models/runtime/describe-tables

Before you call this API

Use injected service URLs, technical credentials, Workspace, and short-lived authorization only in the current task environment. Retain original authorization header values. An ordinary PAT cannot replace task identity or establish authorization. Examples use jq. See Shared information for variables, objects, and states.

Request body

curl -X POST "${MOI_ENDPOINT%/}/semantic-models/runtime/describe-tables" \
  -H "X-API-Key: $MOI_API_KEY" \
  -H "X-Workspace-ID: $MOI_WORKSPACE_ID" \
  -H "X-MOI-Runtime-Authorization: $MOI_RUNTIME_AUTHORIZATION" \
  -H 'Content-Type: application/json' \
  --data-binary "$(jq -n --arg REQUEST_ID "$REQUEST_ID" --arg TABLE_NAME "$TABLE_NAME" '
{
  "request_id": $REQUEST_ID,
  "table_names": [
    $TABLE_NAME
  ],
  "include_samples": 1,
  "max_ddl_chars": 4000
}
')"

Read schemas, semantic entries, and constraints before constructing read-only queries. Returned samples are bounded and do not establish full-data distributions.

Fields

Type

Required

Description

request_id

string

Yes

Unique ID for this operation, 1–256 bytes, without surrounding whitespace or an audit: prefix. Retain for replay of identical input.

table_names

string (array of strings)

No

Only tables within current bindings. Omission selects tables within scope.

keywords

string (array of strings)

No

Filter relevant semantic entries.

include_samples

integer

No

Nonnegative sample-row count; samples at most1000 rows.

max_ddl_chars

integer

No

Nonnegative DDL text length limit.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "call_id": "request_example",
    "output": {
      "tables": []
    }
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

Response explanation.

data.call_id

string

Corresponding original request_id.

data.failed

boolean

true indicates business failure; false may be omitted.

data.output

object

Current operation result.

data.artifacts

object (array of objects)

Original artifacts and evidence from the same task.

data.metadata

object

Operation metadata, returned when present.

data.output.tables

array

Currently selected table schemas.

Error response

Handle HTTP status, business results, and error fields separately. See Errors and environments. On source or version conflicts, read current state; do not automatically retry with a different identity, resource, or request ID.

Last updated on