Skip to end of metadata
Go to start of metadata

Nazwa wtyczki Data utworzenia Data ostatniej aktualizacji Link do instalki Krótki opis Dział utrzymujący Dokumentacja dla klienta Typ licencji Typ wtyczki Id wtyczki
DS - REST DataSource 2020-05-28 2024-11-13 Link Za pomocą opisywanej wtyczki oraz komponentów operujących na źródłach danych można odczytywać jak i przekazywać dane z systemu PlusWorkflow do dowolnej bazy danych skonfigurowanej poprzez opisywane poniżej połączenie Dev CUF Płatna Wtyczka com.suncode.plugin-rest-datasources

 

Instructions for creating data sources in the system - http://192.168.1.52:8081/confluence/pages/viewpage.action?pageId=13272439

The plugin contains the implementation of datasources operating on the RESTful API.

Described data sources allow for read and transfer data between the PlusWorkflow system and an external API using the HTTP protocol methods (GET, POST, etc.).

It is also possible to communicate with the PWFL system's internal API. In this case, use "localhost" in the URL

 

Configuration description:

Name of the parameter
Description
Optionality
AuthorizationRequest authorization scheme. If the requested endpoint does not require authorization, leave the field blank. Description of defining authorization templates is HERE.Optional
Additional headersThe parameter allows adding additional headers to the request. The parameter can be used, for example, to force a response from the API in JSON format. In this case, add a row in the described parameter and enter "Accept" in the "Header" field, and "application/json" in the "Value" field.


A properly configured API should return data in JSON format on request with the above header or reply with an error in case this request cannot be answered in JSON format.
Optional
HTTP methodList of HTTP protocol methods. Available methods: GET, HEAD, POST, PUT, DELETE, PATCH. Choose the required request method according to the API documentation.Required
URLEndpoint URL to which the request will be sent. If you call an action from the API of the same PlusWorkflow system in which the datasource is configured, the URL must contain the domain "localhost".Required
Content-Type

The parameter allows defining the format of the data transferred in the body of the request. The parameter is used only if the "Parameters Body" type parameters are among the input parameters. In other cases the value of this parameter does not matter.

Should use custom header? Use "Additional headers" to set "Content-Type" with your own proper value.

Required
Response Content-TypeParameter specifies data format of incoming API response.Required
Input parameters
Input parameters id
Input parameters names
Input parameters types
JsonPath

Specifies the id of the input parameters.

Specifies the display name of the input parameters

URL param - the parameter will be passed in the URL

Body param - the parameter will be passed in the request body

Header param - parameter will be passed as a header value.

Auth param - parameter will be passed to selected authorization schema.

Parameters of type "Body param" should not be added to requests of type "GET"!

JsonPath formatted value for JSON array where array-like input values will be duplicated/unpacked.

Optional
Output parameters
Output parameters id
Output parameters names
Path/Key
Child node nameSource
Specifies the id of the output parameters used in mappingSpecifies the display name of the output parameters

A path (JsonPath or  XPath) used to extract data from the resulting JSON.

Documentation for using JsonPath - https://github.com/json-path/JsonPath

In case of "Header param" type - fill in with response header key name.

In case of "Cookie param" type - fill in cookie name for single cookie or star * for all cookies in key=value pairs.

XPath or JsonPath child node name from where the value will be obtained. In case of non existing element - empty value will be returned.

  • Body param - value obtained from response body according to given JsonPath/XPath;
  • Header Param - value obtained from response header with given name;
  • Cookie param - value obtained from response cookies;
Optional
Connection timeout [s]Timeout parameter for connection to the REST service. The default parameter value is 60 seconds.Required

Component allows displaying raw data preview (generated JSON schema, API response, API response headers). To use raw data preview feature please use "Show raw data" button (the very bottom of data source configuration window) then fill in required input parameters and finally click the "Execute datasource" button.

 

Sample raw data preview window:

 

Configuration samples:

 

Datasource configuration
API response
Description
{
  message: "user was created"
}
The source adds the user to the example.com API and responds with a message from the server and reads all cookies values.
Datasource configuration
API response
Description
{
  data: [
    {
      ...,
      userName: "admin",
      ...
    },
    {
      ...,
      userName: "administrator",
      ...
    }
  ],
  total: 2
}

The datasource returns a list of PlusWorkflow system user names, containing the value passed in the "filter" parameter and the number of all results returned for each returned username.

 

(executed with following query param: filter="admin")
 

 

  • No labels
Write a comment…