RestFul API Link Parameters
Table 1 describes the RestFul API link parameters.
Do not change the password or user when the job is running. If you do so, the password will not take effect immediately and the job will fail.
| Parameter | Description | Example Value |
|---|---|---|
| Name | Link name, which should be defined based on the data source type, so it is easier to remember what the link is for | RestFul API_link |
| Connection Address Prefix | Prefix of a batch of APIs, which may have a public authentication mode and default request header | https://test.com/rest/api |
| Test Request Path | Address to test, which is automatically combined with the connection address prefix. If 200 is returned, the connection is successful. | /test |
| Test Request Method | Type of the test request method. Only GET and POST requests are supported. | GET |
| Header Parameters | Default header parameters used to call the RESTful API. This header is carried when the API is called. | {"Content-Type":"application/json"} |
| Test Request Body | This parameter is available when Test Request Method is POST. Request body for testing connectivity. If 200 is returned, the connection authentication is successful. | {"Content-Type":"application/json"} |
| Authentication Method | Authentication type.
| |
| Username | This parameter is displayed when Authentication Method is set to Basic Auth. It indicates the username for RESTful API authentication. | - |
| Password | This parameter is displayed when Authentication Method is set to Basic Auth. It indicates the password for RESTful API authentication. | - |
| Token | This parameter is displayed when Authentication Method is set to TOKEN_AUTH. You can use #token to obtain the value and transfer it in body|header. The token is static and never expires. Otherwise, jobs will fail if the token expires. | - |
| Authentication URL | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. This API supports OAuth 2.0. Authentication credentials are used to obtain a token. Before testing connections and jobs, call this API to obtain the token. In addition, the location, name, and value acquisition mode of the token carried in subsequent APIs are defined in the authentication token. | https://xxx.com/auth/token |
| Authentication Request Method | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. Authentication request method in OAuth 2.0 mode. The value can be Get or POST. | Get |
| Authentication Request Header | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. Request header for the Oauth 2.0 mode. The authentication account and password can be obtained through #authUsername and #authPassword. | {"username": "#authUsername","password": "#authPassword","Content-Type":"application/json"} |
| Authentication Request Body | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT and Authentication Request Method is set to POST. It indicates the request body for the Oauth 2.0 mode. This parameter is unavailable when Auth request method is set to GET. The authentication account and password can be obtained through #authUsername and #authPassword. | {"username": "#authUsername","password": "#authPassword"} |
| Authentication Username | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. This parameter is mandatory for the Oauth 2.0 mode. You can use #authUsername to obtain the value of this parameter and enter it in the authHeader or authbody parameter. | - |
| Authentication Password | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. This parameter is mandatory for the Oauth 2.0 mode. You can use #authPassword to obtain the value of this parameter and enter it in the authHeader or authbody parameter. | - |
| Authentication Token | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. You can obtain the authentication token from the response body of the authentication API and transfer the token when testing connections or jobs. The token can only be added to the header. It contains a parameter name and a value. The value can be a SpEL expression. The authentication response body is {"code" : 200,"data" : {"access_token" : "DSFSDFWE87WE9089W9EW9ER898WER9W89ER8","expired":1000}};. To obtain the value of access_token and meet the Bearer format, enter {"NAME":"Authenrization","VALUE":"'Bearer ' + #response.data.access_token"}. To obtain the token from the response header (for example, the key corresponding to the header is x-token), set VALUE to #header.x-token. Authenrization corresponds to the key of the authentication parameter of the request API. | - |
| Authentication Token Validity Period | This parameter is displayed when Authentication Method is set to OAUTH_CODE_GRANT. Validity period of the authentication token, in seconds. The value can be an EL expression. The default value 0 indicates that the token is permanently valid. |
|
| Advanced attributes | Advanced attributes, including:
| - |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot