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:
restapiSupported configuration mode (
ConnectionPropertiesMode): Connection string mode (UrlMode)
Connection string mode
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
url | String | Yes | http://test-ots-sh-shanghai.ots.aliyuncs.com | The URL. |
envType | String | Yes | Dev | The environment for this data source. Valid values: Dev (development environment), Prod (production environment). |
defaultHeader | String | No | {} | The default request header. |
securityProtocol | String | No | authTypeNone | The authentication type. Valid values: authTypeNone (no authentication), basic (HTTP Basic authentication), token (token-based authentication). Default value: authTypeNone. |
username | String | No | my-username | The username for Basic authentication. Required when securityProtocol is set to basic. |
password | String | No | my-password | The password for Basic authentication. Required when securityProtocol is set to basic. |
authToken | String | No | my-token | The 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"
}Is this page helpful?