Skip to main content

ListSelectedTables

Retrieve the data tables associated with the current workspace.

Try it now

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful call, OpenAPI Explorer can automatically generate SDK code examples. Try it now

RAM authorization

The following table describes the authorization information for this API. You can use the Action element in RAM policy statements to grant RAM users or RAM roles the permission to call this API. Details:
  • Action: the specific permission point.
  • Access level: the access level of each action. Valid values: Write, Read, and List.
  • Resource type: the resource types that support authorization for the action. Details:
    • Required resource types are marked with a leading *.
    • For actions that do not support resource-level authorization, All Resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: the other permissions required to successfully perform the action. The caller must have the permissions of all dependent actions for the operation to succeed.
ActionAccess levelResource typeCondition keyDependent action
dataanalysisgbi:ListSelectedTablesnone
*All Resources
*
    None
None

Request syntax

POST /gbi/list/datasource/table HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

The ID of the Alibaba Cloud Model Studio workspace used for the current request.

llm-2v3934xtp49esw64
bodyobjectNo

Request body parameters.

nextTokenstringNo

Paging cursor.

  • If this is the first call, do not pass this parameter.

  • For subsequent calls, pass the nextToken returned from the previous call.

e8Z0nRyY51ZQmYljqGNK
maxResultsintegerNo

The maximum number of entries per page.

10

Response elements

NameTypeDescriptionExample value
object

Result

dataany

Returned information

{ "data": { "data": [ { "tableIdKey": "table-AAAAAAAAFP8AL2bSar8jcQ", "workSpaceId": "10026203", "description": "Table storing customer information", "foreignKey": "orders.customer_id=customers.customer_id", "primaryKey": "customer_id", "tableName": "customers" }, { "tableIdKey": "table-AAAAAAAAFP8AL2bSar8jcQ", "workSpaceId": "10026203", "description": "Table storing order information", "foreignKey": "orders.customer_id=customers.customer_id", "primaryKey": "order_id", "tableName": "orders" }, { "tableIdKey": "table-AAAAAAAAFP8AL2bSar8jcQ", "workSpaceId": "10026203", "description": "Table storing product information", "foreignKey": "", "primaryKey": "product_id", "tableName": "products" } ], "nextToken": "GsLIn+Ur2OowIcLywVF9Vg==", "totalCount": 0 } }
errorMsgstring

Error description

NoAuth
codestring

Error code

NoAuth
successboolean

true indicates a successful API call, and false indicates a failed API call

true
requestIdstring

The request ID. Each request has a unique value for subsequent troubleshooting.

FB11F719-9AC8-5C99-AB0A-4709D437FCFC

Examples

Success response JSON format
{
  "data": {
    "data": {
      "data": [
        {
          "tableIdKey": "table-AAAAAAAAFP8AL2bSar8jcQ",
          "workSpaceId": 10026203,
          "description": "存储客户信息的表",
          "foreignKey": "orders.customer_id=customers.customer_id",
          "primaryKey": "customer_id",
          "tableName": "customers"
        },
        {
          "tableIdKey": "table-AAAAAAAAFP8AL2bSar8jcQ",
          "workSpaceId": 10026203,
          "description": "存储订单信息的表",
          "foreignKey": "orders.customer_id=customers.customer_id",
          "primaryKey": "order_id",
          "tableName": "orders"
        },
        {
          "tableIdKey": "table-AAAAAAAAFP8AL2bSar8jcQ",
          "workSpaceId": 10026203,
          "description": "存储产品信息的表",
          "foreignKey": "",
          "primaryKey": "product_id",
          "tableName": "products"
        }
      ],
      "nextToken": "GsLIn+Ur2OowIcLywVF9Vg==",
      "totalCount": 0
    }
  },
  "errorMsg": "NoAuth",
  "code": "NoAuth",
  "success": true,
  "requestId": "FB11F719-9AC8-5C99-AB0A-4709D437FCFC"
}

Error codes

HTTP status codeError codeError messageDescription
401Internal.ErrorBad Request: Internal Error.Internal error. Contact customer service personnel for troubleshooting.
401NoAuthBad Request: Workspace.Illegal.Auth.The current account does not have the permission on the specified workspace.
Visit the Error Center to view more error codes.