ListDataServiceApis

Updated at:

Retrieves a list of APIs under development in Data Service.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

Yes

The page number. Pages start from 1. Default value: 1.

1

PageSize

integer

Yes

The number of entries to return on each page. Default value: 10. Maximum value: 50.

10

ProjectId

integer

Yes

The ID of the workspace. You can call the ListProjects operation to obtain a valid workspace ID, or view it in the workspace configurations in the DataWorks console. The example value in the documentation is for display purposes only.

10000

TenantId

integer

No

The tenant ID. Log on to the DataWorks console, go to the DataStudio page, click the current username in the upper-right corner, and choose Menu > User Information to obtain the tenant ID.

10001

ApiNameKeyword

string

No

The keyword in the API name. This parameter is used to filter APIs whose names contain the keyword.

My API name

ApiPathKeyword

string

No

The keyword in the API path. This parameter is used to filter APIs whose paths contain the keyword.

/test/

CreatorId

string

No

The Alibaba Cloud ID of the API creator. This parameter is used to filter APIs created by the user.

123456

Response elements

Element

Type

Description

Example

object

The response object.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The ID of the request.

0000-ABCD-EFG****

ErrorMessage

string

The error message.

The connection does not exist.

Success

boolean

Indicates whether the call was successful.

true

ErrorCode

string

The error code.

Invalid.Tenant.ConnectionNotExists

Data

object

The information about the APIs in development.

PageNumber

integer

The page number, which is the same as the PageNumber parameter in the request.

1

PageSize

integer

The number of entries per page. Default value: 10. Maximum value: 100.

10

TotalCount

integer

The total number of records.

100

Apis

array<object>

The list of APIs in development.

array<object>

The API object.

Timeout

integer

The timeout period, in milliseconds.

10000

Status

integer

The status of the API. Valid values:

  • 0: Unpublished.

  • 1: Published.

0

ApiId

integer

The ID of the API.

10002

ApiMode

integer

The type of the API. Valid values:

  • 0: Wizard API.

  • 1: Script API.

  • 2: Registered API.

0

ProjectId

integer

The ID of the workspace.

10000

ResponseContentType

integer

The response data type of the API. Valid values:

  • 0: JSON.

  • 1: XML. Wizard and script APIs support JSON. Registered APIs support JSON and XML.

0

CreatorId

string

The Alibaba Cloud ID of the creator.

1234567

VisibleRange

integer

The visibility scope. Valid values:

  • 0: Workspace.

  • 1: Private.

0

ModifiedTime

string

The last modification time.

Format example: yyyy-MM-dd'T'HH:mm:ssZ, such as 2020-06-23T00:21:01+0800. The time zone offset in this example is +0800.

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

OperatorId

string

The Alibaba Cloud ID of the last editor.

2345678

GroupId

string

The ID of the group.

abcde123456789

Description

string

The description of the API.

Test API description

FolderId

integer

The ID of the folder.

0

RequestMethod

integer

The request method of the API. Valid values:

  • 0: GET.

  • 1: POST.

  • 2: PUT.

  • 3: DELETE. Wizard and script APIs support GET and POST. Registered APIs support GET, POST, PUT, and DELETE.

0

CreatedTime

string

The creation time.

Format example: yyyy-MM-dd'T'HH:mm:ssZ, such as 2020-06-23T00:21:01+0800. The time zone offset in this example is +0800.

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

ApiName

string

The name of the API.

My API name

TenantId

integer

The ID of the tenant.

10000

ApiPath

string

The path of the API.

/test/1

Protocols

array

The list of protocols.

integer

The protocol of the API. This is a multi-value list. Valid values:

  • 0: HTTP.

  • 1: HTTPS.

0

RegistrationDetails

object

The details of the registered API. This is returned only for registered APIs.

ServiceHost

string

The address of the backend service.

http://example.aliyundoc.com

ServiceContentType

integer

The response data type of the API. Valid values:

  • 0: JSON.

  • 1: XML. Wizard and script APIs support JSON. Registered APIs support JSON and XML.

0

ServicePath

string

The path of the backend service.

/index

SuccessfulResultSample

string

The sample success response.

{"success": true}

FailedResultSample

string

The sample error response.

{"success": false}

ServiceRequestBodyDescription

string

The description of the backend request body content.

{"abc":1}

RegistrationErrorCodes

array<object>

The list of error codes for the registered API.

object

An error code entry.

ErrorMessage

string

The error message.

fail to call

ErrorCode

string

The error code.

1001

ErrorSolution

string

The solution to the error.

retry

RegistrationRequestParameters

array<object>

The list of request parameters for the registered API.

object

A request parameter.

ColumnName

string

The name of the bound table field. This is supported only in wizard mode.

column1

ParameterName

string

The name of the parameter.

name1

ParameterPosition

integer

The position of the parameter. Valid values:

  • 0: Path.

  • 1: Query.

  • 2: Head.

  • 3: Body. Wizard and script APIs support only Query. For registered APIs, the GET and DELETE methods support Query and Head, while the PUT and POST methods support Query, Head, and Body.

0

ParameterDescription

string

The description of the parameter.

description1

DefaultValue

string

The default value.

default1

ParameterOperator

integer

The operator. Valid values:

  • 0: Equal.

  • 1: Like.

  • 2: Const.

  • 3: In. Wizard APIs support Equal, Like, and In. Script APIs support Equal. Registered APIs support Equal and Const.

0

ParameterDataType

integer

The data type. 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 example value.

example1

IsRequiredParameter

boolean

Specifies whether the parameter is required.

true

ScriptDetails

object

The details of the script API. This is returned only for script APIs.

Script

string

The SQL script.

select a from t

IsPagedResponse

boolean

Indicates whether the response is paginated.

true

ScriptRequestParameters

array<object>

The list of request parameters for the script API.

object

A request parameter.

ColumnName

string

The name of the bound table field. This is supported only in wizard mode.

column1

ParameterName

string

The name of the parameter.

param1

ParameterPosition

integer

The position of the parameter. Valid values:

  • 0: Path.

  • 1: Query.

  • 2: Head.

  • 3: Body. Wizard and script APIs support only Query. For registered APIs, the GET and DELETE methods support Query and Head, while the PUT and POST methods support Query, Head, and Body.

0

ParameterDescription

string

The description of the parameter.

description1

DefaultValue

string

The default value.

default1

ParameterOperator

integer

The operator. Valid values:

  • 0: Equal.

  • 1: Like.

  • 2: Const.

  • 3: In. Wizard APIs support Equal, Like, and In. Script APIs support Equal. Registered APIs support Equal and Const.

0

ParameterDataType

integer

The data type. 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 example value.

example1

IsRequiredParameter

boolean

Specifies whether the parameter is required.

true

ScriptResponseParameters

array<object>

The list of response parameters for the script API.

object

A response parameter.

ParameterDescription

string

The description of the parameter.

description2

ColumnName

string

The name of the bound table field. This is available only in wizard mode.

column2

ParameterName

string

The name of the parameter.

param2

ParameterDataType

integer

The data type. 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 example value.

example2

ScriptConnection

object

The data source information of the script API.

TableName

string

The name of the data source table.

t

ConnectionId

integer

The ID of the data source.

123

WizardDetails

object

The details of the wizard API. This is returned only for wizard APIs.

IsPagedResponse

boolean

Indicates whether the response is paginated.

true

WizardRequestParameters

array<object>

The list of request parameters for the wizard API.

object

A request parameter.

ColumnName

string

The name of the bound table field. This is supported only in wizard mode.

column1

ParameterName

string

The name of the parameter.

param1

ParameterPosition

integer

The position of the parameter. Valid values:

  • 0: Path.

  • 1: Query.

  • 2: Head.

  • 3: Body. Wizard and script APIs support only Query. For registered APIs, the GET and DELETE methods support Query and Head, while the PUT and POST methods support Query, Head, and Body.

0

ParameterDescription

string

The description of the parameter.

description1

DefaultValue

string

The default value.

default1

ParameterOperator

integer

The operator. Valid values: 0 (Equal), 1 (Like), 2 (Const), and 3 (In). Wizard APIs support Equal, Like, and In. Script APIs support Equal. Registered APIs support Equal and Const.

0

ParameterDataType

integer

The data type. 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 example value.

example1

IsRequiredParameter

boolean

Specifies whether the parameter is required.

true

WizardResponseParameters

array<object>

The list of response parameters for the wizard API.

object

A response parameter.

ParameterDescription

string

The description of the parameter.

description2

ColumnName

string

The name of the bound table field. This is supported only in wizard mode.

column2

ParameterName

string

The name of the parameter.

param2

ParameterDataType

integer

The data type. 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 example value.

example2

WizardConnection

object

The data source information for the wizard API.

TableName

string

The name of the data source table.

t

ConnectionId

integer

The ID of the data source.

123

ApigwVersion

integer

The gateway version. Valid values: 1 (API Gateway) and 2 (Cloud-native API Gateway).

1

CloudNativeApiGwAuthType

integer

The security authentication method for the cloud-native API gateway. Valid values: 1 (No authentication), 2 (ApiKey), 3 (JWT), and 4 (HMAC).

1

The details for each API type are returned in a separate field. WizardDetails contains details for wizard APIs, ScriptDetails for script APIs, and RegistrationDetails for registered APIs.

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
          }
        },
        "ApigwVersion": 1,
        "CloudNativeApiGwAuthType": 1
      }
    ]
  }
}

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