Queries the information about a DataService Studio API in the published state.
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProjectId | long | Yes | The ID of the workspace. | 10002 |
| TenantId | long | No | The tenant ID. To obtain the tenant ID, perform the following steps: Log on to the DataWorks console. Find your workspace and go to the DataStudio page. On the DataStudio page, click the logon username in the upper-right corner and click User Info in the Menu section. | 10003 |
| ApiId | long | Yes | The ID of the API. | 10001 |
Response parameters
The details about the APIs of different types are returned in different parameters. The details about the API generated in wizard mode are returned in the WizardDetails parameter. The details about the API generated in script mode are returned in the ScriptDetails parameter. The details about the API generated by registration are returned in the RegistrationDetails parameter.
Examples
Sample success responses
JSONformat
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The connection does not exist.",
"Success": true,
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Data": {
"Timeout": 10000,
"Status": 1,
"ApiId": 10000,
"ApiMode": 0,
"ProjectId": 10001,
"ResponseContentType": 0,
"CreatorId": 1234567,
"VisibleRange": 0,
"ModifiedTime": "2020-06-23T00:21:01+0800",
"OperatorId": 2345678,
"GroupId": "ab12**",
"Description": "Description of the test API\n",
"RequestMethod": 0,
"CreatedTime": "2020-06-23T00:21:01+0800",
"ApiName": "Name of the test API\n",
"TenantId": 10001,
"ApiPath": "/test/1",
"Protocols": [
0
],
"RegistrationDetails": {
"ServiceHost": "http://example.aliyundoc.com",
"ServiceContentType": 0,
"ServicePath": "/index",
"SuccessfulResultSample": {
"success": true
},
"FailedResultSample": {
"success": false
},
"ServiceRequestBodyDescription": {
"abc": 1
},
"RegistrationErrorCodes": [
{
"ErrorMessage": "The connection does not exist.",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"ErrorSolution": "retry"
}
],
"RegistrationRequestParameters": [
{
"ParameterName": "name1",
"ParameterPosition": 0,
"ParameterDescription": "description1",
"DefaultValue": "default1",
"ParameterOperator": 0,
"ExampleValue": "example1",
"ParameterDataType": 0,
"IsRequiredParameter": true
}
]
},
"ScriptDetails": {
"IsPagedResponse": true,
"SuccessfulResultSample": {
"success": true
},
"FailedResultSample": {
"success": false
},
"Script": "select a from t",
"ScriptErrorCodes": [
{
"ErrorMessage": "fail to call",
"ErrorCode": 1001,
"ErrorSolution": "retry"
}
],
"ScriptRequestParameters": [
{
"ParameterName": "param1",
"ParameterPosition": 0,
"ParameterDescription": "description1",
"DefaultValue": "default1",
"ParameterOperator": 0,
"ExampleValue": "example1",
"ParameterDataType": 0,
"IsRequiredParameter": true
}
],
"ScriptResponseParameters": [
{
"ParameterDescription": "description2",
"ParameterName": "param2",
"ExampleValue": "example2",
"ParameterDataType": 0
}
],
"ScriptConnection": {
"TableName": "t",
"ConnectionId": 123
}
},
"WizardDetails": {
"IsPagedResponse": true,
"SuccessfulResultSample": {
"success": true
},
"FailedResultSample": {
"success": false
},
"WizardErrorCodes": [
{
"ErrorMessage": "fail to call",
"ErrorCode": 1001,
"ErrorSolution": "retry"
}
],
"WizardRequestParameters": [
{
"ParameterName": "param1",
"ParameterPosition": 0,
"ParameterDescription": "description1",
"DefaultValue": "default1",
"ParameterOperator": 0,
"ExampleValue": "example1",
"ParameterDataType": 0,
"IsRequiredParameter": true
}
],
"WizardResponseParameters": [
{
"ParameterDescription": "description2",
"ParameterName": "param2",
"ExampleValue": "example2",
"ParameterDataType": 0
}
],
"WizardConnection": {
"TableName": "t",
"ConnectionId": 123
}
},
"SqlMode": 0
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | - |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | - |
| 429 | Throttling.User | Your request is too frequent. Try again later. | - |
| 500 | InternalError.System | An internal system error occurred. Try again later. | - |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-10-10 | The Error code has changed | View Change Details |
