OperateOdpsCatalog
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
Test
RAM authorization
|
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.