ListDataServiceApis
Queries a list of APIs in the development state.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
| ProjectId |
integer |
Yes |
The workspace ID. |
10000 |
| TenantId |
integer |
No |
The tenant ID. You can find this in the DataWorks console by navigating to DataStudio and clicking your username > User Info. |
10001 |
| ApiNameKeyword |
string |
No |
The keyword to filter APIs by name. |
My API name |
| ApiPathKeyword |
string |
No |
The keyword to filter APIs by path. |
/test/ |
| CreatorId |
string |
No |
The Alibaba Cloud account ID of the API creator. Used to filter APIs by creator. |
123456 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
0000-ABCD-EFG**** |
| ErrorMessage |
string |
The error message. |
The connection does not exist. |
| Success |
boolean |
Whether the request was successful. |
true |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Data |
object |
The data returned. |
|
| PageNumber |
integer |
The page number. Same as the PageNumber request parameter. |
1 |
| PageSize |
integer |
The number of entries per page. Valid values: 1 to 50. Default value: 10. |
10 |
| TotalCount |
integer |
The total number of entries returned. |
100 |
| Apis |
array<object> |
The list of APIs in the development state. |
|
|
array<object> |
The returned result. |
||
| Timeout |
integer |
The timeout period of the API request. Unit: milliseconds. |
10000 |
| Status |
integer |
The API status. Valid values: 0 (unpublished), 1 (published). |
0 |
| ApiId |
integer |
The API ID. |
10002 |
| ApiMode |
integer |
The API type. Valid values: 0 (wizard mode), 1 (script mode), 2 (registration). |
0 |
| ProjectId |
integer |
The workspace ID. |
10000 |
| ResponseContentType |
integer |
The response format. Valid values: 0 (JSON), 1 (XML). Wizard and script mode APIs support JSON only. Registration APIs support both JSON and XML. |
0 |
| CreatorId |
string |
The Alibaba Cloud account ID of the API creator. |
1234567 |
| VisibleRange |
integer |
The API visibility scope. Valid values: 0 (workspace), 1 (owner only). |
0 |
| ModifiedTime |
string |
The time when the API was last modified. |
2020-06-23T00:21:01+0800 |
| OperatorId |
string |
The Alibaba Cloud account ID of the user who last modified the API. |
2345678 |
| GroupId |
string |
The group ID. |
abcde123456789 |
| Description |
string |
The description of the API. |
Test API description |
| FolderId |
integer |
The folder ID. |
0 |
| RequestMethod |
integer |
The request method. Valid values: 0 (GET), 1 (POST), 2 (PUT), 3 (DELETE). Wizard and script mode APIs support GET and POST only. Registration APIs support all four methods. |
0 |
| CreatedTime |
string |
The time when the API was created. |
2020-06-23T00:21:01+0800 |
| ApiName |
string |
The name of the API. |
My API name |
| TenantId |
integer |
The tenant ID. |
10000 |
| ApiPath |
string |
The path of the API. |
/test/1 |
| Protocols |
array |
The list of fields. |
|
|
integer |
The protocol. Valid values: 0 (HTTP), 1 (HTTPS). An API can support multiple protocols. |
0 |
|
| RegistrationDetails |
object |
The registration API details. Returned only for registration APIs. |
|
| ServiceHost |
string |
The URL of the backend service. |
http://example.aliyundoc.com |
| ServiceContentType |
integer |
The response format. Valid values: 0 (JSON), 1 (XML). Wizard and script mode APIs support JSON only. Registration APIs support both JSON and XML. |
0 |
| ServicePath |
string |
The path of the backend service. |
/index |
| SuccessfulResultSample |
string |
The sample success response of the API. |
{"success": true} |
| FailedResultSample |
string |
The sample error response of the API. |
{"success": false} |
| ServiceRequestBodyDescription |
string |
The request body description for the backend service call. |
{"abc":1} |
| RegistrationErrorCodes |
array<object> |
The error codes returned for the API generated by registration. |
|
|
object |
|||
| ErrorMessage |
string |
The error message. |
fail to call |
| ErrorCode |
string |
The error code. |
1001 |
| ErrorSolution |
string |
The error resolution. |
retry |
| RegistrationRequestParameters |
array<object> |
The request parameters of the API generated by registration. |
|
|
object |
|||
| ColumnName |
string |
The associated field name. Wizard mode APIs only. |
column1 |
| ParameterName |
string |
The name of the parameter. |
name1 |
| ParameterPosition |
integer |
The parameter position. Valid values: 0 (URL path), 1 (query string), 2 (header), 3 (body). Wizard and script mode APIs support query only. Registration: GET/DELETE support query and header; PUT/POST support query, header, and body. |
0 |
| ParameterDescription |
string |
The description. |
description1 |
| DefaultValue |
string |
The default value. |
default1 |
| ParameterOperator |
integer |
The parameter operator. Valid values: 0 (Equal), 1 (Like), 2 (Const), 3 (In). Supported operators: wizard (Equal, Like, In), script (Equal), registration (Equal, Const). |
0 |
| ParameterDataType |
integer |
The data type of the parameter. Valid values:
|
0 |
| ExampleValue |
string |
The sample value. |
example1 |
| IsRequiredParameter |
boolean |
Whether the parameter is required. |
true |
| ScriptDetails |
object |
The script mode API details. Returned only for script mode APIs. |
|
| Script |
string |
The SQL script. |
select a from t |
| IsPagedResponse |
boolean |
Whether the response is paginated. |
true |
| ScriptRequestParameters |
array<object> |
The request parameters of the API generated in script mode. |
|
|
object |
|||
| ColumnName |
string |
The associated field name. Wizard mode APIs only. |
column1 |
| ParameterName |
string |
The name of the parameter. |
param1 |
| ParameterPosition |
integer |
The position of the parameter. Valid values:
APIs generated in wizard or script mode support only the Query position. APIs generated by registration whose request method is GET or DELETE support the Query and Head positions. APIs generated by registration whose request method is PUT or POST support the Query, Head, and Body positions. |
0 |
| ParameterDescription |
string |
The description. |
description1 |
| DefaultValue |
string |
The default value. |
default1 |
| ParameterOperator |
integer |
The operator used for the value of the parameter. Valid values:
APIs generated in wizard mode support the Equal, Like, and In operators. APIs generated in script mode support the Equal operator. APIs generated by registration support the Equal and Const operators. |
0 |
| ParameterDataType |
integer |
The data type of the parameter. Valid values:
|
0 |
| ExampleValue |
string |
The sample value. |
example1 |
| IsRequiredParameter |
boolean |
Whether the parameter is required. |
true |
| ScriptResponseParameters |
array<object> |
The response parameters of the API generated in script mode. |
|
|
object |
|||
| ParameterDescription |
string |
The description. |
description2 |
| ColumnName |
string |
The associated field name. Wizard mode APIs only. |
column2 |
| ParameterName |
string |
The name of the parameter. |
param2 |
| ParameterDataType |
integer |
The data type of the parameter. Valid values:
|
0 |
| ExampleValue |
string |
The sample value. |
example2 |
| ScriptConnection |
object |
The data source information about the API generated in script mode. |
|
| TableName |
string |
The name of the table in the data source. |
t |
| ConnectionId |
integer |
The data source ID. |
123 |
| WizardDetails |
object |
The wizard mode API details. Returned only for wizard mode APIs. |
|
| IsPagedResponse |
boolean |
Whether the response is paginated. |
true |
| WizardRequestParameters |
array<object> |
The request parameters of the API generated in wizard mode. |
|
|
object |
|||
| ColumnName |
string |
The associated field name. Wizard mode APIs only. |
column1 |
| ParameterName |
string |
The name of the parameter. |
param1 |
| ParameterPosition |
integer |
The parameter position. Valid values: 0 (URL path), 1 (query string), 2 (header), 3 (body). Wizard and script mode APIs support query only. Registration: GET/DELETE support query and header; PUT/POST support query, header, and body. |
0 |
| ParameterDescription |
string |
The description. |
description1 |
| DefaultValue |
string |
The default value. |
default1 |
| ParameterOperator |
integer |
The parameter operator. Valid values: 0 (Equal), 1 (Like), 2 (Const), 3 (In). Supported operators: wizard (Equal, Like, In), script (Equal), registration (Equal, Const). |
0 |
| ParameterDataType |
integer |
The data type of the parameter. Valid values:
|
0 |
| ExampleValue |
string |
The sample value. |
example1 |
| IsRequiredParameter |
boolean |
Whether the parameter is required. |
true |
| WizardResponseParameters |
array<object> |
The response parameters of the API generated in wizard mode. |
|
|
object |
|||
| ParameterDescription |
string |
The description. |
description2 |
| ColumnName |
string |
The associated field name. Wizard mode APIs only. |
column2 |
| ParameterName |
string |
The name of the parameter. |
param2 |
| ParameterDataType |
integer |
The data type of the parameter. Valid values:
|
0 |
| ExampleValue |
string |
The sample value. |
example2 |
| WizardConnection |
object |
The data source information about the API generated in wizard mode. |
|
| TableName |
string |
The name of the table in the data source. |
t |
| ConnectionId |
integer |
The data source ID. |
123 |
API details vary by type: wizard mode APIs use WizardDetails, script mode APIs use ScriptDetails, and registration APIs use RegistrationDetails.
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The connection does not exist.",
"Success": true,
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 100,
"Apis": [
{
"Timeout": 10000,
"Status": 0,
"ApiId": 10002,
"ApiMode": 0,
"ProjectId": 10000,
"ResponseContentType": 0,
"CreatorId": "1234567",
"VisibleRange": 0,
"ModifiedTime": "2020-06-23T00:21:01+0800",
"OperatorId": "2345678",
"GroupId": "abcde123456789",
"Description": "Test API description",
"FolderId": 0,
"RequestMethod": 0,
"CreatedTime": "2020-06-23T00:21:01+0800",
"ApiName": "My API name",
"TenantId": 10000,
"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": "fail to call",
"ErrorCode": "1001",
"ErrorSolution": "retry"
}
],
"RegistrationRequestParameters": [
{
"ColumnName": "column1",
"ParameterName": "name1",
"ParameterPosition": 0,
"ParameterDescription": "description1",
"DefaultValue": "default1",
"ParameterOperator": 0,
"ParameterDataType": 0,
"ExampleValue": "example1",
"IsRequiredParameter": true
}
]
},
"ScriptDetails": {
"Script": "select a from t",
"IsPagedResponse": true,
"ScriptRequestParameters": [
{
"ColumnName": "column1",
"ParameterName": "param1",
"ParameterPosition": 0,
"ParameterDescription": "description1",
"DefaultValue": "default1",
"ParameterOperator": 0,
"ParameterDataType": 0,
"ExampleValue": "example1",
"IsRequiredParameter": true
}
],
"ScriptResponseParameters": [
{
"ParameterDescription": "description2",
"ColumnName": "column2",
"ParameterName": "param2",
"ParameterDataType": 0,
"ExampleValue": "example2"
}
],
"ScriptConnection": {
"TableName": "t",
"ConnectionId": 123
}
},
"WizardDetails": {
"IsPagedResponse": true,
"WizardRequestParameters": [
{
"ColumnName": "column1",
"ParameterName": "param1",
"ParameterPosition": 0,
"ParameterDescription": "description1",
"DefaultValue": "default1",
"ParameterOperator": 0,
"ParameterDataType": 0,
"ExampleValue": "example1",
"IsRequiredParameter": true
}
],
"WizardResponseParameters": [
{
"ParameterDescription": "description2",
"ColumnName": "column2",
"ParameterName": "param2",
"ParameterDataType": 0,
"ExampleValue": "example2"
}
],
"WizardConnection": {
"TableName": "t",
"ConnectionId": 123
}
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.