Skip to main content

GetMaterialById

Retrieves detailed information about a material from the Material Library.

Debugging

You can run this API directly in OpenAPI Explorer, without having to calculate signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. For more information:
  • Operation: refers to the specific permission point.
  • Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: refers to the resource types that support authorization in the operation. For more information:
    • Required resource types are marked with a leading *.
    • For operations that do not support resource-level authorization, 全部资源 is used.
  • Condition key: refers to the condition keys defined by the cloud service itself.
  • Dependent operation: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent operations for the operation to succeed.
OperationAccess levelResource typeCondition keyDependent operation
aimiaobi:GetMaterialByIdget
*All Resources
*
    None
None

Request parameters

ParameterTypeRequiredDescriptionExample
AgentKeystringYes

Unique identifier of the workspace: AgentKey

67c520d1fa43455ea44fb69fa402d54d_p_beebot_public
IdlongYes

Primary key ID of the task

60

Response parameters

NameTypeDescriptionExample
object

PlainResult

Codestring

Status code

DataNotExists
Dataobject

Business data

Authorstring

Author

Document author
CreateTimestring

Creation time

2023-03-21 11:34:19
CreateUserstring

Creator user ID

1
DocKeywordsarray

Document tags used for classification and other purposes. Separate multiple keywords with commas.

DocKeywordstring

Keyword

Keyword
DocTypestring

Document type, such as pdf, word, url, or image

pdf
ExternalUrlstring

URL uploaded by an external customer. Used only for record keeping.

https://www.example.com
HtmlContentstring

Web page content

Web page content
Idlong

Primary key

32
PubTimestring

Publication time

2023-04-11 06:14:07
PublicUrlstring

Temporary public URL

https://www.example.com
ShareAttrinteger

Sharing attribute stored as bit flags. The first bit indicates sharing within the workspace, the second bit indicates sharing within the tenant, and the third bit indicates system-wide sharing.

1
SrcFromstring

Document source, such as user_upload, search, or viewpoint

user_upload
Summarystring

Document summary

Document summary
TextContentstring

Parsed text content. Empty for images.

Text content
ThumbnailInBase64string

Base64-encoded thumbnail for image documents

Base64-encoded thumbnail
Titlestring

Document title

Document title
UpdateTimestring

Modification time

2022-04-08 19:33:01
UpdateUserstring

Modifier user ID

1
Urlstring

Internal document storage URL

https://www.example.com
HttpStatusCodeinteger

HTTP status code

200
Messagestring

Error description

Data does not exist
RequestIdstring

Unique request identifier

3f7045e099474ba28ceca1b4eb6d6e21
Successboolean

Indicates success: true for success, false for failure

false

Examples

Success response JSON format
{
  "Code": "DataNotExists",
  "Data": {
    "Author": "Document author",
    "CreateTime": "2023-03-21 11:34:19",
    "CreateUser": 1,
    "DocKeywords": [
      "Keyword"
    ],
    "DocType": "pdf",
    "ExternalUrl": "https://www.example.com\n",
    "HtmlContent": "Web page content",
    "Id": 32,
    "PubTime": "2023-04-11 06:14:07\n",
    "PublicUrl": "https://www.example.com\n",
    "ShareAttr": 1,
    "SrcFrom": "user_upload",
    "Summary": "Document summary",
    "TextContent": "Text content",
    "ThumbnailInBase64": "Base64-encoded thumbnail",
    "Title": "Document title",
    "UpdateTime": "2022-04-08 19:33:01",
    "UpdateUser": 1,
    "Url": "https://www.example.com"
  },
  "HttpStatusCode": 200,
  "Message": "Data does not exist",
  "RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
  "Success": false
}

Error codes

Visit the Error Center to view more error codes.