Skip to main content

SaveMaterialDocument

Save material: Save material to the Material Library.

Debug

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

RAM authorization

The following table describes the authorization information for this API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
  • Operation: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization for the operation. Details are as follows:
    • Required resource types are marked with a preceding asterisk (*).
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
OperationAccess levelResource typeCondition keyDependent action
aimiaobi:SaveMaterialDocumentcreate
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample
AgentKeystringYes

Unique identifier of the workspace: AgentKey

c160c841c8e54295bf2f441432785944_p_efm
DocTypestringYes

Document type (html: web page, plainText: plain text, image: image, pdf: pdf, word: word, excel: excel, csv: csv, jsonLine: jsonLine)

excel
TitlestringNo

Document title

News title
AuthorstringNo

Author

Author name
PubTimestringNo

Publication time, format: yyyy-MM-dd HH:mm:ss

2023-04-11 06:14:07
DocKeywordsarrayNo

Document tags used for classification, etc.

DocKeywordstringNo

Keyword

Keyword
UrlstringNo

URL of the material

http://xxxxx/xxx
ExternalUrlstringNo

URL uploaded by external customers, used only for record keeping

http://xxxxx/xxx
SrcFromstringNo

Document source (UserUpload: User Upload, IntellijSearch: Intelligent Search, HotViewPoint: Hot Viewpoint)

IntellijSearch
TextContentstringNo

Parsed text content, empty for images

Text content
HtmlContentstringNo

Formatted content

Web page content
ShareAttrintegerNo

Sharing attribute: 0: private, 1: shared within the workspace

1
BothSavePrivateAndSharebooleanNo

Whether to save the material to both the private library and the shared library

false
SummarystringNo

Summary

Summary

Response parameters

NameTypeDescriptionExample
object

PlainResult

Codestring

Status code

DataNotExists
Datalong

Business data

12
HttpStatusCodeinteger

HTTP status code

200
Messagestring

Error description

Data does not exist
RequestIdstring

Unique request identifier

3f7045e099474ba28ceca1b4eb6d6e21
Successboolean

Whether the request is successful: true for success, false for failure

false

Examples

Normal response example JSON format
{
  "Code": "DataNotExists",
  "Data": 12,
  "HttpStatusCode": 200,
  "Message": "数据不存在",
  "RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
  "Success": false
}

Error codes

Visit the Error Center to view more error codes.