RestAPI

Updated at:

Configures a REST API data source for DataWorks Data Integration. Use this data source type to read data from HTTP-based REST endpoints with optional authentication.

Property definition

  • Data source type: restapi

  • Supported configuration mode (ConnectionPropertiesMode): Connection string mode (UrlMode)

Connection string mode

ParameterTypeRequiredExampleDescription
urlStringYeshttp://test-ots-sh-shanghai.ots.aliyuncs.comThe URL.
envTypeStringYesDevThe environment for this data source. Valid values: Dev (development environment), Prod (production environment).
defaultHeaderStringNo{}The default request header.
securityProtocolStringNoauthTypeNoneThe authentication type. Valid values: authTypeNone (no authentication), basic (HTTP Basic authentication), token (token-based authentication). Default value: authTypeNone.
usernameStringNomy-usernameThe username for Basic authentication. Required when securityProtocol is set to basic.
passwordStringNomy-passwordThe password for Basic authentication. Required when securityProtocol is set to basic.
authTokenStringNomy-tokenThe authentication token. Required when securityProtocol is set to token.

Configuration examples

Connection string mode

{
    "envType": "Prod",
    "url": "http://127.0.0.1/get",
    "securityProtocol": "basic",
    "username": "xxx",
    "password": "xxx"
}