Queries the information about APIs in the development state.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListDataServiceApis |
The operation that you want to perform. Set the value to ListDataServiceApis. |
RegionId | String | Yes | cn-shanghai |
The ID of the region. |
PageNumber | Integer | Yes | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageSize | Integer | Yes | 10 |
The number of entries to return on each page. Default value: 10. A maximum of 100 entries can be returned on each page. |
ProjectId | Long | Yes | 10000 |
The ID of the workspace. |
TenantId | Long | Yes | 10001 |
The ID of the tenant. |
ApiNameKeyword | String | No | My API name |
The keyword in the name of the API. The keyword can be used to search for the API whose name contains the keyword. |
ApiPathKeyword | String | No | /test/ |
The keyword in the path of the API. The keyword can be used to search for the API whose path contains the keyword. |
CreatorId | String | No | 12345 |
The ID of the Alibaba Cloud account used by the creator of the API. The ID can be used to search for the API created by the creator. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
HttpStatusCode | Integer | 200 |
The HTTP status code. |
RequestId | String | 0000-ABCD-EFG**** |
The ID of the request. |
ErrorMessage | String | The connection does not exist. |
The error message. |
Success | Boolean | true |
Indicates whether the request is successful. |
ErrorCode | String | Invalid.Tenant.ConnectionNotExists |
The error code. |
Data | Object |
The information about the APIs in the development state. |
|
PageNumber | Integer | 1 |
The page number of the returned page. The value of this parameter is the same as that of the PageNumber parameter in the request. |
PageSize | Integer | 10 |
The number of entries returned per page. Default value: 10. A maximum of 100 entries can be returned on each page. |
TotalCount | Integer | 100 |
The total number of entries. |
Apis | Array of Api |
The APIs in the development state. |
|
Timeout | Integer | 10000 |
The timeout period of the API request. Unit: milliseconds. |
Status | Integer | 0 |
The status of the API. Valid values: 0 and 1. A value of 0 indicates that the API is not published. A value of 1 indicates that the API is published. |
ApiId | Long | 10002 |
The ID of the API. |
ApiMode | Integer | 0 |
The type of the API. Valid values: 0, 1, and 2. A value of 0 indicates that the API is generated in wizard mode. A value of 1 indicates that the API is generated in script mode. A value of 2 indicates that the API is generated by registration. |
ProjectId | Long | 10000 |
The ID of the workspace. |
ResponseContentType | Integer | 0 |
The format in which the response of the API request is returned. Valid values: 0 and 1. A value of 0 indicates the JSON format. A value of 1 indicates the XML format. APIs generated in wizard or script mode support the JSON format. APIs generated by registration support the JSON and XML formats. |
CreatorId | String | 1234567 |
The ID of the Alibaba Cloud account used by the creator of the API. |
VisibleRange | Integer | 0 |
The scope in which the API is visible. Valid values: 0 and 1. A value of 0 indicates that the API is visible within the workspace. A value of 1 indicates that the API is visible only to the API creator. |
ModifiedTime | String | 2020-06-23T00:21:01+0800 |
The time when the API was last modified. |
OperatorId | String | 2345678 |
The ID of the Alibaba Cloud account used by the user who last modified the API. |
GroupId | String | abcde123456789 |
The ID of the API group. |
Description | String | API description |
The description of the API. |
FolderId | Long | 0 |
The ID of the folder in which the API is stored. |
RequestMethod | Integer | 0 |
The request method of the API. Valid values: 0, 1, 2, and 3. A value of 0 indicates the GET method. A value of 1 indicates the POST method. A value of 2 indicates the PUT method. A value of 3 indicates the DELETE method. APIs generated in wizard or script mode support the GET and POST methods. APIs generated by registration support the GET, POST, PUT, and DELETE methods. |
CreatedTime | String | 2020-06-23T00:21:01+0800 |
The time when the API was created. |
ApiName | String | My API name |
The name of the API. |
TenantId | Long | 10000 |
The ID of the tenant. |
ApiPath | String | /test/1 |
The path of the API. |
Protocols | Array of Integer | 0 |
The protocols used by the API. Valid values: 0 and 1. A value of 0 indicates that the API uses HTTP. A value of 1 indicates that the API uses HTTPS. Multiple protocols are presented in a list. |
RegistrationDetails | Object |
The details of the API generated by registration. This parameter is returned only if the API is generated by registration. |
|
ServiceHost | String | http://example.aliyundoc.com |
The URL of the backend service. |
ServiceContentType | Integer | 0 |
The format in which the response of the API request is returned. Valid values: 0 and 1. A value of 0 indicates the JSON format. A value of 1 indicates the XML format. APIs generated in wizard or script mode support the JSON format. APIs generated by registration support the JSON and XML formats. |
ServicePath | String | /index |
The path of the backend service. |
SuccessfulResultSample | String | null |
The sample success response of the API. |
FailedResultSample | String | null |
The sample error response of the API. |
ServiceRequestBodyDescription | String | null |
The body of the request initiated to call the backend service. |
RegistrationErrorCodes | Array of RegistrationErrorCode |
The error codes returned for the API generated by registration. |
|
ErrorMessage | String | fail to call |
The error message. |
ErrorCode | String | 1001 |
The error code. |
ErrorSolution | String | retry |
The solution used to resolve the issue. |
RegistrationRequestParameters | Array of RegistrationRequestParameter |
The request parameters of the API generated by registration. |
|
ColumnName | String | column1 |
The name of the associated field. This parameter is supported only if the API is generated in wizard mode. |
ParameterName | String | name1 |
The name of the parameter. |
ParameterPosition | Integer | 0 |
The position of the parameter. Valid values: 0, 1, 2, and 3. A value of 0 indicates that the parameter is in the URL path of the request. A value of 1 indicates that the parameter is in the Query parameter of the request URL. A value of 2 indicates that the parameter is in the request header. A value of 3 indicates that the parameter is in the request body. 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. |
ParameterDescription | String | description1 |
The description of the parameter. |
DefaultValue | String | default1 |
The default value of the parameter. |
ParameterOperator | Integer | 0 |
The operator used for the value of the parameter. Valid values: 0, 1, 2, and 3. A value of 0 indicates that the operator is Equal. A value of 1 indicates that the operator is Like. A value of 2 indicates that the operator is Const. A value of 3 indicates that the operator is In. 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. |
ParameterDataType | Integer | 0 |
The data type of the parameter. Valid values: 0, 1, 2, 3, 4, and 5. A value of 0 indicates the STRING data type. A value of 1 indicates the INT data type. A value of 2 indicates the LONG data type. A value of 3 indicates the FLOAT data type. A value of 4 indicates the DOUBLE data type. A value of 5 indicates the BOOLEAN data type. |
ExampleValue | String | example1 |
The sample value of the parameter. |
IsRequiredParameter | Boolean | true |
Indicates whether the request parameter is required. |
ScriptDetails | Object |
The details of the API generated in script mode. This parameter is returned only if the API is generated in script mode. |
|
Script | String | select a from t |
The SQL script. |
IsPagedResponse | Boolean | true |
Indicates whether the entries are returned by page. |
ScriptRequestParameters | Array of ScriptRequestParameter |
The request parameters of the API generated in script mode. |
|
ColumnName | String | column1 |
The name of the associated field. This parameter is supported only if the API is generated in wizard mode. |
ParameterName | String | param1 |
The name of the parameter. |
ParameterPosition | Integer | 0 |
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. |
ParameterDescription | String | description1 |
The description of the parameter. |
DefaultValue | String | default1 |
The default value of the parameter. |
ParameterOperator | Integer | 0 |
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. |
ParameterDataType | Integer | 0 |
The data type of the parameter. Valid values:
|
ExampleValue | String | example1 |
The sample value of the parameter. |
IsRequiredParameter | Boolean | true |
Indicates whether the request parameter is required. |
ScriptResponseParameters | Array of ScriptResponseParameter |
The response parameters of the API generated in script mode. |
|
ParameterDescription | String | description2 |
The description of the parameter. |
ColumnName | String | column2 |
The name of the associated field. This parameter is supported only if the API is generated in wizard mode. |
ParameterName | String | param2 |
The name of the parameter. |
ParameterDataType | Integer | 0 |
The data type of the parameter. Valid values:
|
ExampleValue | String | example2 |
The sample value of the parameter. |
ScriptConnection | Object |
The data source information of the API generated in script mode. |
|
TableName | String | t |
The name of the table in the data source. |
ConnectionId | Long | 123 |
The ID of the data source. |
WizardDetails | Object |
The details of the API generated in wizard mode. This parameter is returned only if the API is generated in wizard mode. |
|
IsPagedResponse | Boolean | true |
Indicates whether the entries are returned by page. |
WizardRequestParameters | Array of WizardRequestParameter |
The request parameters of the API generated in wizard mode. |
|
ColumnName | String | column1 |
The name of the associated field. This parameter is supported only if the API is generated in wizard mode. |
ParameterName | String | param1 |
The name of the parameter. |
ParameterPosition | Integer | 0 |
The position of the parameter. Valid values: 0, 1, 2, and 3. A value of 0 indicates that the parameter is in the URL path of the request. A value of 1 indicates that the parameter is in the Query parameter of the request URL. A value of 2 indicates that the parameter is in the request header. A value of 3 indicates that the parameter is in the request body. 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. |
ParameterDescription | String | description1 |
The description of the parameter. |
DefaultValue | String | default1 |
The default value of the parameter. |
ParameterOperator | Integer | 0 |
The operator used for the value of the parameter. Valid values: 0, 1, 2, and 3. A value of 0 indicates that the operator is Equal. A value of 1 indicates that the operator is Like. A value of 2 indicates that the operator is Const. A value of 3 indicates that the operator is In. 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. |
ParameterDataType | Integer | 0 |
The data type of the parameter. Valid values: 0, 1, 2, 3, 4, and 5. A value of 0 indicates the STRING data type. A value of 1 indicates the INT data type. A value of 2 indicates the LONG data type. A value of 3 indicates the FLOAT data type. A value of 4 indicates the DOUBLE data type. A value of 5 indicates the BOOLEAN data type. |
ExampleValue | String | example1 |
The sample value of the parameter. |
IsRequiredParameter | Boolean | true |
Indicates whether the request parameter is required. |
WizardResponseParameters | Array of WizardResponseParameter |
The response parameters of the API generated in wizard mode. |
|
ParameterDescription | String | description2 |
The description of the parameter. |
ColumnName | String | column2 |
The name of the associated field. This parameter is supported only if the API is generated in wizard mode. |
ParameterName | String | param2 |
The name of the parameter. |
ParameterDataType | Integer | 0 |
The data type of the parameter. Valid values: 0, 1, 2, 3, 4, and 5. A value of 0 indicates the STRING data type. A value of 1 indicates the INT data type. A value of 2 indicates the LONG data type. A value of 3 indicates the FLOAT data type. A value of 4 indicates the DOUBLE data type. A value of 5 indicates the BOOLEAN data type. |
ExampleValue | String | example2 |
The sample value of the parameter. |
WizardConnection | Object |
The data source information of the API generated in wizard mode. |
|
TableName | String | t |
The name of the table in the data source. |
ConnectionId | Long | 123 |
The ID of the data source. |
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 requests
http(s)://[Endpoint]/?Action=ListDataServiceApis
&PageNumber=1
&PageSize=10
&ProjectId=10000
&TenantId=10001
&ApiNameKeyword=My API name
&ApiPathKeyword=/test/
&CreatorId=12345
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListDataServiceApisResponse>
<HttpStatusCode>200</HttpStatusCode>
<RequestId>0000-ABCD-EFG****</RequestId>
<ErrorMessage>The connection does not exist.</ErrorMessage>
<Success>true</Success>
<ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
<Data>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<TotalCount>100</TotalCount>
<Apis>
<Timeout>10000</Timeout>
<Status>0</Status>
<ApiId>10002</ApiId>
<ApiMode>0</ApiMode>
<ProjectId>10000</ProjectId>
<ResponseContentType>0</ResponseContentType>
<CreatorId>1234567</CreatorId>
<VisibleRange>0</VisibleRange>
<ModifiedTime>2020-06-23T00:21:01+0800</ModifiedTime>
<OperatorId>2345678</OperatorId>
<GroupId>abcde123456789</GroupId>
<Description>API description</Description>
<FolderId>0</FolderId>
<RequestMethod>0</RequestMethod>
<CreatedTime>2020-06-23T00:21:01+0800</CreatedTime>
<ApiName>My API name</ApiName>
<TenantId>10000</TenantId>
<ApiPath>/test/1</ApiPath>
<Protocols>0</Protocols>
<RegistrationDetails>
<ServiceHost>http://example.aliyundoc.com</ServiceHost>
<ServiceContentType>0</ServiceContentType>
<ServicePath>/index</ServicePath>
<SuccessfulResultSample>{"success": true}</SuccessfulResultSample>
<FailedResultSample>{"success": false}</FailedResultSample>
<ServiceRequestBodyDescription>{"abc":1}</ServiceRequestBodyDescription>
<RegistrationErrorCodes>
<ErrorMessage>fail to call</ErrorMessage>
<ErrorCode>1001</ErrorCode>
<ErrorSolution>retry</ErrorSolution>
</RegistrationErrorCodes>
<RegistrationRequestParameters>
<ColumnName>column1</ColumnName>
<ParameterName>name1</ParameterName>
<ParameterPosition>0</ParameterPosition>
<ParameterDescription>description1</ParameterDescription>
<DefaultValue>default1</DefaultValue>
<ParameterOperator>0</ParameterOperator>
<ParameterDataType>0</ParameterDataType>
<ExampleValue>example1</ExampleValue>
<IsRequiredParameter>true</IsRequiredParameter>
</RegistrationRequestParameters>
</RegistrationDetails>
<ScriptDetails>
<Script>select a from t</Script>
<IsPagedResponse>true</IsPagedResponse>
<ScriptRequestParameters>
<ColumnName>column1</ColumnName>
<ParameterName>param1</ParameterName>
<ParameterPosition>0</ParameterPosition>
<ParameterDescription>description1</ParameterDescription>
<DefaultValue>default1</DefaultValue>
<ParameterOperator>0</ParameterOperator>
<ParameterDataType>0</ParameterDataType>
<ExampleValue>example1</ExampleValue>
<IsRequiredParameter>true</IsRequiredParameter>
</ScriptRequestParameters>
<ScriptResponseParameters>
<ParameterDescription>description2</ParameterDescription>
<ColumnName>column2</ColumnName>
<ParameterName>param2</ParameterName>
<ParameterDataType>0</ParameterDataType>
<ExampleValue>example2</ExampleValue>
</ScriptResponseParameters>
<ScriptConnection>
<TableName>t</TableName>
<ConnectionId>123</ConnectionId>
</ScriptConnection>
</ScriptDetails>
<WizardDetails>
<IsPagedResponse>true</IsPagedResponse>
<WizardRequestParameters>
<ColumnName>column1</ColumnName>
<ParameterName>param1</ParameterName>
<ParameterPosition>0</ParameterPosition>
<ParameterDescription>description1</ParameterDescription>
<DefaultValue>default1</DefaultValue>
<ParameterOperator>0</ParameterOperator>
<ParameterDataType>0</ParameterDataType>
<ExampleValue>example1</ExampleValue>
<IsRequiredParameter>true</IsRequiredParameter>
</WizardRequestParameters>
<WizardResponseParameters>
<ParameterDescription>description2</ParameterDescription>
<ColumnName>column2</ColumnName>
<ParameterName>param2</ParameterName>
<ParameterDataType>0</ParameterDataType>
<ExampleValue>example2</ExampleValue>
</WizardResponseParameters>
<WizardConnection>
<TableName>t</TableName>
<ConnectionId>123</ConnectionId>
</WizardConnection>
</WizardDetails>
</Apis>
</Data>
</ListDataServiceApisResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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" : "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. | The error message returned because an internal error has occurred. Try again later. |
500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | The error message returned because an internal error has occurred. Try again later. |
403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or DataWorks Ultimate Edition. |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | The error message returned because the number of requests for the resource has exceeded the upper limit. |
429 | Throttling.System | The DataWorks system is busy. Try again later. | The error message returned because the DataWorks system is busy. Try again later. |
429 | Throttling.User | Your request is too frequent. Try again later. | The error message returned because excessive requests have been submitted within a short period of time. Try again later. |
For a list of error codes, visit the API Error Center.