调用GetDataServiceApi查询数据服务API开发态的详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
TenantId | long | 否 | 租户 ID。 | 10002 |
ProjectId | long | 是 | 工作空间的 ID。 | 10001 |
ApiId | long | 是 | 数据服务 API 的 ID。 | 10000 |
返回参数
不同类型 API 的详情信息通过不同字段返回。向导 API 使用 WizardDetails 字段,脚本 API 使用 ScriptDetails 字段,注册 API 使用 RegistrationDetails 字段。
示例
正常返回示例
JSON
格式
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The specified parameters are invalid.",
"Success": true,
"ErrorCode": "1031203110005",
"Data": {
"Timeout": 10000,
"Status": 0,
"ApiId": 10000,
"ApiMode": 0,
"ProjectId": 10001,
"ResponseContentType": 0,
"CreatorId": "1234567",
"VisibleRange": 0,
"ModifiedTime": "2020-06-23T00:21:01+0800",
"OperatorId": "2345678",
"GroupId": "ab123****",
"Description": "测试API描述",
"FolderId": 0,
"RequestMethod": 0,
"CreatedTime": "2020-06-23T00:21:01+0800",
"ApiName": "测试API名称",
"TenantId": 10002,
"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
}
}
}
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | 没有权限,请授权 |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | 对该资源的请求已超过您的可用上限。 |
429 | Throttling.System | The DataWorks system is busy. Try again later. | DataWorks系统繁忙,请稍后再试。 |
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. | 系统内部错误,请稍后再试。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2023-10-10 | OpenAPI 错误码发生变更 | 查看变更详情 |