Todos os produtos
Search
Central de documentação

DataWorks:GetDataServiceApi

Última atualização: Jun 29, 2026

Obtém os detalhes de uma API do DataService Studio no estado de desenvolvimento.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

Nenhuma autorização necessária para esta operação. Se você encontrar problemas com esta operação, entre em contato com o suporte técnico.

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

TenantId

integer

Não

O ID do locatário.

10002

ProjectId

integer

Sim

O ID do espaço de trabalho.

10001

ApiId

integer

Sim

O ID da API do DataService Studio.

10000

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

Os parâmetros de resposta.

HttpStatusCode

integer

O código de status HTTP retornado.

200

RequestId

string

O ID da solicitação.

0000-ABCD-EFG****

ErrorMessage

string

A mensagem de erro retornada.

The specified parameters are invalid.

Success

boolean

Indica se a solicitação foi bem-sucedida.

true

ErrorCode

string

O código de erro retornado.

1031203110005

Data

object

Os dados retornados.

Timeout

integer

O período de tempo limite da solicitação da API. Unidade: milissegundos.

10000

Status

integer

O status da API. Valores válidos: 0 e 1. O valor 0 indica que a API não está publicada. O valor 1 indica que a API está publicada.

0

ApiId

integer

O ID da API do DataService Studio.

10000

ApiMode

integer

O tipo da API. Valores válidos: 0, 1 e 2. O valor 0 indica que a API é gerada no modo assistente. O valor 1 indica que a API é gerada no modo script. O valor 2 indica que a API é gerada por registro.

0

ProjectId

integer

O ID do espaço de trabalho.

10001

ResponseContentType

integer

O formato no qual a resposta da solicitação da API é retornada. Valores válidos: 0 e 1. O valor 0 indica o formato JSON. O valor 1 indica o formato XML. APIs geradas no modo assistente ou script suportam o formato JSON. APIs geradas por registro suportam os formatos JSON e XML.

0

CreatorId

string

O ID da conta Alibaba Cloud usada pelo criador da API.

1234567

VisibleRange

integer

O escopo no qual a API é visível. Valores válidos: 0 e 1. O valor 0 indica que a API é visível para os membros em um espaço de trabalho específico. O valor 1 indica que a API é visível apenas para o criador da API.

0

ModifiedTime

string

A hora em que a API foi modificada pela última vez.

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

OperatorId

string

O ID da conta Alibaba Cloud usada pelo usuário que modificou a API pela última vez.

2345678

GroupId

string

O ID do grupo.

ab123****

Description

string

A descrição.

Test API description

FolderId

integer

O ID da pasta.

0

RequestMethod

integer

O método de solicitação da API. Valores válidos: 0, 1, 2 e 3. O valor 0 indica o método GET. O valor 1 indica o método POST. O valor 2 indica o método PUT. O valor 3 indica o método DELETE. APIs geradas no modo assistente ou script suportam os métodos GET e POST. APIs geradas por registro suportam os métodos GET, POST, PUT e DELETE.

0

CreatedTime

string

A hora de criação.

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

ApiName

string

O nome da API.

Test API name

TenantId

integer

O ID do locatário.

10002

ApiPath

string

O caminho da API.

/test/1

Protocols

array

A lista de protocolos.

integer

O protocolo usado pela API. Valores válidos: 0 e 1. O valor 0 indica que a API usa HTTP. O valor 1 indica que a API usa HTTPS. Dois protocolos são apresentados em uma lista.

0

RegistrationDetails

object

Os detalhes da API gerada por registro. Este parâmetro é retornado apenas se a API for gerada por registro.

ServiceHost

string

The address of the backend service.

http://example.aliyundoc.com

ServiceContentType

integer

The format in which the response of the API request is returned. Valid values:

  • 0: indicates the JSON format.

  • 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.

0

ServicePath

string

The path of the backend service.

/index

SuccessfulResultSample

string

Sample success responses

{"success": true}

FailedResultSample

string

The sample error response of the API.

{"success": false}

ServiceRequestBodyDescription

string

The description of the request body initiated to call the backend service.

{"abc":1}

RegistrationErrorCodes

array<object>

The error codes returned for the API generated by registration.

object

The returned result.

ErrorMessage

string

The error message.

fail to call

ErrorCode

string

The error code.

1001

ErrorSolution

string

The solution used to fix the error.

retry

RegistrationRequestParameters

array<object>

The request parameters of the API generated by registration.

object

The returned result.

ColumnName

string

The name of the associated field. This parameter is supported only if the API is generated in wizard mode.

column1

ParameterName

string

The name of the parameter.

name1

ParameterPosition

integer

The position of the parameter. Valid values:

  • 0: indicates that the parameter is in the URL path of the request.

  • 1: indicates that the parameter is in the Query parameter of the request URL.

  • 2: indicates that the parameter is in the request header.

  • 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.

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:

  • 0: Equal

  • 1: Like

  • 2: Const

  • 3: 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.

0

ParameterDataType

integer

The data type of the parameter. Valid values:

  • 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

The sample value.

example1

IsRequiredParameter

boolean

Indicates whether the parameter is required.

true

ScriptDetails

object

Os detalhes da API gerada no modo script. Este parâmetro é retornado apenas se a API for gerada no modo script.

Script

string

The SQL script.

select a from t

IsPagedResponse

boolean

Indicates whether the entries were returned by page.

true

ScriptRequestParameters

array<object>

The request parameters of the API generated in script mode.

object

The returned result.

ColumnName

string

The name of the associated field. This parameter is supported only if the API is generated in wizard mode.

column1

ParameterName

string

The name of the parameter.

param1

ParameterPosition

integer

The position of the parameter. Valid values: 0, 1, 2, and 3. The value 0 indicates that the parameter is in the URL path of the request. The value 1 indicates that the parameter is in the Query parameter of the request URL. The value 2 indicates that the parameter is in the request header. The value 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.

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: 0, 1, 2, and 3. The value 0 indicates the Equal operator. The value 1 indicates the Like operator. The value 2 indicates the Const operator. The value 3 indicates the In operator. 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: 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

The sample value.

example1

IsRequiredParameter

boolean

Indicates whether the parameter is required.

true

ScriptResponseParameters

array<object>

The response parameters of the API generated in script mode.

object

The returned result.

ParameterDescription

string

The description.

description2

ColumnName

string

The name of the associated field. This parameter is supported only if the API is generated in wizard mode.

column2

ParameterName

string

The name of the parameter.

param2

ParameterDataType

integer

The data type of the parameter. Valid values:

  • 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

The sample value.

example2

ScriptConnection

object

The data source information of the API generated in script mode.

TableName

string

The name of the table in the data source.

t

ConnectionId

integer

The ID of the data source.

123

WizardDetails

object

Os detalhes da API gerada no modo assistente. Este parâmetro é retornado apenas se a API for gerada no modo assistente.

IsPagedResponse

boolean

Indicates whether the entries were returned by page.

true

WizardRequestParameters

array<object>

The request parameters of the API generated in wizard mode.

object

The returned result.

ColumnName

string

The name of the associated field. This parameter is supported only if the API is generated in wizard mode.

column1

ParameterName

string

The name of the parameter.

param1

ParameterPosition

integer

The position of the parameter. Valid values: 0, 1, 2, and 3. The value 0 indicates that the parameter is in the URL path of the request. The value 1 indicates that the parameter is in the Query parameter of the request URL. The value 2 indicates that the parameter is in the request header. The value 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.

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: 0, 1, 2, and 3. The value 0 indicates the Equal operator. The value 1 indicates the Like operator. The value 2 indicates the Const operator. The value 3 indicates the In operator. 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: 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

The sample value.

example1

IsRequiredParameter

boolean

Indicates whether the parameter is required.

true

WizardResponseParameters

array<object>

The response parameters of the API generated in wizard mode.

object

The returned result.

ParameterDescription

string

The description.

description2

ColumnName

string

The name of the associated field. This parameter is supported only if the API is generated in wizard mode.

column2

ParameterName

string

The name of the parameter.

param2

ParameterDataType

integer

The data type of the parameter. Valid values:

  • 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

The sample value.

example2

WizardConnection

object

The data source information of the API generated in wizard mode.

TableName

string

The name of the table in the data source.

t

ConnectionId

integer

The ID of the data source.

123

Os detalhes sobre as APIs de diferentes tipos são retornados em diferentes parâmetros. Os detalhes sobre a API gerada no modo assistente são retornados no parâmetro WizardDetails. Os detalhes sobre a API gerada no modo script são retornados no parâmetro ScriptDetails. Os detalhes sobre a API gerada por registro são retornados no parâmetro RegistrationDetails.

Exemplos

Resposta de sucesso

JSON formato

{
  "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": "Test API description",
    "FolderId": 0,
    "RequestMethod": 0,
    "CreatedTime": "2020-06-23T00:21:01+0800",
    "ApiName": "Test API name",
    "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
      }
    }
  }
}

Códigos de erro

Código de status HTTP

Código de erro

Mensagem de erro

Descrição

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.

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.