ListDataServicePublishedApis

Updated at:

Lists information about published Data Service APIs.

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

No

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

1

PageSize

integer

No

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

10

ProjectId

integer

Yes

The workspace ID. The sample value is for format demonstration only. You can obtain a valid value from the PageResult.ProjectList[].ProjectId parameter in the response of the ListProjects operation. Before calling this operation, activate DataWorks Enterprise Edition or Ultimate Edition. Otherwise, a 403 Forbidden.Access error is returned.

10000

TenantId

integer

No

The tenant ID. To obtain the tenant ID, log on to the DataWorks console, go to the Data Studio page, click the username in the upper-right corner, and then choose Menu > User Information.

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

12345

Response elements

Element

Type

Description

Example

object

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The unique 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 published API information.

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

array<object>

Timeout

integer

The timeout period, in milliseconds.

10000

Status

integer

The status of the API. Valid values:

  • 0: Unpublished.

  • 1: Published.

1

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 both 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 time when the API was last modified. The time is in the yyyy-MM-dd'T'HH:mm:ssZ format. Example: 2020-06-23T00:21:01+0800. In this example, the time zone offset 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.

ab123

Description

string

The description.

Test API description

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 time when the API was created. The time is in the yyyy-MM-dd'T'HH:mm:ssZ format. Example: 2020-06-23T00:21:01+0800. In this example, the time zone offset 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.

10001

ApiPath

string

The path of the API.

/test/1

Protocols

array

The protocol of the API. Valid values:

  • 0: HTTP.

  • 1: HTTPS.

integer

The protocol of the API. Valid values:

  • 0: HTTP.

  • 1: HTTPS.

0

RegistrationDetails

object

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

ServiceHost

string

The address of the backend service.

http://www.abc.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 both 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.

{"abc":1}

RegistrationErrorCodes

array<object>

The error codes of the registered API.

object

The error codes of the registered API.

ErrorMessage

string

The error message.

fail to call

ErrorCode

string

The error code.

1001

ErrorSolution

string

How to resolve the error.

retry

RegistrationRequestParameters

array<object>

The request parameters of the registered API.

object

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, and the PUT and POST methods support Query, Head, and Body.

0

ParameterDescription

string

The description.

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

ExampleValue

string

The example value.

example1

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

IsRequiredParameter

boolean

Indicates whether the parameter is required.

true

ScriptDetails

object

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

IsPagedResponse

boolean

Indicates whether the response is paginated.

true

SuccessfulResultSample

string

The sample success response.

{"success": true}

FailedResultSample

string

The sample error response.

{"success": false}

Script

string

The SQL script.

select a from t

ScriptErrorCodes

array<object>

The error codes of the script API.

object

ErrorMessage

string

The error message.

fail to call

ErrorCode

string

The error code.

1001

ErrorSolution

string

How to resolve the error.

retry

ScriptRequestParameters

array<object>

The request parameters of the script API.

object

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, and the PUT and POST methods support Query, Head, and Body.

0

ParameterDescription

string

The description.

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

ExampleValue

string

The example value.

example1

ParameterDataType

integer

The data type. Valid values:

  • 0: String.

  • 1: Int.

  • 2: Long.

  • 3: Float.

  • 4: Double.

  • 5: Boolean. Advanced scripts also support the following data types:

  • 6: StringList.

  • 7: IntList.

  • 8: LongList.

  • 9: FloatList.

  • 10: DoubleList.

  • 11: BooleanList.

0

IsRequiredParameter

boolean

Indicates whether the parameter is required.

true

ScriptResponseParameters

array<object>

The response parameters of the script API.

object

ParameterDescription

string

The description.

description2

ParameterName

string

The name of the parameter.

param2

ExampleValue

string

The example value.

example2

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

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 parameter is returned only for wizard APIs.

IsPagedResponse

boolean

Indicates whether the response is paginated.

true

SuccessfulResultSample

string

The sample success response.

{"success": true}

FailedResultSample

string

The sample error response.

{"success": false}

WizardErrorCodes

array<object>

The list of error codes for the wizard API.

object

ErrorMessage

string

The error message.

fail to call

ErrorCode

string

The error code.

1001

ErrorSolution

string

How to resolve the error.

retry

WizardRequestParameters

array<object>

The list of request parameters for the wizard API.

object

ParameterName

string

The name of the parameter.

param1

ParameterPosition

integer

The position of the parameter. Valid values: 0 (Path), 1 (Query), 2 (Head), and 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.

description1

DefaultValue

string

The default value.

default1

ParameterOperator

integer

The operator. Valid values: 0 (Equal), 1 (Like), 2 (Const), and 3 (In). APIs in wizard mode support Equal, Like, and In. APIs in script mode support Equal. Registered APIs support Equal and Const.

0

ExampleValue

string

The example value.

example1

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

IsRequiredParameter

boolean

Specifies whether the parameter is required.

true

WizardResponseParameters

array<object>

The list of response parameters for the wizard API.

object

ParameterDescription

string

The description.

description2

ParameterName

string

The name of the parameter.

param2

ExampleValue

string

The example value.

example2

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

WizardConnection

object

The data source information for the wizard API.

TableName

string

The table name of the data source.

t

ConnectionId

integer

The ID of the data source.

12354

SqlMode

integer

The SQL mode. Valid values: 0 (Basic SQL) and 1 (Advanced SQL).

0

ApigwVersion

integer

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

0

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

Details of different API types are returned in different fields. The WizardDetails field is used for wizard APIs, the ScriptDetails field is used for script APIs, and the RegistrationDetails field is used for registration 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": 1,
        "ApiId": 10002,
        "ApiMode": 0,
        "ProjectId": 10000,
        "ResponseContentType": 0,
        "CreatorId": "1234567",
        "VisibleRange": 0,
        "ModifiedTime": "2020-06-23T00:21:01+0800",
        "OperatorId": "2345678",
        "GroupId": "ab123",
        "Description": "Test API description",
        "RequestMethod": 0,
        "CreatedTime": "2020-06-23T00:21:01+0800",
        "ApiName": "My API name",
        "TenantId": 10001,
        "ApiPath": "/test/1",
        "Protocols": [
          0
        ],
        "RegistrationDetails": {
          "ServiceHost": "http://www.abc.com",
          "ServiceContentType": 0,
          "ServicePath": "/index",
          "SuccessfulResultSample": "{\"success\": true}",
          "FailedResultSample": "{\"success\": false}",
          "ServiceRequestBodyDescription": "{\"abc\":1}",
          "RegistrationErrorCodes": [
            {
              "ErrorMessage": "fail to call",
              "ErrorCode": "1001",
              "ErrorSolution": "retry"
            }
          ],
          "RegistrationRequestParameters": [
            {
              "ParameterName": "name1",
              "ParameterPosition": 0,
              "ParameterDescription": "description1",
              "DefaultValue": "default1",
              "ParameterOperator": 0,
              "ExampleValue": "example1",
              "ParameterDataType": 0,
              "IsRequiredParameter": true
            }
          ]
        },
        "ScriptDetails": {
          "IsPagedResponse": true,
          "SuccessfulResultSample": "{\"success\": true}",
          "FailedResultSample": "{\"success\": false}",
          "Script": "select a from t",
          "ScriptErrorCodes": [
            {
              "ErrorMessage": "fail to call",
              "ErrorCode": "1001",
              "ErrorSolution": "retry"
            }
          ],
          "ScriptRequestParameters": [
            {
              "ParameterName": "param1",
              "ParameterPosition": 0,
              "ParameterDescription": "description1",
              "DefaultValue": "default1",
              "ParameterOperator": 0,
              "ExampleValue": "example1",
              "ParameterDataType": 0,
              "IsRequiredParameter": true
            }
          ],
          "ScriptResponseParameters": [
            {
              "ParameterDescription": "description2",
              "ParameterName": "param2",
              "ExampleValue": "example2",
              "ParameterDataType": 0
            }
          ],
          "ScriptConnection": {
            "TableName": "t",
            "ConnectionId": 123
          }
        },
        "WizardDetails": {
          "IsPagedResponse": true,
          "SuccessfulResultSample": "{\"success\": true}",
          "FailedResultSample": "{\"success\": false}",
          "WizardErrorCodes": [
            {
              "ErrorMessage": "fail to call",
              "ErrorCode": "1001",
              "ErrorSolution": "retry"
            }
          ],
          "WizardRequestParameters": [
            {
              "ParameterName": "param1",
              "ParameterPosition": 0,
              "ParameterDescription": "description1",
              "DefaultValue": "default1",
              "ParameterOperator": 0,
              "ExampleValue": "example1",
              "ParameterDataType": 0,
              "IsRequiredParameter": true
            }
          ],
          "WizardResponseParameters": [
            {
              "ParameterDescription": "description2",
              "ParameterName": "param2",
              "ExampleValue": "example2",
              "ParameterDataType": 0
            }
          ],
          "WizardConnection": {
            "TableName": "t",
            "ConnectionId": 12354
          }
        },
        "SqlMode": 0,
        "ApigwVersion": 0,
        "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. 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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.