Skip to main content

UpdateDocument

Updates the title, metadata, and other information of a document.

Operation description

Prerequisites
  • Alibaba Cloud Model Studio and Tongyi Dianjin are activated.
  • You have obtained the workspaceId: Obtain the workspace identifier.

Debugging

You can run this API directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples. Try it now

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:
  • Action: 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. Details are as follows:
    • Required resource types are marked with a leading asterisk (*).
    • For operations that do not support resource-level authorization, All Resources is used.
  • Condition key: refers to the condition keys defined by the cloud service itself.
  • Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions before the operation can succeed.
ActionAccess levelResource typeCondition keyDependent action
dianjin:UpdateDocumentnone
*All Resources
*
    None
None

Request syntax

POST /{workspaceId}/api/library/document/updateDocument HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringYes

Path parameter, workspace ID.

llm-xxxxx
bodyobjectNo

Request body parameter.

docIdstringYes

Document ID.

123
libraryIdstringYes

Document library ID.

abc123
metaobjectNo

Document metadata.

{ "businessId": "12321" }
titlestringNo

Document title.

test

Response parameters

NameTypeDescriptionExample
object

Result.

costlong

Time consumed

null
datastring

Response data.

null
dataTypestring

Data type.

null
errCodestring

Error code.

0
messagestring

Error message.

ok
requestIdstring

Request ID.

eb2b6139-ddf1-91a0-a47f-df7617ae9032
successboolean

Success status.

true
timestring

Timestamp.

2024-04-24 11:54:34

Examples

Success response JSON format
{
  "cost": 0,
  "data": null,
  "dataType": null,
  "errCode": 0,
  "message": "ok",
  "requestId": "eb2b6139-ddf1-91a0-a47f-df7617ae9032",
  "success": true,
  "time": "2024-04-24 11:54:34"
}

Error codes

Visit the Error Center to view more error codes.