全部產品
Search
文件中心

DataWorks:GetDataServiceApi - 查詢資料服務API開發態的詳情

更新時間:Mar 21, 2026

調用GetDataServiceApi查詢資料服務API開發態的詳情。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

TenantId

integer

租戶 ID。

10002

ProjectId

integer

工作空間的 ID。

10001

ApiId

integer

資料服務 API 的 ID。

10000

返回參數

名稱

類型

描述

樣本值

object

返回對象

HttpStatusCode

integer

HTTP 狀態代碼。

200

RequestId

string

請求 ID,一次請求的唯一標識。

0000-ABCD-EFG****

ErrorMessage

string

錯誤資訊。

The specified parameters are invalid.

Success

boolean

調用是否成功。

true

ErrorCode

string

錯誤碼。

1031203110005

Data

object

返回資料。

Timeout

integer

逾時時間,單位為毫秒(ms)。

10000

Status

integer

API 的狀態,可選枚舉值包括 0(未發布)和 1(發行)。

0

ApiId

integer

資料服務 API 的 ID。

10000

ApiMode

integer

API 的類型,可選枚舉值包括 0(嚮導 API)、1(指令碼 API)和 2(註冊 API)。

0

ProjectId

integer

工作空間的 ID。

10001

ResponseContentType

integer

API 的返回資料類型,可選枚舉值包括 0(JSON)和 1(XML)。嚮導和指令碼 API 支援 JSON,註冊 API 支援 JSON 和 XML。

0

CreatorId

string

建立人的阿里雲 ID。

1234567

VisibleRange

integer

可見範圍,可選枚舉值包括 0(工作空間)和 1(私人)。

0

ModifiedTime

string

最新修改時間。

2020-06-23T00:21:01+0800

OperatorId

string

最新編輯人的阿里雲 ID。

2345678

GroupId

string

分組 ID。

ab123****

Description

string

描述資訊。

測試API描述

FolderId

integer

檔案夾 ID

0

RequestMethod

integer

API 的請求方式,可選枚舉值包括 0(GET)、1(POST)、2(PUT)和 3(DELETE)。嚮導和指令碼 API 支援 GET 和 POST。註冊 API 支援 GET、POST、PUT 和 DELETE。

0

CreatedTime

string

建立時間。

2020-06-23T00:21:01+0800

ApiName

string

API 的名稱。

測試API名稱

TenantId

integer

租戶 ID。

10002

ApiPath

string

API 的路徑。

/test/1

Protocols

array

欄位列表

integer

API 協議,多值列表,可選枚舉值包括 0(HTTP)和 1(HTTPS)。

0

RegistrationDetails

object

註冊 API 的詳情,只有註冊 API 返回。

ServiceHost

string

後端服務地址

http://example.aliyundoc.com

ServiceContentType

integer

API 返回資料類型,可選枚舉值:

  • 0:JSON

  • 1:XML

嚮導和指令碼 API 只支援 JSON;註冊 API 支援 JSON 和 XML。

0

ServicePath

string

後端服務路徑

/index

SuccessfulResultSample

string

正常返回樣本

{"success": true}

FailedResultSample

string

錯誤返回樣本。

{"success": false}

ServiceRequestBodyDescription

string

後端請求 body 內容描述

{"abc":1}

RegistrationErrorCodes

array<object>

註冊 API 的錯誤碼列表。

object

返回對象

ErrorMessage

string

錯誤資訊。

fail to call

ErrorCode

string

錯誤碼。

1001

ErrorSolution

string

錯誤解決方案。

retry

RegistrationRequestParameters

array<object>

註冊 API 的請求參數列表。

object

返回對象

ColumnName

string

綁定的表欄位名稱,僅嚮導模式支援。

column1

ParameterName

string

參數的名稱。

name1

ParameterPosition

integer

參數位置,可選枚舉值有:

  • 0:Path

  • 1:Query

  • 2:Head

  • 3:Body

嚮導和指令碼 API,只支援 Query;註冊 API,GET、DELETE 方法支援 Query、Head,PUT、POST 方法支援 Query、Head、Body。

0

ParameterDescription

string

描述資訊。

description1

DefaultValue

string

預設值。

default1

ParameterOperator

integer

運算子,可選枚舉值有:

  • 0:Equal

  • 1:Like

  • 2:Const

  • 3:In

嚮導 API 支援 Equal、Like、In;指令碼 API 支援 Equal;註冊 API 支援 Equal、Const。

0

ParameterDataType

integer

資料類型,可選枚舉值:

  • 0:String

  • 1:Int

  • 2:Long

  • 3:Float

  • 4:Double

  • 5:Boolean

  • 6:StringList

  • 7:IntList

  • 8:LongList

  • 9:FloatList

  • 10:DoubleList

  • 11:BooleanList

0

ExampleValue

string

樣本值。

example1

IsRequiredParameter

boolean

是否必填。

true

ScriptDetails

object

指令碼 API 的詳情,只有指令碼 API 返回。

Script

string

SQL 指令碼。

select a from t

IsPagedResponse

boolean

返回是否分頁。

true

ScriptRequestParameters

array<object>

指令碼 API 的請求參數列表。

object

返回對象

ColumnName

string

綁定的表欄位名稱,僅嚮導模式支援。

column1

ParameterName

string

參數的名稱。

param1

ParameterPosition

integer

參數的位置,可選枚舉值包括 0(Path)、1(Query)、2(Head)和 3(Body)。嚮導和指令碼 API 僅支援 Query。註冊 API 中的 GET、DELETE 方法支援 Query、Head,PUT、POST 方法支援 Query、Head 和 Body。

0

ParameterDescription

string

描述資訊。

description1

DefaultValue

string

預設值。

default1

ParameterOperator

integer

運算子,可選枚舉值包括 0(Equal)、1(Like)、2(Const)和 3(In)。嚮導模式 API 支援 Equal、Like 和 In,指令碼模式 API 支援 Equal,註冊 API 支援 Equal 和 Const。

0

ParameterDataType

integer

資料類型,可選枚舉值:

  • 0:String

  • 1:Int

  • 2:Long

  • 3:Float

  • 4:Double

  • 5:Boolean

  • 6:StringList

  • 7:IntList

  • 8:LongList

  • 9:FloatList

  • 10:DoubleList

  • 11:BooleanList

0

ExampleValue

string

樣本值。

example1

IsRequiredParameter

boolean

是否必填。

true

ScriptResponseParameters

array<object>

指令碼 API 的返回參數列表。

object

返回對象

ParameterDescription

string

描述資訊。

description2

ColumnName

string

綁定的表欄位名稱,僅嚮導模式支援。

column2

ParameterName

string

參數的名稱。

param2

ParameterDataType

integer

資料類型,可選枚舉值:

  • 0:String

  • 1:Int

  • 2:Long

  • 3:Float

  • 4:Double

  • 5:Boolean

  • 6:StringList

  • 7:IntList

  • 8:LongList

  • 9:FloatList

  • 10:DoubleList

  • 11:BooleanList

0

ExampleValue

string

樣本值。

example2

ScriptConnection

object

指令碼 API 的資料來源資訊。

TableName

string

資料來源表的名稱。

t

ConnectionId

integer

資料來源 ID。

123

WizardDetails

object

嚮導 API 詳情,只有嚮導 API 返回。

IsPagedResponse

boolean

返回是否分頁。

true

WizardRequestParameters

array<object>

嚮導 API 的請求參數列表。

object

返回對象

ColumnName

string

綁定的表欄位名稱,僅嚮導模式支援。

column1

ParameterName

string

參數的名稱。

param1

ParameterPosition

integer

參數的位置,可選枚舉值包括 0(Path)、1(Query)、2(Head)和 3(Body)。嚮導和指令碼 API 僅支援 Query。註冊 API 中的 GET、DELETE 方法支援 Query、Head,PUT、POST 方法支援 Query、Head 和 Body。

0

ParameterDescription

string

描述資訊。

description1

DefaultValue

string

預設值。

default1

ParameterOperator

integer

運算子,可選枚舉值包括 0(Equal)、1(Like)、2(Const)和 3(In)。嚮導模式 API 支援 Equal、Like 和 In,指令碼模式 API 支援 Equal,註冊 API 支援 Equal 和 Const。

0

ParameterDataType

integer

資料類型,可選枚舉值:

  • 0:String

  • 1:Int

  • 2:Long

  • 3:Float

  • 4:Double

  • 5:Boolean

  • 6:StringList

  • 7:IntList

  • 8:LongList

  • 9:FloatList

  • 10:DoubleList

  • 11:BooleanList

0

ExampleValue

string

樣本值。

example1

IsRequiredParameter

boolean

是否必填。

true

WizardResponseParameters

array<object>

嚮導模式的返回參數列表。

object

返回對象

ParameterDescription

string

描述資訊。

description2

ColumnName

string

綁定的表欄位名稱,僅嚮導模式支援。

column2

ParameterName

string

參數的名稱。

param2

ParameterDataType

integer

資料類型,可選枚舉值:

  • 0:String

  • 1:Int

  • 2:Long

  • 3:Float

  • 4:Double

  • 5:Boolean

  • 6:StringList

  • 7:IntList

  • 8:LongList

  • 9:FloatList

  • 10:DoubleList

  • 11:BooleanList

0

ExampleValue

string

樣本值。

example2

WizardConnection

object

嚮導 API 的資料來源資訊。

TableName

string

資料來源的表名稱。

t

ConnectionId

integer

資料來源 ID。

123

不同類型 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

錯誤碼

錯誤資訊

描述

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. 沒有許可權,請授權
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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情