GetKnowledgeBaseBuildTask
Retrieves the current configuration of a specified knowledge base build task.
Operation description
Retrieves a knowledge base build task or instance. The tenant and caller identities are determined by the POP authentication context.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetKnowledgeBaseBuildTask |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| KnowledgeBaseId |
string |
Yes |
The ID of the knowledge base. |
12345678-1234-4234-8234-123456789abc |
| TaskId |
string |
Yes |
The ID of the task. |
10001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The unique identifier of the request, which can be used to troubleshoot issues. |
00000000-0000-4000-8000-000000000001 |
| Success |
boolean |
Indicates whether the request is successful. |
|
| Data |
object |
The business data returned when the request is successful. |
|
| TaskId |
string |
The stable ID of the task. |
10001 |
| KnowledgeBaseId |
string |
The ID of the knowledge base. |
12345678-1234-4234-8234-123456789abc |
| Name |
string |
The name of the task. |
Project space knowledge build |
| Description |
string |
The description of the task. |
Sales metrics and policy documents |
| Type |
string |
The type of the task. Valid values: PROJECT_SPACE_BUILD, SEMANTIC_GRAPH, DOCUMENT_GRAPH, DOCUMENT_SYNC, DOCUMENT_SYNC_AND_GRAPH, and SEMANTIC_MODEL. SEMANTIC_MODEL is used only for YAML import. |
PROJECT_SPACE_BUILD |
| LlmModel |
string |
The ID of the large language model (LLM) configured for tasks that require a model, or AUTO. If this parameter is omitted during creation, the value defaults to AUTO. Do not configure this parameter for tasks that do not call a model. |
AUTO |
| ContentLocale |
string |
The content language of the task. This field is optional. If specified, the language is selected when the task is created. |
zh-CN |
| ProjectId |
integer |
The ID of the DataWorks workspace where the task runs. This is different from the build asset scope specified by Input.ProjectIds. |
67890 |
| Input |
object |
The typed input scope selected for the task. System-managed upload build tasks do not have fixed inputs, and this field is omitted when reading such tasks. |
|
| ProjectIds |
array |
The IDs of the DataWorks workspaces selected for workspace-scoped builds. The values must be non-empty and deduplicated. |
|
|
integer |
The IDs of the DataWorks workspaces selected for workspace-scoped builds. The values must be non-empty and deduplicated. |
12345 |
|
| SourceIds |
array |
The IDs of the registered sources in the knowledge base. The values must be deduplicated. Whether this parameter is required and the allowed source types depend on the task input scenario. For more information, see the following table. |
|
|
string |
The IDs of the registered sources in the knowledge base. The values must be deduplicated. Whether this parameter is required and the allowed source types depend on the task input scenario. For more information, see the following table. |
src-document-001 |
|
| Entities |
array<object> |
The Data Map entities such as databases, schemas, and tables selected for data asset-scoped builds. The values must be non-empty and deduplicated. |
|
|
object |
|||
| EntityId |
string |
The metadata entity ID returned by Data Map. The client must pass this ID as is and must not concatenate database, schema, or table identifiers. |
maxcompute-table:::project_name:schema_name:table_name |
| EntityType |
string |
The entity level, such as DATABASE, SCHEMA, or TABLE. The server validates this against Data Map identities. The presence of an enum value does not guarantee that all engines support it. |
TABLE |
| YamlUploadId |
string |
The YAML upload session ID in the knowledge base used for SEMANTIC_MODEL import tasks. This ID is bound when the task is created and cannot be mixed with other input scopes. |
upload-yaml-001 |
| KnowledgeObjectIds |
array |
The IDs of the knowledge objects. This parameter is required, non-empty, and deduplicated when building from document objects in the knowledge base. Each item is a KnowledgeObjectId with Type=DOCUMENT in the knowledge base. Do not mix this parameter with SourceIds for external connector synchronization scopes. |
|
|
string |
The IDs of the knowledge objects. This parameter is required, non-empty, and deduplicated when building from document objects in the knowledge base. Each item is a KnowledgeObjectId with Type=DOCUMENT in the knowledge base. Do not mix this parameter with SourceIds for external connector synchronization scopes. |
obj-document-001 |
|
| RuntimeResource |
object |
The resource group and Builder compute specifications for running the task. |
|
| ResourceGroupId |
string |
The ID of the DataWorks resource group used by the actual Builder nodes. The server validates that the resource group is available in the workspace corresponding to the top-level ProjectId of the task. |
rg-001 |
| Cu |
integer |
The Builder compute specifications. Valid values: 4 to 16. If this parameter is omitted during creation, the default value is 4. The read operation returns the effective value. |
4 |
| Trigger |
object |
The manual or periodic trigger configuration. |
|
| Mode |
string |
The trigger mode. Valid values: |
MANUAL |
| Cron |
string |
The cron expression for DataWorks scheduling. This parameter is provided only when the trigger mode is PERIODIC. |
0 0 2 * * ? |
| Enabled |
boolean |
Specifies whether periodic automatic triggering is enabled. This parameter is provided only when the trigger mode is PERIODIC. It does not indicate the instance status. |
|
| CreateTime |
integer |
The creation time. |
1790200000000 |
| ModifyTime |
integer |
The time when the definition was last modified. |
1790200300000 |
| Code |
string |
The business error code, which is used to determine the error type when the request fails. |
InvalidParameter |
| Message |
string |
The secure error message returned when the request fails. |
The request parameters are invalid |
Examples
Success response
JSON format
{
"RequestId": "00000000-0000-4000-8000-000000000001",
"Success": false,
"Data": {
"TaskId": "10001",
"KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
"Name": "Project space knowledge build",
"Description": "Sales metrics and policy documents",
"Type": "PROJECT_SPACE_BUILD",
"LlmModel": "AUTO",
"ContentLocale": "zh-CN",
"ProjectId": 67890,
"Input": {
"ProjectIds": [
12345
],
"SourceIds": [
"src-document-001"
],
"Entities": [
{
"EntityId": "maxcompute-table:::project_name:schema_name:table_name",
"EntityType": "TABLE"
}
],
"YamlUploadId": "upload-yaml-001",
"KnowledgeObjectIds": [
"obj-document-001"
]
},
"RuntimeResource": {
"ResourceGroupId": "rg-001",
"Cu": 4
},
"Trigger": {
"Mode": "MANUAL",
"Cron": "0 0 2 * * ?",
"Enabled": false
},
"CreateTime": 1790200000000,
"ModifyTime": 1790200300000
},
"Code": "InvalidParameter",
"Message": "The request parameters are invalid"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The request parameters are invalid. | |
| 500 | InternalError | The knowledge base operation failed. Use RequestId to contact support. | |
| 403 | Forbidden | You are not authorized to perform this operation. | |
| 404 | ResourceNotFound | The requested resource does not exist or is not visible. | |
| 409 | Conflict | The resource state conflicts with this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.