All Products
Search
Document Center

ApsaraDB for OceanBase:DescribeSQLDetails

Last Updated:Apr 29, 2024

You can call this operation to query the SQL text of an SQL statement based on the SQL ID.

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 parameters

ParameterTypeRequiredDescriptionExample
TenantIdstringYes

SQLID.

t2mr3oae0****
SQLIdstringYes

The SQL text.

8D6E84****0B8FB1823D199E2CA1****

Response parameters

ParameterTypeDescriptionExample
object

The name of the database.

RequestIdstring

The operation that you want to perform.
Set the value to DescribeSQLDetails.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
SQLDetailsobject []
http(s)://[Endpoint]/?Action=DescribeSQLDetails
&TenantId=t2mr3oae0****
&SQLId=8D6E84****0B8FB1823D199E2CA1****
&Common request parameters
SQLTextstring

{"name":"DescribeSQLDetails","product":"OceanBasePro","version":"2019-09-01","path":"/","deprecated":0,"method":"POST|GET","protocol":"HTTP|HTTPS","hidden":0,"timeout":10000,"parameter_type":"Single","params":"[{"name":"Action","position":"Query","required":true,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","description":"","example":"DescribeSQLDetails"},{"name":"TenantId","position":"Body","required":true,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","title":"","description":"","example":"t2mr3oae0****"},{"name":"SQLId","position":"Body","required":true,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","title":"SQLID","description":"SQLID。","example":"8D6E840B8FB1823D199E2CA1"}]","response_headers":"[]","response":"{"type":"Object","children":[{"name":"RequestId","required":false,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","title":"","description":"","example":"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"},{"name":"SQLDetails","required":false,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"Array","subType":"Object","description":" ","children":[{"name":"SQLText","required":false,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","title":"","description":"","example":"SELECT **** FROM **** WHERE **** = ? AND **** = ? ORDER BY **** ASC"},{"name":"DbName","required":false,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","title":"","description":"","example":"testdb"},{"name":"UserName","required":false,"checkBlank":false,"visibility":"Public","deprecated":false,"type":"String","title":"","description":"","example":"tester"}],"title":""}],"title":"","description":""}","errors":"{}"}

SELECT **** FROM **** WHERE **** = ? AND **** = ? ORDER BY **** ASC

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "SQLDetails": [
    {
      "SQLText": "SELECT  ****   FROM ****   WHERE **** = ? AND **** = ?   ORDER BY **** ASC",
      "DbName": "testdb",
      "UserName": "tester"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history