All Products
Search
Document Center

MaxCompute:ListStoragePartitionsInfo

Last Updated:Jun 16, 2025

Queries the storage details of a specific partition in a partitioned table in a MaxCompute project.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
odps:ListStoragePartitionsInfoget
*Storage
acs:odps:{#regionId}:{#accountId}:storage/{#project}
    none
none

Request syntax

GET /api/v1/observations/analysis/storage/projects/{project}/tables/{table}/partitionsInfo HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
tenantIdstringNo

The ID of the tenant. You can log on to the MaxCompute console, and choose Tenants > Tenant Property from the left-side navigation pane to view the tenant ID.

40713753659****
regionstringNo

The region ID.

cn-beijing
datestringYes

The date on which the statistics are collected, in days. Set this parameter to a value in the YYYYMMdd format.

20241205
projectstringYes

The name of the MaxCompute project.

odps_project
schemastringNo

The name of the schema.

schema
tablestringYes

The name of the table.

bank_data
partitionPrefixstringNo

The name of the partition that you want to use for fuzzy match.

ds=20241201
typesarrayNo

The storage types.

itemstringNo

The storage type.

  • standard
  • lowfrequency
  • longterm
standard
orderColumnstringNo

The sorting column.

totalFrequency
ascOrderbooleanNo

Specifies whether to sort data in ascending order.

false
pageSizelongNo

The number of entries per page. Default value: 10.

10
pageNumberlongNo

The page number.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The request ID.

0be3e0bd16661643917136451ebf55
httpCodeinteger

The HTTP status code.

  • 1xx: informational response. The request is received and is being processed.
  • 2xx: success. The request is successfully received, understood, and accepted by the server.
  • 3xx: redirection. The request is redirected, and further actions are required to complete the request.
  • 4xx: client error. The request contains invalid request parameters and syntaxes, or specific request conditions cannot be met.
  • 5xx: server error. The server cannot meet requirements due to other reasons.
200
errorCodestring

The error code.

OBJECT_NOT_EXIST
errorMsgstring

The error message.

This object does not exist.
dataobject

The data returned.

storagePartitionInfoListarray<object>

The partition storage information.

storagePartitionInfoListobject

The partition storage information.

projectNamestring

The project name.

odps_project
schemaNamestring

The schema name.

schema
tableNamestring

The table name.

bank_data
partitionstring

The partition name.

ds=20241201
isPartitionedboolean

Indicates whether the table is a partitioned table. This operation returns the partition information. You do not need to take note of this parameter.

false
typestring

The type.

PARTITION
storageTypestring

The storage type.

  • standard
  • lowfrequency
  • longterm
standard
totalFrequencylong

The access frequency.

Note
  • Access behaviors include:

  • The table is used as the input table of an SQL task.

  • The table is downloaded by Tunnel.

  • The table is read by calling the Storage API. The partition granularity of the partitioned table is not available. Each time an access operation is performed, the access frequency is incremented by 1.

  • The data collection method is upgraded from July 2023. If the data is not accessed after the upgrade or is accessed by using ALGO jobs or the direct read method of Hologres, the access frequency cannot be collected.

10
totalInputAmountdouble

The total amount of accessed data.

Note The amount of data that is read by all access behaviors.
1
totalInputAmountUnitstring

The unit of the total amount of accessed data.

GB
fileCountlong

The number of files.

2
fileSizedouble

The storage size.

1
fileSizeUnitstring

The unit of the storage size.

GB
ratedouble

The change rate of the total storage usage compared with that of the recent {$recentDays} days. No value is returned.

1%
lastAccessTimelong

The time when the partition data was last accessed.

Note The data collection method is upgraded from July 2023. If the data is not accessed after the upgrade or is accessed by using ALGO jobs or the direct read method of Hologres, the last access time cannot be collected.
1694589365
datestring

The date on which the statistics are collected.

20241205
totalCountlong

The total number of returned entries.

57
pageNumberlong

The page number.

1
pageSizelong

The number of entries per page.

10

Examples

Sample success responses

JSONformat

{
  "requestId": "0be3e0bd16661643917136451ebf55",
  "httpCode": 200,
  "errorCode": "OBJECT_NOT_EXIST",
  "errorMsg": "This object does not exist.",
  "data": {
    "storagePartitionInfoList": [
      {
        "projectName": "odps_project",
        "schemaName": "schema",
        "tableName": "bank_data",
        "partition": "ds=20241201",
        "isPartitioned": false,
        "type": "PARTITION",
        "storageType": "standard",
        "totalFrequency": 10,
        "totalInputAmount": 1,
        "totalInputAmountUnit": "GB",
        "fileCount": 2,
        "fileSize": 1,
        "fileSizeUnit": "GB",
        "rate": 0,
        "lastAccessTime": 1694589365
      }
    ],
    "date": 20241205,
    "totalCount": 57,
    "pageNumber": 1,
    "pageSize": 10
  }
}

Error codes

For a list of error codes, visit the Service error codes.