ProcessMaker 4.1
ProcessMaker API Documentation
ProcessMaker Examples
Powered By GitBook
Edit a Data Connector
Edit how to connect to the data source in a Data Connector.

Add Resources to a ProcessMaker Data Connector

ProcessMaker Package Required

The Data Connector package must be installed.

Permissions Required

Your user account or group membership must have the following permissions to edit Resources for a Data Connector unless your user account has the Make this user a Super Admin setting selected:
    Data Connectors: Edit Data Connectors
    Data Connectors: View Data Connectors
See the Data Connectors permissions or ask your Administrator for assistance.
Follow these steps to add a Resource to a Data Connector:
    1.
    View your Data Connectors. The Data Connectors page displays.
    2.
    Click the Edit icon
    for the Data Connector to edit. The Resources tab displays Resources configured for this Data Connector.
    3.
    Click the +Resource button. The Create Resource screen displays.
    4.
    In the Name setting, optionally edit the purpose for this Resource and how it interacts with that data source's endpoint. The value the Name setting displays from the ProcessMaker asset when configuring the Data Connector from that asset. For example, a Resource with the name Get Values displays that name when configuring a Select List control to use this Data Connector to indicate the Resource's purpose. Therefore, provide a concise but relevant name for this Resource so other ProcessMaker designers understand its function. List is the default purpose for a new Resource.
    5.
    In the Description setting, enter a description of this Resource. Descriptions do not display from ProcessMaker assets when configuring them with a Data Connector.
    6.
    From the Method drop-down menu, select the method how this Resource interacts with the data source from one of the following options:
      GET: The GET method retrieves data from the data source.
      POST: The POST method creates data in the data source.
      PUT: The PUT method does one of the following:
        Update: The PUT method updates data in the data source if the specified endpoint's value exists in the data source.
        Create: The PUT method creates data in the data source if the value does not exist that corresponds with the specified endpoint.
      PATCH: The PATCH method partially modifies data in the data source that corresponds with the specified endpoint.
      DELETE: The DELETE method removes data from the data source that corresponds with the specified endpoint.
    7.
    In the URL setting, enter the URL and any required/optional parameters to interact with that data source's endpoint. If configuring this Resource to make a request (contact) to our API, understand how to make a request with your ProcessMaker API instance, and then consult our API documentation to understand any parameters for the endpoint to which this Resource interacts. The URL setting supports mustache syntax to reference the value of a Request variable as the URL and/or parameter setting. To understand any required or optional parameters for a third-party data source's endpoint, consult that data source's documentation.
    8.
    Click Add. A new Resource is created.
    9.
    Do one of the following:
      Optionally, add parameters to this Resource. The parameter(s) are sent to the data source's endpoint when this Resource interacts with that endpoint. See Add Resource Parameters.
      Optionally, add headers to this Resource. The header(s) are sent to the data source's endpoint when this Resource interacts with that endpoint. See Add Resource Headers.
      Optionally, add a body to this Resource. The body is sent to the data source's endpoint when this Resource interacts with that endpoint. See Add a Resource Body.

Add Resource Parameters

A Resource may send Request data as parameters when that Resource connects to the data source's endpoint so that the endpoint may process that Request data prior to its response.
Do not send Request data to a data source other than our API. A third-party data source cannot recognize the Request data.
Follow these steps to add parameters to a Data Connector's Resource:
    1.
    Add or view the Resource for the Data Connector to which to add parameters. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Params tab.
    3.
    Click the +Param button. The Add screen displays to add a parameter for this Resource.
    4.
    In the Key setting, enter the data source's endpoint key name to which to pass data.
    5.
    In the Default setting, enter an initial value for that data source's endpoint key. This setting is not required by default, and it supports mustache syntax to specify its value from a Request variable.
    6.
    Select the Required setting if this key requires a value. If the Default setting contains mustache syntax to derive its value from a Request variable, then the referenced Request variable must exist in the Request data and must not be empty. This setting is not selected by default.
    7.
    Click Save.
    8.
    Click Save again in the Params tab to save the recent changes.

Add Resource Headers

A header is part of the Data Connector Resource's interaction with a data source's endpoint that contains metadata regarding that interaction. A header is included when a Resource makes a request to (contacts) the data source endpoint; likewise, the endpoint includes a response header that is included when that endpoint responds to that request. Headers are used to provide information to both the Data Connector and the data source. Headers can be used for many purposes, including authentication and providing information about the body content of the request/response.
Headers are key-value pairs that are separated by a colon (:). For example, the Content-Type header option below indicates to the data source to expect the Resource's content to be JSON.
1
"Content-Type: application/json"
Copied!
See this list of header options that may be used in a Resource's header.
Each header option added to a Resource is included in the request when the Resource makes its request to the data source.
Follow these steps to add a header to a Data Connector's Resource:
    1.
    Add or view the Resource for the Data Connector to which to add a header. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Headers tab.
    3.
    Click the +Header button. The Add screen displays to add a header for this Resource.
    4.
    In the Key setting, enter the key for the header request option.
    5.
    In the Default setting, enter the value for that key. This setting supports mustache syntax to specify its value from a Request variable.
    6.
    Select the Required setting if this key requires a value. If the Default setting contains mustache syntax to derive its value from a Request variable, then the referenced Request variable must exist in the Request data and must not be empty. This setting is not selected by default.
    7.
    Click Save.
    8.
    Click Save again in the Headers tab to save the recent changes.

Add a Resource Body

A body is part of the Data Connector Resource's interaction with a data source's endpoint that contains data or a message of that interaction.
A body is not required for Resources that use the GET method since the GET method receives data from the data source but does not send content. A body can be used when using POST and PUT methods.
Follow these steps to add a body to a Data Connector's Resource:
    1.
    Add or view the Resource for the Data Connector to which to add a body. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Body tab.
    3.
    Enter the body to send when this Resource makes its request to the data source.
    4.
    Click Save.

Test a Resource in a ProcessMaker Data Connector

After adding a Resource to a Data Connector, test it to determine if the Resource successfully makes a request to the data source endpoint successfully.
Follow these steps to test a Data Connector's Resource:
    1.
    Add or view the Resources for the Data Connector to test. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Send button. If the Resource successfully interacts with the data source endpoint, the endpoint's response displays in the Response Body tab. Along with the data source response, its status, response time, and size display.

View or Edit a Resource in a ProcessMaker Data Connector

Follow these steps to view or edit a Data Connector's Resource:
    1.
    View your Data Connectors. The Data Connectors page displays.
    2.
    Click the Edit icon
    for the Data Connector to edit a Resource. The Resources tab displays.
    3.
    Click the Edit icon
    for the Resource to view or edit. The Configuration tab displays the configuration settings for the Resource.
    4.
    Edit the following settings as necessary:
      In the Name setting, edit the name for this Resource and how it interacts with that data source's endpoint. The value the Name setting contains displays from the ProcessMaker asset when configuring the data source from that asset. For example, if a ProcessMaker designer configures a Select List control to use this Data Connector, this Resource would display the Resource's purpose entered into this setting. Therefore, provide a concise but relevant purpose for this resource so other ProcessMaker designers understand its function. List is the default purpose for a new Resource.
      In the Description setting, edit the description of this Resource.
      From the Method drop-down menu, select the method how this resource interacts with the data source from one of the following options:
        GET: The GET method retrieves a resource from the data source.
        POST: The POST method creates a resource in the data source.
        PUT: The PUT method does one of the following:
          Update: The PUT method may update data an existing resource in the data source.
          Create: The PUT method may create a resource in the data source.
        PATCH: The PATCH method partially modifies an existing resource.
        DELETE: The DELETE method removes an existing resource from the data source.
      In the URL setting, enter the URL and any required/option parameters to interact with that data source's endpoint. If configuring this Resource to make a request (contact) to our API, understand how to make a request with your ProcessMaker API instance, and then consult the our API documentation to understand any parameters for the endpoint to which this Resource interacts. The URL setting supports mustache syntax to reference the value of a Request variable as the URL and/or parameter setting. To understand any required or optional parameters for a third-party data source's endpoint, consult that data source's documentation.
    5.
    Do one of the following:
      Optionally, add or edit Parameters to this Resource. The Parameter(s) are sent to the data source's endpoint when this Resource interacts with that endpoint.
      Optionally, add or edit Headers to this Resource. The Header(s) are sent to the data source's endpoint when this Resource interacts with that endpoint.
      Optionally, add or edit a Body to this Resource. The Body is sent to the data source's endpoint when this Resource interacts with that endpoint.
After editing a Resource, test it to determine if the Resource successfully makes a request to the data source endpoint successfully.

Edit a Resource Parameter

A Resource may send Request data as parameters when that Resource connects to the data source's endpoint so that the endpoint may process that Request data prior to its response.
Do not send Request data to data source other than our API. A third-party data source cannot recognize the Request data.
Follow these steps to edit parameters to a Data Connector's Resource:
    1.
    Add or view the Resource for the Data Connector to which to edit parameters. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Params tab. Parameters for this Resource display.
    3.
    Click the Edit
    icon for the parameter to edit. The Edit screen displays to edit a parameter for this Resource.
    4.
    In the Key setting, edit the data source's endpoint key name to which to pass data.
    5.
    In the Default setting, edit an initial value for that data source's endpoint key. This setting is not required by default, and it supports mustache syntax to specify its value from a Request variable.
    6.
    Select the Required setting if this key requires a value. If the Default setting contains mustache syntax to derive its value from a Request variable, then the referenced Request variable must exist in the Request data and must not be empty. This setting is not selected by default.
    7.
    Click Save.
    8.
    Click the Delete
    icon to delete a parameter. A caution message displays.
    9.
    Click Confirm to delete the parameter.
    10.
    Click Save again in the Params tab to save the recent changes.
After editing a Resource, test it to determine if the Resource successfully makes a request to the data source endpoint successfully.

Edit a Resource Header

A header is part of the Data Connector Resource's interaction with a data source's endpoint that contains metadata regarding that interaction. A header is included when a Resource makes a request to (contacts) the data source endpoint; likewise, the endpoint includes a response header that is included when that endpoint responds to that request. Headers are used to provide information to both the Data Connector and the data source. Headers can be used for many purposes, including authentication and providing information about the body content of the request/response.
Headers are key-value pairs that are separated by a colon (:). For example, the Content-Type request header option below indicates to the data source to expect the Resource's content to be JSON.
1
"Content-Type: application/json"
Copied!
See this list of header options that may be used in an Endpoint's request header.
Each header option added to a Resource is included in the request header when the Resource makes its request to the data source.
Follow these steps edit a header for a Data Connector's Resource:
    1.
    View the Resource for the Data Connector to which to add a header. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Headers tab. Headers for this Resource display.
    3.
    Click the Edit
    icon for the header to edit. The Edit screen displays to add a header for this Resource.
    4.
    Edit the following settings as necessary:
      In the Key setting, edit the key for the header request option.
      In the Value setting, edit the value for that key. This setting supports mustache syntax to specify its value from a Request variable.
      Select the Required setting if this key requires a value. If the Default setting contains mustache syntax to derive its value from a Request variable, then the referenced Request variable must exist in the Request data and must not be empty. This setting is not selected by default.
    5.
    Click Save.
    6.
    Click the Delete
    icon to delete a header. A caution message displays.
    7.
    Click Confirm to delete the header.
After editing a Resource, test it to determine if the Resource successfully makes a request to the data source endpoint successfully.

Edit a Resource Body

A body is part of the Data Connector Resource's interaction with a data source's endpoint that contains data or a message of that interaction.
A body is not required for Resources that use the GET method since the GET method receives data from the data source but does not send content. A body can be used when using POST and PUT methods.
Follow these steps to edit the body of a Data Connector's Resource:
    1.
    Add or view the Resource for the Data Connector to which to edit its body. The Configuration tab displays basic configuration settings for that Resource.
    2.
    Click the Body tab.
    3.
    Edit the body to send when this Resource makes its request to the data source.
    4.
    Click Save.
After editing a Resource, test it to determine if the Resource successfully makes a request to the data source endpoint successfully.

Delete a Resource from a ProcessMaker Data Connector

Follow these steps to delete a Data Connector's Resource:
    1.
    View your Data Connectors. The Data Connectors page displays.
    2.
    Click the Edit icon
    for the Data Connector to delete. The Resources tab displays.
    3.
    Click the Delete icon
    for the Resource to delete. A message displays to confirm deletion of the Resource.
    4.
    Click Confirm.

Edit Details for a ProcessMaker Data Connector

ProcessMaker Package Required

The Data Connector package must be installed.

Permissions Required

Your user account or group membership must have the following permissions to edit details for a Data Connector unless your user account has the Make this user a Super Admin setting selected:
    Data Connectors: Edit Data Connectors
    Data Connectors: View Data Connectors
See the Data Connectors permissions or ask your Administrator for assistance.
Follow these steps to edit the details for a Data Connector:
    1.
    View your Data Connectors. The Data Connectors tab displays.
    2.
    Click the Edit icon
    for the Data Connector to edit. The Resources tab displays.
    3.
    Click the Configuration tab and edit the following information about the Data Connector as necessary:
      In the Name setting, edit the name of the Data Connector. Data Connector names must be unique in your organization and can only use apostrophe characters (') and spaces. This is a required setting.
      In the Description setting, edit the description of the Data Connector.
      From the Category drop-down menu, select one or more Data Connector Categories to associate with this Data Connector. In doing so, Data Connector Categories may be sorted from the Data Connectors page. To remove a Data Connector Category that is currently selected, click the
      icon for that selection or press Enter when the drop-down is visible. This is a required setting.
      in the Authentication section, from the Method drop-down menu, select how the Data Connector authenticates with the data source:
        No Auth: Select the No Auth option to not send authorization details when connecting to the data source. Note that there is no security using this option. No further authentication configured is required.
        Basic Auth: Select the Basic Auth option to send only username and password credentials as authentication when connecting to the data source. See Edit Basic Auth Settings.
        Bearer Token: Select the Bearer Token option to send an access token when connecting to the data source as authentication. The access token is an opaque string that represents the authorization that allows the Data Connector to access the third-party data source. Data Connectors that connect to Collections use Bearer Token authorization method. See Edit Bearer Token Settings.
        Auth 2.0 Password: Select the Auth 2.0 Password option to use Password grant type as part of the OAuth 2.0 authentication protocol to connect to the data source. In doing so, first register this Data Connector with the data source host. After registering, that host provides the redirect URI, Client ID, and Client Secret for this Data Connector. See Edit Auth 2.0 Password Settings.
    4.
    If no other changes are necessary, click Save. The following message displays: The Data Connector was saved.

Edit Basic Auth Settings

Follow these steps to configure basic authentication settings after selecting the Basic Auth option from the Authentication section:
    1.
    Verify that this Data Connector uses basic authentication to authenticate with the data source.
    2.
    In the User setting, enter or edit the username that authenticates with the data source host.
    3.
    In the Password setting, enter or edit the password that authenticates with the data source host.
    4.
    Verify that this Data Connector authenticates using SSL certification. If the Enable SSL certificate verification toggle key is enabled, the Data Connector connects to the data source host using HTTPS protocol for a secure connection. The Enable SSL certificate verification toggle key is enabled by default.
    5.
    If no other changes are necessary, click Save. The following message displays: The Data Connector was saved.

Edit Bearer Token Settings

If you are configuring this Data Connector to interact with (make requests to) the API associated with your ProcessMaker instance, first generate an API token for the user account that contacts our API before starting this procedure. See Generate an API Token, and then follow that procedure in a new Web browser tab or window so the Configuration tab in this Data Connector remains accessible. Note that your user account must have appropriate permissions to generate an API token.
Follow these steps to configure bearer token settings after selecting the Bearer Token option from the Authentication section:
    1.
    Verify that this Data Connector uses a bearer token to authenticate with the data source.
    If an access token has already been entered into this Data Connector, it displays in the Token setting.
    2.
    If this Data Connector requires a new access token, do one of the following:
      Use the access token to interact with (make requests to) our API associated with your ProcessMaker instance:
        1.
        Ensure that the access token for the user account that contacts our API is copied. If not, see Generate an API Token before continuing. Follow that procedure in a new Web browser tab or window so the Configuration tab in this Data Connector remains accessible.
        2.
        In the Token setting, paste the generated API token copied from the user account.
      Use the access token to interact with (make requests to) a third-party data source:
        1.
        Copy the access token from the third-party data source.
        2.
        In the Token setting, paste the access token.
    3.
    Verify that this Data Connector authenticates using SSL certification. If the Enable SSL certificate verification toggle key is enabled, the Data Connector connects to the data source host using HTTPS protocol for a secure connection. The Enable SSL certificate verification toggle key is enabled by default.
    4.
    If no other changes are necessary, click Save. The following message displays: The Data Connector was saved.

Edit Auth 2.0 Password Settings

Follow these steps to configure Auth 2.0 password settings after selecting the Auth 2.0 Password option from the Authentication section:
    1.
    Verify that this Data Connector uses Auth 2.0 password grant type to authenticate with the data source.
    2.
    In the URL Token setting, enter the redirect Universal Resource Identifier (URI) that the data host provides after you register this Data Connector with that host.
    3.
    In the Client ID setting, enter the Client ID the data source host provides after you register this Data Connector with that host.
    4.
    In the Client Secret setting, enter the Client Secret the data source host provides after you register this Data Connector with that host.
    5.
    In the User setting, enter or edit the username that authenticates with the data source host.
    6.
    In the Password setting, enter or edit the password that authenticates with the data source host.
    7.
    Verify that the Enable SSL certificate verification toggle key is enabled so that the Data Connector connects to the data source host using HTTPS protocol for a secure connection. SSL certification is required using Password grant type as part of Auth 2.0 authentication protocol. The Enable SSL certificate verification toggle key is enabled by default.
    8.
    If no other changes are necessary, click Save. The following message displays: The Data Connector was saved.

Related Topics

Last modified 8d ago