OperateOdpsCatalog

Updated at:

Forwards a request with the specified method, path, and parameters to MaxCompute Catalog and returns the catalog response. This operation can be used for semantic models, data scanning, and connections.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:OperateOdpsCatalog

none

*All Resource

*

None None

Request syntax

POST /api/v1/odpsCatalogs HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AkProven

string

No

The authentication information generated by the POP gateway. You do not need to specify this parameter.

Injected by the POP gateway

body

object

No

The request to forward to the catalog, including the target HTTP method, path, and optional request parameters.

body

string

No

The request body to forward to the catalog. If the target API operation accepts JSON, serialize the JSON object into a string. You can omit this parameter when querying the list of semantic models.

{"description":"Sales analysis semantic model"}

headers

object

No

The additional request headers to forward to the catalog. The key is the header name and the value is the corresponding string.

{"Accept":"application/json"}

string

No

The value of the additional request header.

application/json

method

string

Yes

The HTTP method to forward to the catalog. Specify GET, POST, PUT, DELETE, or PATCH based on the target API operation.

GET

pathName

string

Yes

The path of the target catalog API operation, which starts with /api/catalog/v1alpha/. Place query parameters in searchParams.

/api/catalog/v1alpha/namespaces/1234567890123456/semanticSpecs

searchParams

object

No

The query parameters to forward to the catalog. The key is the parameter name and the value is passed as a string, such as setting pageSize to "20".

{"pageSize":"20"}

string

No

The value of the query parameter for the target API operation.

20

Call this API operation by using the POST method. In the request body, method specifies the HTTP method to forward to the catalog, pathName specifies the path of the target API operation, and query parameters are placed in searchParams.

The following example queries the list of semantic models in a namespace. When you call the operation, replace the sample value in the path with the target namespace ID.

{
  "method": "GET",
  "pathName": "/api/catalog/v1alpha/namespaces/1234567890123456/semanticSpecs",
  "searchParams": {
    "pageSize": "20"
  }
}

Response elements

Element

Type

Description

Example

object

PopResult

data

object

The response returned when the catalog API operation is successfully executed, including the HTTP status code, status text, response headers, and body.

body

string

The body string returned by the catalog. The specific structure is determined by the target API operation.

{"semanticSpecs":[]}

headers

object

The HTTP response headers returned by the catalog. The key is the header name and the value is the corresponding string.

{"Content-Type":"application/json; charset=utf-8"}

string

The value of the catalog response header.

application/json; charset=utf-8

message

string

The HTTP status text of the catalog response. This field can be empty if the response does not provide a status text.

OK

statusCode

integer

The HTTP status code returned by the catalog API operation.

200

errorCode

string

The error code returned when the request fails.

AccessDenied

errorMsg

string

The error message returned when the request fails.

Access denied.

httpCode

integer

The HTTP status code in the API result. You can omit this field when the call is successful. For the status code of the catalog, see data.statusCode.

403

requestId

string

The unique identifier of the API request, which can be used to troubleshoot call issues.

3B5C4DB9-6E9F-4D68-9BA1-4E516A7B42CE

If the request is successful, data.statusCode is the HTTP status code returned by the catalog, and data.body is the body string returned by the catalog. If the body is in JSON format, you can parse it based on the structure of the target catalog API operation.

The following example indicates that the request is successful and the list is empty.

{
  "requestId": "3B5C4DB9-6E9F-4D68-9BA1-4E516A7B42CE",
  "data": {
    "statusCode": 200,
    "body": "{\"semanticSpecs\":[]}"
  }
}

Examples

Success response

JSON format

{
  "data": {
    "body": "{\"semanticSpecs\":[]}",
    "headers": {
      "key": "application/json; charset=utf-8"
    },
    "message": "OK",
    "statusCode": 200
  },
  "errorCode": "AccessDenied",
  "errorMsg": "Access denied.",
  "httpCode": 403,
  "requestId": "3B5C4DB9-6E9F-4D68-9BA1-4E516A7B42CE"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.