GetLogviewDownloadUrl
Retrieves the download link for the offline Logview file of an instance in a specified MaxCompute project. The link is valid for 10 minutes from the time it is generated.
Operation description
Generates the offline Logview file for a specified MaxCompute instance and returns a presigned Object Storage Service (OSS) download URL.
Procedure
Specify the project name by using the project path parameter and the instance ID in the project by using the instance.
Select useVpcEndpoint based on the download environment: If this parameter is not specified or is set to false, the default OSS endpoint is used. If this parameter is set to true, the OSS VPC endpoint configured on the server is used. The download client must have network access to the selected endpoint.
Obtain the URL from the data field in the success response and download the file before the link expires. The link expires 10 minutes after it is generated. If the link expires, call this operation again to obtain a new link.
File and usage instructions
The downloaded file is named logview_detail_{project}_{instance}.txt. The file content is offline Logview data in UTF-8 encoded JSON format. The specific data varies based on the instance task type and available information, and is not guaranteed to include execution results.
Each call rebuilds and uploads the offline Logview data. The same file object path is used for the same project and instance, and a subsequent upload overwrites the previous content.
This operation returns a download URL instead of a file stream upon success. A success response identifies the request by using requestId and returns the download link in the data field. The httpCode, errorCode, and errorMsg fields are common response fields. These fields are not assigned values when this operation is successfully processed, but they are not guaranteed to be omitted from the response.
If useVpcEndpoint is set to true and no OSS VPC endpoint is configured on the server, link generation fails and does not automatically fall back to the default endpoint.
The sample URL in the data field is desensitized and is used only to illustrate the format. It cannot be used for actual downloads.
Try it now
Test
RAM authorization
Request syntax
GET /api/v1/logview/project/{project}/instance/{instance}/downloadUrl HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
Yes |
The name of the MaxCompute project. This parameter is used to specify the project to which the instance whose offline Logview is to be downloaded belongs. |
odps_project |
| instance |
string |
Yes |
The ID of the MaxCompute instance. The instance must belong to the project specified by the project parameter. |
20260409110419512gx6ofeaj8fb |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| useVpcEndpoint |
boolean |
No |
Specifies whether to use the OSS VPC endpoint to generate the download link. Valid values:
|
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. Upon success, the data field contains the download link and the requestId field contains the request ID. The common fields httpCode, errorCode, and errorMsg are not assigned values when this operation is successfully processed. Their serialized representation is subject to the actual response. |
||
| data |
string |
The presigned OSS download URL for the offline Logview file. The URL is valid for 10 minutes from the time it is generated. The file name extension is .txt and the content is JSON data in UTF-8 encoding. The download URL is determined by useVpcEndpoint. If the link expires, invoke this operation again. The sample URL is desensitized and cannot be used for actual downloads. |
https://example-bucket.oss-cn-hangzhou.aliyuncs.com/logview/offline/logview_detail_odps_project_20260409110419512gx6ofeaj8fb.txt?OSSAccessKeyId=LTAI5tExample****&Expires=1791777900&Signature=example**** |
| errorCode |
string |
The error code. This field is not assigned a value when this operation is successfully processed. The sample value NO_PERMISSION is used to illustrate a common permission error and must not be combined with the success response example. |
NO_PERMISSION |
| errorMsg |
string |
The error message. This field is not assigned a value when this operation is successfully processed. The sample value Forbidden is used to illustrate a common permission error and must not be combined with the success response example. |
Forbidden |
| httpCode |
integer |
The HTTP status code field. This field is not assigned a value when this operation is successfully processed. Do not rely solely on whether this field equals 200 to determine success. Process the result based on the actual HTTP response status and returned content. The sample value 200 is used only to illustrate the field format. |
200 |
| requestId |
string |
The request ID. This ID is used to locate and troubleshoot the request. |
0be3e0aa16667684362147582e038f |
Upon success, obtain the download link from the data field. The requestId field is used to troubleshoot the request. The following example shows only the fields that are assigned values upon success and does not represent the complete raw response. Whether common fields return null or are omitted is subject to the actual response.
{
"requestId": "0be3e0aa16667684362147582e038f",
"data": "https://example-bucket.oss-cn-hangzhou.aliyuncs.com/logview/offline/logview_detail_odps_project_20260409110419512gx6ofeaj8fb.txt?OSSAccessKeyId=LTAI5tExample****&Expires=1791777900&Signature=example****"
}
The sample values in the parameter table illustrate the format of each field and must not be combined into a complete response for a single call. The NO_PERMISSION value for errorCode and the Forbidden value for errorMsg are examples of common permission errors. They do not belong to the preceding success response and do not indicate that this operation always returns these errors. The 200 value for httpCode is a format example for the status code field and does not indicate that this field is always assigned this value upon success.
Examples
Success response
JSON format
{
"data": "https://example-bucket.oss-cn-hangzhou.aliyuncs.com/logview/offline/logview_detail_odps_project_20260409110419512gx6ofeaj8fb.txt?OSSAccessKeyId=LTAI5tExample****&Expires=1791777900&Signature=example****",
"errorCode": "NO_PERMISSION",
"errorMsg": "Forbidden",
"httpCode": 200,
"requestId": "0be3e0aa16667684362147582e038f"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.