GetKnowledgePoint
Retrieves the current details of a single knowledge point, supporting local graphs, topic pages, and knowledge content.
Operation description
Retrieves the current details of a knowledge point. GRAPH returns a one-hop local graph centered on the specified node. WIKI and KNOWLEDGE_CONTENT return readable content.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetKnowledgePoint |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| KnowledgeBaseId |
string |
Yes |
The ID of the knowledge base to which the knowledge point belongs. Used together with Type and Id to locate the knowledge point. |
12345678-1234-4234-8234-123456789abc |
| Type |
string |
Yes |
The read category of the knowledge point. GRAPH indicates a local graph, WIKI indicates a topic page, and KNOWLEDGE_CONTENT indicates knowledge content. Valid values:
|
GRAPH |
| Id |
string |
Yes |
The location ID of the knowledge point. Copy this value exactly as it appears in the search results and use it together with the corresponding KnowledgeBaseId and Type. Do not parse or convert this value. |
node-sales |
| MaxResults |
integer |
No |
The maximum number of relationships to return per page. This parameter is valid only when Type is set to GRAPH. Default value: 20. Valid values: 1 to 100. This parameter is not supported when Type is set to WIKI or KNOWLEDGE_CONTENT. |
20 |
| NextToken |
string |
No |
The pagination cursor. Do not specify this parameter when you request the first page. For subsequent pages, use the NextToken value returned in the previous response. An empty NextToken value in the response indicates that no more pages are available. If the current page is empty but the cursor is not empty, continue requesting. This parameter is used only when Type is set to GRAPH. You must keep the same knowledge base, entry point, and MaxResults values. |
eyJvZmZzZXQiOjIwfQ |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The successful response of the API operation. |
||
| 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 typed details of a single knowledge point. Only the item corresponding to the Type value is returned among Graph, Wiki, and KnowledgeContent. |
|
| KnowledgeBaseId |
string |
The ID of the knowledge base to which the knowledge point belongs. Used together with Type and Id to locate the knowledge point. |
12345678-1234-4234-8234-123456789abc |
| Type |
string |
The read category of the knowledge point. GRAPH indicates a local graph, WIKI indicates a topic page, and KNOWLEDGE_CONTENT indicates knowledge content. |
GRAPH |
| Id |
string |
The location ID of the knowledge point. Copy this value exactly as it appears in the search results and use it together with the corresponding KnowledgeBaseId and Type. Do not parse or convert this value. |
node-sales |
| NextToken |
string |
The pagination cursor. Do not specify this parameter when you request the first page. For subsequent pages, use the NextToken value returned in the previous response. An empty NextToken value in the response indicates that no more pages are available. If the current page is empty but the cursor is not empty, continue requesting. This parameter is used only when Type is set to GRAPH. You must keep the same knowledge base, entry point, and MaxResults values. |
eyJvZmZzZXQiOjIwfQ |
| Graph |
object |
The one-hop local graph with the requested Id as the entry point. This field is returned only when Type is set to GRAPH. It includes the entry point, the relationships on the current page, and their visible endpoints. |
|
| KnowledgeBaseId |
string |
The ID of the knowledge base to which the knowledge point belongs. Used together with Type and Id to locate the knowledge point. |
12345678-1234-4234-8234-123456789abc |
| RootNodeId |
string |
The ID of the entry node for the current local graph, which is the same as the requested Id. |
node-sales |
| Nodes |
array<object> |
The entry node and all visible endpoints involved in the relationships on the current page, deduplicated by NodeId. Subsequent pages still include the entry node. |
|
|
object |
|||
| KnowledgeBaseId |
string |
The ID of the knowledge base to which the knowledge point belongs. Used together with Type and Id to locate the knowledge point. |
12345678-1234-4234-8234-123456789abc |
| NodeId |
string |
The ID of the node in the current knowledge base graph. You can use this value as the Id when Type is set to GRAPH to read the local graph of this node. |
node-sales |
| Type |
string |
The business category of the graph node. For example, TABLE indicates a data table. This is not the read category of the knowledge point. |
TABLE |
| Name |
string |
The display name of the graph node. |
Sales |
| Definition |
string |
The reliable business definition of the graph node. This field is omitted when no public definition is available. |
Sum of the actual paid amounts of paid orders |
| Description |
string |
The readable supplementary description of the current node or relationship. This field is omitted when no reliable content is available. |
Sales are calculated based on the actual paid amount of orders |
| EntityId |
string |
The asset ID in DataWorks Data Map that can be reliably located. This is not the NodeId of the graph node. This field is omitted when no unique and reliable asset mapping is available. |
maxcompute-table:::sales:public:orders |
| Aliases |
array |
The list of reliable aliases for the node. This field may be omitted when no aliases are available. |
|
|
string |
An alias of the current node. |
Actual paid sales |
|
| Expression |
string |
The published and verifiable complete metric calculation expression. This field is omitted when no reliable formula is available. |
COUNT(DISTINCT refund_id) |
| ExpressionDialect |
string |
The expression dialect explicitly marked in the published definition. This field is omitted when no dialect is marked. |
sql |
| Edges |
array<object> |
The visible one-hop adjacency relationships on the current page. At least one end of each edge is the RootNodeId, and both ends are in the Nodes of the current page. |
|
|
array<object> |
|||
| KnowledgeBaseId |
string |
The ID of the knowledge base to which the knowledge point belongs. Used together with Type and Id to locate the knowledge point. |
12345678-1234-4234-8234-123456789abc |
| EdgeId |
string |
The ID of the relationship in the current knowledge base graph. |
edge-sales-orders |
| FromNodeId |
string |
The NodeId of the start node of the relationship. The start node should exist in Graph.Nodes on the same page. |
node-sales |
| ToNodeId |
string |
The NodeId of the end node of the relationship. The end node should exist in Graph.Nodes on the same page. |
node-orders |
| RelationType |
string |
The public relationship type from the start node to the end node. For example, CALCULATED_FROM indicates that the start node is calculated based on the end node. You cannot infer the complete formula solely based on the type. |
CALCULATED_FROM |
| Description |
string |
The readable supplementary description of the current node or relationship. This field is omitted when no reliable content is available. |
Sales are calculated based on the actual paid amount of orders |
| Join |
object |
The typed field association information of the verified relationship. This field is omitted when no reliable and complete field pairing is available. |
|
| JoinKeys |
array<object> |
The pairs of fields used to join the two endpoint nodes on equal values. Composite keys are returned in full. |
|
|
object |
|||
| FromField |
string |
The name of the association field for the node corresponding to FromNodeId. |
customer_id |
| ToField |
string |
The name of the association field for the node corresponding to ToNodeId. |
id |
| Cardinality |
string |
The association cardinality from the start node to the end node. Returns ONE_TO_ONE, ONE_TO_MANY, MANY_TO_ONE, or MANY_TO_MANY when reliable. |
MANY_TO_ONE |
| UpdateTime |
integer |
The time when the current graph was last published, in UNIX milliseconds. Returned when a valid publish time is obtained. |
1794373200000 |
| Wiki |
object |
The title, Markdown body, and optional sources of the topic page. This field is returned only when Type is set to WIKI. |
|
| Title |
string |
The display title of the current knowledge point. |
Sales |
| Content |
string |
The Markdown body that can currently be disclosed. The knowledge content may be a document fragment or a readable projection of structured knowledge, and is not guaranteed to be the full text of the original file. |
Sales are aggregated by the actual paid amount of paid orders |
| Sources |
array<object> |
The download information of the uploaded original document explicitly associated with the current content. This field is omitted when no reliable source is available or when you do not have read permissions for the original file. The ability to retrieve a knowledge point does not imply the ability to download the complete original file. |
|
|
object |
|||
| FileName |
string |
The full file name of the original document used for building. This is not the name of the current knowledge point fragment. |
Sales_policy.pdf |
| DownloadUrl |
string |
The temporary HTTPS download URL of the original file, valid for 2 hours. This field is returned only when the source can be reliably located and the caller has read permissions for the original file. Do not forward this URL publicly or store it for a long time. |
https://example.com/sales-policy.pdf |
| ExpirationTime |
integer |
The expiration time of the download URL, in UNIX milliseconds. |
1794376800000 |
| KnowledgeContent |
object |
The title, Markdown body, and optional sources of the knowledge content. This field is returned only when Type is set to KNOWLEDGE_CONTENT. |
|
| Title |
string |
The display title of the current knowledge point. |
Sales |
| Content |
string |
The Markdown body that can currently be disclosed. The knowledge content may be a document fragment or a readable projection of structured knowledge, and is not guaranteed to be the full text of the original file. |
Sales are aggregated by the actual paid amount of paid orders |
| Sources |
array<object> |
The download information of the uploaded original document explicitly associated with the current content. This field is omitted when no reliable source is available or when you do not have read permissions for the original file. The ability to retrieve a knowledge point does not imply the ability to download the complete original file. |
|
|
object |
|||
| FileName |
string |
The full file name of the original document used for building. This is not the name of the current knowledge point fragment. |
Sales_policy.pdf |
| DownloadUrl |
string |
The temporary HTTPS download URL of the original file, valid for 2 hours. This field is returned only when the source can be reliably located and the caller has read permissions for the original file. Do not forward this URL publicly or store it for a long time. |
https://example.com/sales-policy.pdf |
| ExpirationTime |
integer |
The expiration time of the download URL, in UNIX milliseconds. |
1794376800000 |
| Warnings |
array<object> |
The truncation, scope limitation, or degradation prompts for the current call. Use Code for programmatic judgment. Message is for reading purposes only. |
|
|
object |
|||
| Code |
string |
The truncation or degradation prompt code. For example, CONTENT_TRUNCATED indicates that the content is truncated, and SOURCE_UNAVAILABLE indicates that the original file download is temporarily unavailable. |
CONTENT_TRUNCATED |
| Message |
string |
The sanitized and readable description of the current prompt. Use Code for programmatic judgment instead of relying on the text. |
Some content exceeds the length limit and has been truncated |
| Code |
string |
The business error code. This field may be omitted when the request is successful. For failures, the common error response protocol applies. |
InvalidParameter |
| Message |
string |
The readable description of the business error. This field may be omitted when the request is successful. Provide the RequestId when troubleshooting failures. |
The request parameters are invalid. |
Examples
Success response
JSON format
{
"RequestId": "00000000-0000-4000-8000-000000000001",
"Success": false,
"Data": {
"KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
"Type": "GRAPH",
"Id": "node-sales",
"NextToken": "eyJvZmZzZXQiOjIwfQ",
"Graph": {
"KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
"RootNodeId": "node-sales",
"Nodes": [
{
"KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
"NodeId": "node-sales",
"Type": "TABLE",
"Name": "Sales",
"Definition": "Sum of the actual paid amounts of paid orders",
"Description": "Sales are calculated based on the actual paid amount of orders",
"EntityId": "maxcompute-table:::sales:public:orders",
"Aliases": [
"Actual paid sales"
],
"Expression": "COUNT(DISTINCT refund_id)",
"ExpressionDialect": "sql"
}
],
"Edges": [
{
"KnowledgeBaseId": "12345678-1234-4234-8234-123456789abc",
"EdgeId": "edge-sales-orders",
"FromNodeId": "node-sales",
"ToNodeId": "node-orders",
"RelationType": "CALCULATED_FROM",
"Description": "Sales are calculated based on the actual paid amount of orders",
"Join": {
"JoinKeys": [
{
"FromField": "customer_id",
"ToField": "id"
}
],
"Cardinality": "MANY_TO_ONE"
}
}
],
"UpdateTime": 1794373200000
},
"Wiki": {
"Title": "Sales",
"Content": "Sales are aggregated by the actual paid amount of paid orders",
"Sources": [
{
"FileName": "Sales_policy.pdf",
"DownloadUrl": "https://example.com/sales-policy.pdf",
"ExpirationTime": 1794376800000
}
]
},
"KnowledgeContent": {
"Title": "Sales",
"Content": "Sales are aggregated by the actual paid amount of paid orders",
"Sources": [
{
"FileName": "Sales_policy.pdf",
"DownloadUrl": "https://example.com/sales-policy.pdf",
"ExpirationTime": 1794376800000
}
]
},
"Warnings": [
{
"Code": "CONTENT_TRUNCATED",
"Message": "Some content exceeds the length limit and has been truncated"
}
]
},
"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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.