All Products
Search
Document Center

MaxCompute:GetPackage

Last Updated:Mar 03, 2024

Obtains the information about a package.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /api/v1/projects/{projectName}/packages/{packageName}

Request parameters

ParameterTypeRequiredDescriptionExample
projectNamestringYes

The name of the MaxCompute project.

projectA
packageNamestringYes

The name of the package.

test_package
sourceProjectstringNo

The project to which the package belongs. This parameter is required if the package is installed in the MaxCompute project.

projectB

Response parameters

ParameterTypeDescriptionExample
object

PopResult

requestIdstring

The ID of the request.

0b57ff8316614119858417939e3e54
httpCodeinteger

Indicates whether the request was successful. If this parameter was not empty and the value of this parameter was not 200, the request failed.

200
errorCodestring

The error code returned if the request failed.

040002
errorMsgstring

The error message.

error message.
dataobject

The returned data.

allowedProjectListobject []

The projects in which the package is installed.

labelstring

The security level for sensitive data.

2
projectstring

The name of the MaxCompute project.

proejctB
resourceListobject

The details of the resources that are included in the package.

tableobject []

The tables.

namestring

The name of the table.

dim_odps
schemaNamestring

The name of schema.

default
actionsarray

The operations that were performed on the table.

string

The operations that were performed on the table.

describe
resourceobject []

The resources.

namestring

The name of the resource.

res_1
schemaNamestring

The name of schema.

default
actionsarray

The operations that were performed on the resource.

string

The operations that were performed on the resource.

read
functionobject []

The functions.

namestring

The name of the function.

function_1
schemaNamestring

The name of schema.

default
actionsarray

The operations that were performed on the function.

string

The operations that were performed on the function.

read

Examples

Sample success responses

JSONformat

{
  "requestId": "0b57ff8316614119858417939e3e54",
  "httpCode": 200,
  "errorCode": "040002",
  "errorMsg": "error message.",
  "data": {
    "allowedProjectList": [
      {
        "label": "2",
        "project": "proejctB"
      }
    ],
    "resourceList": {
      "table": [
        {
          "name": "dim_odps\n",
          "schemaName": "default",
          "actions": [
            "describe"
          ]
        }
      ],
      "resource": [
        {
          "name": "res_1",
          "schemaName": "default",
          "actions": [
            "read"
          ]
        }
      ],
      "function": [
        {
          "name": "function_1",
          "schemaName": "default",
          "actions": [
            "read"
          ]
        }
      ]
    }
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-12-10The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.