Retrieve a download URL for a document. The URL expires after 1 hour.
Operation description
Prerequisites
- Alibaba Cloud Model Studio and Tongyi Dianjin have been activated.
- The workspaceId has been obtained: obtain the workspace identifier.
Debug
You can directly run this API 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 it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types supported for authorization in 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: other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:GetDocumentUrl | get | *All Resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | Path parameter. The workspace ID. | llm-xxxxx |
| documentId | string | Yes | The document ID. | 12681367362 |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | ResultCode | ||
| cost | long | The time spent. | null |
| data | string | The returned data, which is the document download URL. The URL expires in 1 hour. | https://path_to_file |
| dataType | string | The data type. | null |
| errCode | string | The error code. | 0 |
| message | string | The error message. | ok |
| requestId | string | The request ID. | 66249B43-8C2B-5EE7-AE78-B382306621C6 |
| success | boolean | Indicates whether the operation is successful. | true |
| time | string | The timestamp. | 2024-01-01 00:00:00 |
Examples
Success response
JSON format